Added a shrink changing form but the math seems to be off so it is disabled for the time being. Updated the interface on the main form and the modify record form to include the log viewer and the log console.
This commit is contained in:
@@ -126,6 +126,12 @@
|
||||
<Compile Include="DebugDatabaseConverter.Designer.cs">
|
||||
<DependentUpon>DebugDatabaseConverter.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FrmChangeShrink.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FrmChangeShrink.Designer.cs">
|
||||
<DependentUpon>FrmChangeShrink.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FrmLogFileViewer.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -203,6 +209,9 @@
|
||||
<EmbeddedResource Include="FrmAddRecord.resx">
|
||||
<DependentUpon>FrmAddRecord.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FrmChangeShrink.resx">
|
||||
<DependentUpon>FrmChangeShrink.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FrmLogFileViewer.resx">
|
||||
<DependentUpon>FrmLogFileViewer.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
namespace AdvertsingProfitControl
|
||||
{
|
||||
partial class FrmChangeShrink
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmChangeShrink));
|
||||
this.shrinkNumericUpDown = new System.Windows.Forms.NumericUpDown();
|
||||
this.shrinkAcceptButton = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.shrinkNumericUpDown)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// shrinkNumericUpDown
|
||||
//
|
||||
this.shrinkNumericUpDown.Location = new System.Drawing.Point(12, 30);
|
||||
this.shrinkNumericUpDown.Name = "shrinkNumericUpDown";
|
||||
this.shrinkNumericUpDown.Size = new System.Drawing.Size(120, 29);
|
||||
this.shrinkNumericUpDown.TabIndex = 0;
|
||||
this.shrinkNumericUpDown.Value = new decimal(new int[] {
|
||||
30,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
//
|
||||
// shrinkAcceptButton
|
||||
//
|
||||
this.shrinkAcceptButton.Location = new System.Drawing.Point(155, 23);
|
||||
this.shrinkAcceptButton.Name = "shrinkAcceptButton";
|
||||
this.shrinkAcceptButton.Size = new System.Drawing.Size(132, 42);
|
||||
this.shrinkAcceptButton.TabIndex = 1;
|
||||
this.shrinkAcceptButton.Text = "Accept";
|
||||
this.shrinkAcceptButton.UseVisualStyleBackColor = true;
|
||||
this.shrinkAcceptButton.Click += new System.EventHandler(this.shrinkAcceptButton_Click);
|
||||
//
|
||||
// FrmChangeShrink
|
||||
//
|
||||
this.AcceptButton = this.shrinkAcceptButton;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 24F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(304, 97);
|
||||
this.Controls.Add(this.shrinkAcceptButton);
|
||||
this.Controls.Add(this.shrinkNumericUpDown);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "FrmChangeShrink";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Change Shrink Value";
|
||||
((System.ComponentModel.ISupportInitialize)(this.shrinkNumericUpDown)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.NumericUpDown shrinkNumericUpDown;
|
||||
private System.Windows.Forms.Button shrinkAcceptButton;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AdvertsingProfitControl
|
||||
{
|
||||
public partial class FrmChangeShrink : Form
|
||||
{
|
||||
public int Shrink;
|
||||
|
||||
public FrmChangeShrink()
|
||||
{
|
||||
InitializeComponent();
|
||||
Shrink = 30;
|
||||
}
|
||||
|
||||
public FrmChangeShrink(int shrink)
|
||||
{
|
||||
InitializeComponent();
|
||||
shrinkNumericUpDown.Value = shrink;
|
||||
Shrink = shrink;
|
||||
}
|
||||
|
||||
private void shrinkAcceptButton_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
Shrink = int.Parse(shrinkNumericUpDown.Text);
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -98,6 +98,10 @@ namespace AdvertsingProfitControl
|
||||
message = $"{level}: {message}";
|
||||
logListView.Items.Add(message);
|
||||
logListView.Items[index].ForeColor = color;
|
||||
if (level == Level.Error || level == Level.Critical)
|
||||
{
|
||||
GlobalClasses.WriteToLog(message);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
+17
-17
@@ -47,6 +47,7 @@
|
||||
this.helpMainMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.showHideConsoleHelpMainMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.dbVersionHelpMainMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.examineLogsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.debugMainMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.rawViewDebugMainMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.migrateDatabaseDebugMainMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -108,7 +109,6 @@
|
||||
this.grossProfitEstimatedWeeklyDeptmartmentExpenseLabel = new System.Windows.Forms.Label();
|
||||
this.perfectGrossProfitLabel = new System.Windows.Forms.Label();
|
||||
this.grossProfitDollarGrossProfitLabel = new System.Windows.Forms.Label();
|
||||
this.viewLogsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mainMenu.SuspendLayout();
|
||||
this.mainTableLayoutPanel.SuspendLayout();
|
||||
this.commentMainTableLayoutPanel.SuspendLayout();
|
||||
@@ -266,7 +266,8 @@
|
||||
//
|
||||
this.helpMainMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.showHideConsoleHelpMainMenu,
|
||||
this.dbVersionHelpMainMenu});
|
||||
this.dbVersionHelpMainMenu,
|
||||
this.examineLogsToolStripMenuItem});
|
||||
this.helpMainMenu.Name = "helpMainMenu";
|
||||
this.helpMainMenu.Size = new System.Drawing.Size(68, 34);
|
||||
this.helpMainMenu.Text = "&Help";
|
||||
@@ -274,7 +275,7 @@
|
||||
// showHideConsoleHelpMainMenu
|
||||
//
|
||||
this.showHideConsoleHelpMainMenu.Name = "showHideConsoleHelpMainMenu";
|
||||
this.showHideConsoleHelpMainMenu.Size = new System.Drawing.Size(304, 34);
|
||||
this.showHideConsoleHelpMainMenu.Size = new System.Drawing.Size(288, 34);
|
||||
this.showHideConsoleHelpMainMenu.Text = "Sh&ow/Hide Console";
|
||||
this.showHideConsoleHelpMainMenu.Click += new System.EventHandler(this.ShowHideLogConsole);
|
||||
//
|
||||
@@ -283,12 +284,19 @@
|
||||
this.dbVersionHelpMainMenu.Name = "dbVersionHelpMainMenu";
|
||||
this.dbVersionHelpMainMenu.Size = new System.Drawing.Size(288, 34);
|
||||
this.dbVersionHelpMainMenu.Text = "&Verison Information";
|
||||
this.dbVersionHelpMainMenu.Visible = false;
|
||||
this.dbVersionHelpMainMenu.Click += new System.EventHandler(this.DisplayDatabaseVersionNumber);
|
||||
//
|
||||
// examineLogsToolStripMenuItem
|
||||
//
|
||||
this.examineLogsToolStripMenuItem.Name = "examineLogsToolStripMenuItem";
|
||||
this.examineLogsToolStripMenuItem.Size = new System.Drawing.Size(288, 34);
|
||||
this.examineLogsToolStripMenuItem.Text = "Examine &Logs";
|
||||
this.examineLogsToolStripMenuItem.Click += new System.EventHandler(this.ViewLogFiles);
|
||||
//
|
||||
// debugMainMenu
|
||||
//
|
||||
this.debugMainMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.viewLogsToolStripMenuItem,
|
||||
this.rawViewDebugMainMenu,
|
||||
this.migrateDatabaseDebugMainMenu,
|
||||
this.addRecordToolStripMenuItem});
|
||||
@@ -388,16 +396,15 @@
|
||||
// shrinkLinkLabel
|
||||
//
|
||||
this.shrinkLinkLabel.AutoSize = true;
|
||||
this.shrinkLinkLabel.LinkArea = new System.Windows.Forms.LinkArea(20, 6);
|
||||
this.shrinkLinkLabel.LinkArea = new System.Windows.Forms.LinkArea(0, 0);
|
||||
this.shrinkLinkLabel.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
|
||||
this.shrinkLinkLabel.LinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(192)))));
|
||||
this.shrinkLinkLabel.Location = new System.Drawing.Point(11, 29);
|
||||
this.shrinkLinkLabel.Name = "shrinkLinkLabel";
|
||||
this.shrinkLinkLabel.Size = new System.Drawing.Size(272, 27);
|
||||
this.shrinkLinkLabel.Size = new System.Drawing.Size(205, 25);
|
||||
this.shrinkLinkLabel.TabIndex = 6;
|
||||
this.shrinkLinkLabel.TabStop = true;
|
||||
this.shrinkLinkLabel.Text = "Assuming 30% Shrink Change";
|
||||
this.shrinkLinkLabel.UseCompatibleTextRendering = true;
|
||||
this.shrinkLinkLabel.Text = "Assuming 30% Shrink";
|
||||
this.shrinkLinkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.ChangeShrinkOnLinkClick);
|
||||
//
|
||||
// departmentSalesLabel
|
||||
//
|
||||
@@ -982,13 +989,6 @@
|
||||
this.grossProfitDollarGrossProfitLabel.TabIndex = 2;
|
||||
this.grossProfitDollarGrossProfitLabel.Text = "Dollar Gross Profit: ";
|
||||
//
|
||||
// viewLogsToolStripMenuItem
|
||||
//
|
||||
this.viewLogsToolStripMenuItem.Name = "viewLogsToolStripMenuItem";
|
||||
this.viewLogsToolStripMenuItem.Size = new System.Drawing.Size(270, 34);
|
||||
this.viewLogsToolStripMenuItem.Text = "View &Logs";
|
||||
this.viewLogsToolStripMenuItem.Click += new System.EventHandler(this.DebugViewLogFiles);
|
||||
//
|
||||
// FrmMain
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(168F, 168F);
|
||||
@@ -1116,7 +1116,7 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem manageSuppliersToolsMainMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem clearCurrentRecordSelectedDateToolsMainMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem clearCurrentActiveYearTools;
|
||||
private System.Windows.Forms.ToolStripMenuItem viewLogsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem examineLogsToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -281,6 +281,12 @@ namespace AdvertsingProfitControl
|
||||
|
||||
}
|
||||
|
||||
private void ViewLogFiles(object sender, EventArgs e)
|
||||
{
|
||||
var form = new FrmLogFileViewer();
|
||||
form.ShowDialog();
|
||||
}
|
||||
|
||||
private void ExitProgram(object sender, EventArgs e)
|
||||
{
|
||||
Close();
|
||||
@@ -866,6 +872,7 @@ namespace AdvertsingProfitControl
|
||||
saturdayTaxableLabel.Text = @"Saturday: ";
|
||||
totalTaxableLabel.Text = @"Total: ";
|
||||
taxableGroupBox.Text = @"Taxable";
|
||||
//shrinkLinkLabel.Text = @"Assuming 30% Shrink";
|
||||
departmentSalesLabel.Text = @"Department Sales: ";
|
||||
salesProducedLabel.Text = @"Sales Produced By Ad Items (A):";
|
||||
remainingSalesLabel.Text = @"Remaining Sales:";
|
||||
@@ -936,12 +943,6 @@ namespace AdvertsingProfitControl
|
||||
|
||||
}
|
||||
|
||||
private void DebugViewLogFiles(object sender, EventArgs e)
|
||||
{
|
||||
var form = new FrmLogFileViewer();
|
||||
form.ShowDialog();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void ClearActiveDateYearRecords(object sender, EventArgs e)
|
||||
@@ -1109,5 +1110,19 @@ namespace AdvertsingProfitControl
|
||||
|
||||
#endregion
|
||||
|
||||
private void ChangeShrinkOnLinkClick(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
//The text for this label is always going to be 'Assuming X% Shrink Change'. So convert to
|
||||
//an array and grab the second item and convert it to an integer.
|
||||
var text = shrinkLinkLabel.Text.Split(' ');
|
||||
var shrink = int.Parse(text[1].Replace("%", ""));
|
||||
var form = new FrmChangeShrink(shrink);
|
||||
form.ShowDialog();
|
||||
shrinkLinkLabel.Text = @"Assuming " + form.Shrink + @"% Shrink Change";
|
||||
var linkArea = new LinkArea(shrinkLinkLabel.Text.IndexOf("C", StringComparison.Ordinal), 6);
|
||||
shrinkLinkLabel.LinkArea = linkArea;
|
||||
var result = (decimal) form.Shrink / 100;
|
||||
CalculateProfitAnalysis(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
+31
-1
@@ -35,6 +35,8 @@
|
||||
this.exitFileMainMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.editMainMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.createNewRecordEditMainMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.helpMainMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.examineLogsHelpMainMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mainTabControl = new System.Windows.Forms.TabControl();
|
||||
this.projectionTabPage = new System.Windows.Forms.TabPage();
|
||||
this.projectionsDataGridView = new System.Windows.Forms.DataGridView();
|
||||
@@ -108,6 +110,7 @@
|
||||
this.informationPanel = new System.Windows.Forms.Panel();
|
||||
this.errorLabel = new System.Windows.Forms.Label();
|
||||
this.addRecordButton = new System.Windows.Forms.Button();
|
||||
this.showConsoleHelpMainMenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.mainLayoutPanel.SuspendLayout();
|
||||
this.mainMenuStrip.SuspendLayout();
|
||||
this.mainTabControl.SuspendLayout();
|
||||
@@ -164,7 +167,8 @@
|
||||
this.mainMenuStrip.ImageScalingSize = new System.Drawing.Size(24, 24);
|
||||
this.mainMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.FileMainMenu,
|
||||
this.editMainMenu});
|
||||
this.editMainMenu,
|
||||
this.helpMainMenu});
|
||||
this.mainMenuStrip.Location = new System.Drawing.Point(0, 0);
|
||||
this.mainMenuStrip.Name = "mainMenuStrip";
|
||||
this.mainMenuStrip.Padding = new System.Windows.Forms.Padding(7, 2, 0, 2);
|
||||
@@ -201,6 +205,22 @@
|
||||
this.createNewRecordEditMainMenu.Text = "&Create New Record";
|
||||
this.createNewRecordEditMainMenu.Click += new System.EventHandler(this.createNewRecordEditMainMenu_Click);
|
||||
//
|
||||
// helpMainMenu
|
||||
//
|
||||
this.helpMainMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.showConsoleHelpMainMenu,
|
||||
this.examineLogsHelpMainMenu});
|
||||
this.helpMainMenu.Name = "helpMainMenu";
|
||||
this.helpMainMenu.Size = new System.Drawing.Size(68, 31);
|
||||
this.helpMainMenu.Text = "&Help";
|
||||
//
|
||||
// examineLogsHelpMainMenu
|
||||
//
|
||||
this.examineLogsHelpMainMenu.Name = "examineLogsHelpMainMenu";
|
||||
this.examineLogsHelpMainMenu.Size = new System.Drawing.Size(286, 34);
|
||||
this.examineLogsHelpMainMenu.Text = "Examine &Logs";
|
||||
this.examineLogsHelpMainMenu.Click += new System.EventHandler(this.ViewLogFiles);
|
||||
//
|
||||
// mainTabControl
|
||||
//
|
||||
this.mainLayoutPanel.SetColumnSpan(this.mainTabControl, 4);
|
||||
@@ -947,6 +967,13 @@
|
||||
this.addRecordButton.UseVisualStyleBackColor = true;
|
||||
this.addRecordButton.Click += new System.EventHandler(this.addRecordButton_Click);
|
||||
//
|
||||
// showConsoleHelpMainMenu
|
||||
//
|
||||
this.showConsoleHelpMainMenu.Name = "showConsoleHelpMainMenu";
|
||||
this.showConsoleHelpMainMenu.Size = new System.Drawing.Size(286, 34);
|
||||
this.showConsoleHelpMainMenu.Text = "Sh&ow/Hide Console";
|
||||
this.showConsoleHelpMainMenu.Click += new System.EventHandler(this.DisplayLogConsole);
|
||||
//
|
||||
// NewModifyRecord
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 24F);
|
||||
@@ -1074,5 +1101,8 @@
|
||||
private System.Windows.Forms.Button addRecordButton;
|
||||
private System.Windows.Forms.ToolStripMenuItem editMainMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem createNewRecordEditMainMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem helpMainMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem examineLogsHelpMainMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem showConsoleHelpMainMenu;
|
||||
}
|
||||
}
|
||||
@@ -3466,8 +3466,14 @@ namespace AdvertsingProfitControl
|
||||
}
|
||||
catch (DbUpdateException e)
|
||||
{
|
||||
errorLabel.Text = @"Failed to update Projections: Row " + (lastRow + 1) + @".";
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.Message);
|
||||
if (e.InnerException != null)
|
||||
{
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.InnerException.Message);
|
||||
if (e.InnerException.InnerException != null)
|
||||
{
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.InnerException.InnerException.Message);
|
||||
}
|
||||
}
|
||||
throw new TransactionAbortedException("Failed to update Projections." + Environment.NewLine + "Updates to Inventory aborted." + Environment.NewLine + "Updates to Actual Sales aborted." + Environment.NewLine);
|
||||
}
|
||||
}
|
||||
@@ -3601,8 +3607,14 @@ namespace AdvertsingProfitControl
|
||||
}
|
||||
catch (DbUpdateException e)
|
||||
{
|
||||
errorLabel.Text = @"Failed to update Inventory: Row " + (lastRow + 1) + @".";
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.Message);
|
||||
if (e.InnerException != null)
|
||||
{
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.InnerException.Message);
|
||||
if (e.InnerException.InnerException != null)
|
||||
{
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.InnerException.InnerException.Message);
|
||||
}
|
||||
}
|
||||
throw new TransactionAbortedException("Updates to Projections aborted." + Environment.NewLine + "Failed to update Inventory." + Environment.NewLine + "Updates to Actual Sales aborted." + Environment.NewLine);
|
||||
}
|
||||
}
|
||||
@@ -3774,8 +3786,14 @@ namespace AdvertsingProfitControl
|
||||
}
|
||||
catch (DbUpdateException e)
|
||||
{
|
||||
errorLabel.Text = @"Failed to update Actual Sales: Row " + (lastRow + 1) + @".";
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.Message);
|
||||
if (e.InnerException != null)
|
||||
{
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.InnerException.Message);
|
||||
if (e.InnerException.InnerException != null)
|
||||
{
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.InnerException.InnerException.Message);
|
||||
}
|
||||
}
|
||||
throw new TransactionAbortedException("Updates to Projections aborted." + Environment.NewLine +
|
||||
"Updates to Inventory aborted." + Environment.NewLine +
|
||||
"Failed to update Actual Sales" + Environment.NewLine);
|
||||
@@ -3886,9 +3904,15 @@ namespace AdvertsingProfitControl
|
||||
}
|
||||
catch (TransactionAbortedException e)
|
||||
{
|
||||
errorLabel.Text = @"Failed to update Invoices: Row " + (lastRow + 1) + @".";
|
||||
informationLabel.Text += @"Failed to update Invoices." + Environment.NewLine;
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.Message);
|
||||
if (e.InnerException != null)
|
||||
{
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.InnerException.Message);
|
||||
if (e.InnerException.InnerException != null)
|
||||
{
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.InnerException.InnerException.Message);
|
||||
}
|
||||
}
|
||||
//Check for the ID numbers to see what is in the database and what isn't.
|
||||
foreach (DataGridViewRow row in inventoryDataGridView.Rows)
|
||||
{
|
||||
@@ -3957,7 +3981,14 @@ namespace AdvertsingProfitControl
|
||||
{
|
||||
errorLabel.Text = @"Failed to update Weekly Sales.";
|
||||
informationLabel.Text += @"Failed to update Weekly Sales." + Environment.NewLine;
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.Message);
|
||||
if (e.InnerException != null)
|
||||
{
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.InnerException.Message);
|
||||
if (e.InnerException.InnerException != null)
|
||||
{
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.InnerException.InnerException.Message);
|
||||
}
|
||||
}
|
||||
//If the tag contains an object check to see if its in the database, if its not clear the tag out.
|
||||
if (isWeeklySalesDirtyCheckBox.Tag != null)
|
||||
{
|
||||
@@ -4025,7 +4056,14 @@ namespace AdvertsingProfitControl
|
||||
{
|
||||
errorLabel.Text = @"Failed to update Taxable.";
|
||||
informationLabel.Text += @"Failed to update Taxable." + Environment.NewLine;
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.Message);
|
||||
if (e.InnerException != null)
|
||||
{
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.InnerException.Message);
|
||||
if (e.InnerException.InnerException != null)
|
||||
{
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.InnerException.InnerException.Message);
|
||||
}
|
||||
}
|
||||
//If the tag contains an object check to see if its in the database, if its not clear the tag out.
|
||||
if (isTaxableDirtyCheckBox.Tag != null)
|
||||
{
|
||||
@@ -4085,7 +4123,14 @@ namespace AdvertsingProfitControl
|
||||
{
|
||||
errorLabel.Text = @"Failed to update Cost Analysis.";
|
||||
informationLabel.Text += @"Failed to update Cost Analysis." + Environment.NewLine;
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.Message);
|
||||
if (e.InnerException != null)
|
||||
{
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.InnerException.Message);
|
||||
if (e.InnerException.InnerException != null)
|
||||
{
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.InnerException.InnerException.Message);
|
||||
}
|
||||
}
|
||||
//If the tag contains an object check to see if its in the database, if its not clear the tag out.
|
||||
if (isCostAnalysisDirtyCheckBox.Tag != null)
|
||||
{
|
||||
@@ -4139,7 +4184,14 @@ namespace AdvertsingProfitControl
|
||||
{
|
||||
errorLabel.Text = @"Failed to update Comments.";
|
||||
informationLabel.Text += @"Failed to update Comments." + Environment.NewLine;
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.Message);
|
||||
if (e.InnerException != null)
|
||||
{
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.InnerException.Message);
|
||||
if (e.InnerException.InnerException != null)
|
||||
{
|
||||
LogConsole.WriteToLog(FrmLogConsole.Level.Error, e.InnerException.InnerException.Message);
|
||||
}
|
||||
}
|
||||
//If the tag contains an object check to see if its in the database, if its not clear the tag out.
|
||||
if (isCommentDirtyCheckBox.Tag != null)
|
||||
{
|
||||
@@ -4469,5 +4521,23 @@ namespace AdvertsingProfitControl
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ViewLogFiles(object sender, EventArgs e)
|
||||
{
|
||||
var form = new FrmLogFileViewer();
|
||||
form.ShowDialog();
|
||||
}
|
||||
|
||||
private void DisplayLogConsole(object sender, EventArgs e)
|
||||
{
|
||||
if (LogConsole.IsVisable)
|
||||
{
|
||||
LogConsole.Hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
LogConsole.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.0.2.16")]
|
||||
[assembly: AssemblyFileVersion("2.0.2.16")]
|
||||
[assembly: AssemblyVersion("2.0.2.20")]
|
||||
[assembly: AssemblyFileVersion("2.0.2.20")]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Product Id="*" Name="Advertising Profit Control" Language="1033" Version="2.0.2.16" Manufacturer="Garritt McCune" UpgradeCode="a416a558-d7c0-4f24-8b1e-2d01761ad15f">
|
||||
<Product Id="*" Name="Advertising Profit Control" Language="1033" Version="2.0.2.20" Manufacturer="Garritt McCune" UpgradeCode="a416a558-d7c0-4f24-8b1e-2d01761ad15f">
|
||||
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Description="Custom Profit Control Recording Software" Comments="Profit Control Recording Software"/>
|
||||
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
|
||||
<!--Not set by default, EmbedCab="yes" embeds the cabinet file into the installer-->
|
||||
|
||||
Reference in New Issue
Block a user