Updated the UI of the add record form. Added support to clear the APC tables if even one fails to be added to the database. Fixed a crash bug with the trimming operations where Header and Member Booleans would be null.

This commit is contained in:
2016-12-08 01:02:01 -06:00
parent 0bf2290ab0
commit 91c2326db2
6 changed files with 280 additions and 296 deletions
+53 -94
View File
@@ -51,6 +51,7 @@
this.isTaxableDirtyCheckBox = new System.Windows.Forms.CheckBox();
this.isWeeklySalesDirtyCheckBox = new System.Windows.Forms.CheckBox();
this.isCommentDirtyCheckBox = new System.Windows.Forms.CheckBox();
this.informationLabel = new System.Windows.Forms.Label();
this.mainMenuStrip = new System.Windows.Forms.MenuStrip();
this.FileMainMenu = new System.Windows.Forms.ToolStripMenuItem();
this.clearFormFileMainMenu = new System.Windows.Forms.ToolStripMenuItem();
@@ -101,14 +102,10 @@
this.tuesdayTaxableLabel = new System.Windows.Forms.Label();
this.saturdayTaxableTextBox = new System.Windows.Forms.TextBox();
this.dateGroupBox = new System.Windows.Forms.GroupBox();
this.monthCalendarInstructionsLabel = new System.Windows.Forms.Label();
this.weekEndingMonthCalendar = new System.Windows.Forms.MonthCalendar();
this.weekEndingCalendar = new System.Windows.Forms.MonthCalendar();
this.dateTimeMaskedTextBoxPanel = new System.Windows.Forms.Panel();
this.errorLabel = new System.Windows.Forms.Label();
this.weekEndingMaskedTextBox = new System.Windows.Forms.MaskedTextBox();
this.weekEndingMaskedTextBoxInstructionLabel = new System.Windows.Forms.Label();
this.informationPanel = new System.Windows.Forms.Panel();
this.informationLabel = new System.Windows.Forms.Label();
this.errorLabel = new System.Windows.Forms.Label();
this.addRecordButton = new System.Windows.Forms.Button();
this.commentsGroupBox.SuspendLayout();
this.mainTabControl.SuspendLayout();
@@ -142,7 +139,7 @@
this.commentsGroupBox.Margin = new System.Windows.Forms.Padding(4);
this.commentsGroupBox.Name = "commentsGroupBox";
this.commentsGroupBox.Padding = new System.Windows.Forms.Padding(4);
this.commentsGroupBox.Size = new System.Drawing.Size(461, 223);
this.commentsGroupBox.Size = new System.Drawing.Size(461, 177);
this.commentsGroupBox.TabIndex = 2;
this.commentsGroupBox.TabStop = false;
this.commentsGroupBox.Text = "Comments";
@@ -154,7 +151,8 @@
this.commentsTextBox.MaxLength = 256;
this.commentsTextBox.Multiline = true;
this.commentsTextBox.Name = "commentsTextBox";
this.commentsTextBox.Size = new System.Drawing.Size(453, 193);
this.commentsTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.commentsTextBox.Size = new System.Drawing.Size(453, 147);
this.commentsTextBox.TabIndex = 4;
//
// mainTabControl
@@ -303,7 +301,6 @@
//
// debugPanel
//
this.debugPanel.Controls.Add(this.informationLabel);
this.debugPanel.Controls.Add(this.generateCostAnalysisIdButton);
this.debugPanel.Controls.Add(this.generateTaxableIdButton);
this.debugPanel.Controls.Add(this.generateWeeklySalesIdButton);
@@ -408,6 +405,14 @@
this.isCommentDirtyCheckBox.Text = "IsCommentDirty";
this.isCommentDirtyCheckBox.UseVisualStyleBackColor = true;
//
// informationLabel
//
this.informationLabel.AutoSize = true;
this.informationLabel.Location = new System.Drawing.Point(0, 7);
this.informationLabel.Name = "informationLabel";
this.informationLabel.Size = new System.Drawing.Size(0, 25);
this.informationLabel.TabIndex = 27;
//
// mainMenuStrip
//
this.mainLayoutPanel.SetColumnSpan(this.mainMenuStrip, 4);
@@ -464,8 +469,8 @@
this.mainLayoutPanel.RowCount = 4;
this.mainLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 35F));
this.mainLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 60F));
this.mainLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.mainLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 15F));
this.mainLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.mainLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.mainLayoutPanel.Size = new System.Drawing.Size(1876, 961);
this.mainLayoutPanel.TabIndex = 0;
//
@@ -482,28 +487,28 @@
this.costAnalysisGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.costAnalysisGroupBox.Location = new System.Drawing.Point(1410, 593);
this.costAnalysisGroupBox.Name = "costAnalysisGroupBox";
this.costAnalysisGroupBox.Size = new System.Drawing.Size(463, 225);
this.costAnalysisGroupBox.Size = new System.Drawing.Size(463, 179);
this.costAnalysisGroupBox.TabIndex = 6;
this.costAnalysisGroupBox.TabStop = false;
this.costAnalysisGroupBox.Text = "Cost Analysis";
//
// suppliesTextBox
//
this.suppliesTextBox.Location = new System.Drawing.Point(205, 185);
this.suppliesTextBox.Location = new System.Drawing.Point(203, 139);
this.suppliesTextBox.Name = "suppliesTextBox";
this.suppliesTextBox.Size = new System.Drawing.Size(199, 29);
this.suppliesTextBox.TabIndex = 25;
//
// salaryPercentageTextBox
//
this.salaryPercentageTextBox.Location = new System.Drawing.Point(205, 87);
this.salaryPercentageTextBox.Location = new System.Drawing.Point(203, 69);
this.salaryPercentageTextBox.Name = "salaryPercentageTextBox";
this.salaryPercentageTextBox.Size = new System.Drawing.Size(199, 29);
this.salaryPercentageTextBox.TabIndex = 23;
//
// salaryDollarsTextBox
//
this.salaryDollarsTextBox.Location = new System.Drawing.Point(205, 136);
this.salaryDollarsTextBox.Location = new System.Drawing.Point(203, 104);
this.salaryDollarsTextBox.Name = "salaryDollarsTextBox";
this.salaryDollarsTextBox.Size = new System.Drawing.Size(199, 29);
this.salaryDollarsTextBox.TabIndex = 24;
@@ -511,7 +516,7 @@
// salesPerManHourLabel
//
this.salesPerManHourLabel.AutoSize = true;
this.salesPerManHourLabel.Location = new System.Drawing.Point(5, 38);
this.salesPerManHourLabel.Location = new System.Drawing.Point(3, 34);
this.salesPerManHourLabel.Name = "salesPerManHourLabel";
this.salesPerManHourLabel.Size = new System.Drawing.Size(194, 25);
this.salesPerManHourLabel.TabIndex = 0;
@@ -520,7 +525,7 @@
// salaryPercentageLabel
//
this.salaryPercentageLabel.AutoSize = true;
this.salaryPercentageLabel.Location = new System.Drawing.Point(20, 87);
this.salaryPercentageLabel.Location = new System.Drawing.Point(18, 69);
this.salaryPercentageLabel.Name = "salaryPercentageLabel";
this.salaryPercentageLabel.Size = new System.Drawing.Size(179, 25);
this.salaryPercentageLabel.TabIndex = 1;
@@ -528,7 +533,7 @@
//
// salesPerManHourTextBox
//
this.salesPerManHourTextBox.Location = new System.Drawing.Point(205, 38);
this.salesPerManHourTextBox.Location = new System.Drawing.Point(203, 34);
this.salesPerManHourTextBox.Name = "salesPerManHourTextBox";
this.salesPerManHourTextBox.Size = new System.Drawing.Size(199, 29);
this.salesPerManHourTextBox.TabIndex = 22;
@@ -536,7 +541,7 @@
// salaryDollarsLabel
//
this.salaryDollarsLabel.AutoSize = true;
this.salaryDollarsLabel.Location = new System.Drawing.Point(60, 136);
this.salaryDollarsLabel.Location = new System.Drawing.Point(58, 104);
this.salaryDollarsLabel.Name = "salaryDollarsLabel";
this.salaryDollarsLabel.Size = new System.Drawing.Size(139, 25);
this.salaryDollarsLabel.TabIndex = 2;
@@ -545,7 +550,7 @@
// suppliesLabel
//
this.suppliesLabel.AutoSize = true;
this.suppliesLabel.Location = new System.Drawing.Point(105, 185);
this.suppliesLabel.Location = new System.Drawing.Point(103, 139);
this.suppliesLabel.Name = "suppliesLabel";
this.suppliesLabel.Size = new System.Drawing.Size(94, 25);
this.suppliesLabel.TabIndex = 3;
@@ -876,8 +881,7 @@
//
// dateGroupBox
//
this.dateGroupBox.Controls.Add(this.monthCalendarInstructionsLabel);
this.dateGroupBox.Controls.Add(this.weekEndingMonthCalendar);
this.dateGroupBox.Controls.Add(this.weekEndingCalendar);
this.dateGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.dateGroupBox.Location = new System.Drawing.Point(3, 593);
this.dateGroupBox.Name = "dateGroupBox";
@@ -887,91 +891,49 @@
this.dateGroupBox.TabStop = false;
this.dateGroupBox.Text = "Week Ending Date";
//
// monthCalendarInstructionsLabel
// weekEndingCalendar
//
this.monthCalendarInstructionsLabel.AutoSize = true;
this.monthCalendarInstructionsLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.142858F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.monthCalendarInstructionsLabel.Location = new System.Drawing.Point(57, 30);
this.monthCalendarInstructionsLabel.Name = "monthCalendarInstructionsLabel";
this.monthCalendarInstructionsLabel.Size = new System.Drawing.Size(296, 25);
this.monthCalendarInstructionsLabel.TabIndex = 2;
this.monthCalendarInstructionsLabel.Text = "Select a date from the calendar...";
//
// weekEndingMonthCalendar
//
this.weekEndingMonthCalendar.BackColor = System.Drawing.SystemColors.ControlLight;
this.weekEndingMonthCalendar.FirstDayOfWeek = System.Windows.Forms.Day.Sunday;
this.weekEndingMonthCalendar.Location = new System.Drawing.Point(49, 61);
this.weekEndingMonthCalendar.MaxSelectionCount = 1;
this.weekEndingMonthCalendar.Name = "weekEndingMonthCalendar";
this.weekEndingMonthCalendar.ShowTodayCircle = false;
this.weekEndingMonthCalendar.TabIndex = 2;
this.weekEndingMonthCalendar.TabStop = false;
this.weekEndingMonthCalendar.DateChanged += new System.Windows.Forms.DateRangeEventHandler(this.UpdateWeekEndingMaskedTextBox);
this.weekEndingCalendar.BackColor = System.Drawing.SystemColors.ControlLight;
this.weekEndingCalendar.FirstDayOfWeek = System.Windows.Forms.Day.Sunday;
this.weekEndingCalendar.Location = new System.Drawing.Point(48, 34);
this.weekEndingCalendar.MaxSelectionCount = 1;
this.weekEndingCalendar.Name = "weekEndingCalendar";
this.weekEndingCalendar.ShowTodayCircle = false;
this.weekEndingCalendar.TabIndex = 2;
this.weekEndingCalendar.TabStop = false;
//
// dateTimeMaskedTextBoxPanel
//
this.dateTimeMaskedTextBoxPanel.Controls.Add(this.errorLabel);
this.dateTimeMaskedTextBoxPanel.Controls.Add(this.weekEndingMaskedTextBox);
this.dateTimeMaskedTextBoxPanel.Controls.Add(this.weekEndingMaskedTextBoxInstructionLabel);
this.dateTimeMaskedTextBoxPanel.Controls.Add(this.informationLabel);
this.dateTimeMaskedTextBoxPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.dateTimeMaskedTextBoxPanel.Location = new System.Drawing.Point(472, 824);
this.dateTimeMaskedTextBoxPanel.Location = new System.Drawing.Point(472, 778);
this.dateTimeMaskedTextBoxPanel.Name = "dateTimeMaskedTextBoxPanel";
this.dateTimeMaskedTextBoxPanel.Size = new System.Drawing.Size(463, 134);
this.dateTimeMaskedTextBoxPanel.Size = new System.Drawing.Size(463, 180);
this.dateTimeMaskedTextBoxPanel.TabIndex = 1;
//
// informationPanel
//
this.informationPanel.Controls.Add(this.errorLabel);
this.informationPanel.Controls.Add(this.addRecordButton);
this.informationPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.informationPanel.Location = new System.Drawing.Point(1410, 778);
this.informationPanel.Name = "informationPanel";
this.informationPanel.Size = new System.Drawing.Size(463, 180);
this.informationPanel.TabIndex = 25;
//
// errorLabel
//
this.errorLabel.AutoSize = true;
this.errorLabel.ForeColor = System.Drawing.Color.Maroon;
this.errorLabel.Location = new System.Drawing.Point(3, 31);
this.errorLabel.Location = new System.Drawing.Point(-1, 7);
this.errorLabel.Name = "errorLabel";
this.errorLabel.Size = new System.Drawing.Size(108, 25);
this.errorLabel.Size = new System.Drawing.Size(0, 25);
this.errorLabel.TabIndex = 28;
this.errorLabel.Text = "Errors here";
//
// weekEndingMaskedTextBox
//
this.weekEndingMaskedTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.weekEndingMaskedTextBox.Location = new System.Drawing.Point(277, 3);
this.weekEndingMaskedTextBox.Mask = "00/00/0000";
this.weekEndingMaskedTextBox.Name = "weekEndingMaskedTextBox";
this.weekEndingMaskedTextBox.Size = new System.Drawing.Size(115, 31);
this.weekEndingMaskedTextBox.TabIndex = 3;
this.weekEndingMaskedTextBox.ValidatingType = typeof(System.DateTime);
//
// weekEndingMaskedTextBoxInstructionLabel
//
this.weekEndingMaskedTextBoxInstructionLabel.AutoSize = true;
this.weekEndingMaskedTextBoxInstructionLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.142858F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.weekEndingMaskedTextBoxInstructionLabel.Location = new System.Drawing.Point(16, 6);
this.weekEndingMaskedTextBoxInstructionLabel.Name = "weekEndingMaskedTextBoxInstructionLabel";
this.weekEndingMaskedTextBoxInstructionLabel.Size = new System.Drawing.Size(245, 25);
this.weekEndingMaskedTextBoxInstructionLabel.TabIndex = 0;
this.weekEndingMaskedTextBoxInstructionLabel.Text = "... or manually enter it here:\r\n";
//
// informationPanel
//
this.informationPanel.Controls.Add(this.addRecordButton);
this.informationPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.informationPanel.Location = new System.Drawing.Point(1410, 824);
this.informationPanel.Name = "informationPanel";
this.informationPanel.Size = new System.Drawing.Size(463, 134);
this.informationPanel.TabIndex = 25;
//
// informationLabel
//
this.informationLabel.AutoSize = true;
this.informationLabel.Location = new System.Drawing.Point(1014, 26);
this.informationLabel.Name = "informationLabel";
this.informationLabel.Size = new System.Drawing.Size(152, 25);
this.informationLabel.TabIndex = 27;
this.informationLabel.Text = "Information here";
//
// addRecordButton
//
this.addRecordButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.addRecordButton.Location = new System.Drawing.Point(287, 84);
this.addRecordButton.Location = new System.Drawing.Point(287, 130);
this.addRecordButton.Name = "addRecordButton";
this.addRecordButton.Size = new System.Drawing.Size(167, 41);
this.addRecordButton.TabIndex = 26;
@@ -1017,10 +979,10 @@
this.taxableTabPage.ResumeLayout(false);
this.taxableTabPage.PerformLayout();
this.dateGroupBox.ResumeLayout(false);
this.dateGroupBox.PerformLayout();
this.dateTimeMaskedTextBoxPanel.ResumeLayout(false);
this.dateTimeMaskedTextBoxPanel.PerformLayout();
this.informationPanel.ResumeLayout(false);
this.informationPanel.PerformLayout();
this.ResumeLayout(false);
}
@@ -1088,11 +1050,8 @@
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage weeklySalesTabPage;
private System.Windows.Forms.TabPage taxableTabPage;
private System.Windows.Forms.Label monthCalendarInstructionsLabel;
private System.Windows.Forms.MonthCalendar weekEndingMonthCalendar;
private System.Windows.Forms.MonthCalendar weekEndingCalendar;
private System.Windows.Forms.Panel dateTimeMaskedTextBoxPanel;
private System.Windows.Forms.MaskedTextBox weekEndingMaskedTextBox;
private System.Windows.Forms.Label weekEndingMaskedTextBoxInstructionLabel;
private System.Windows.Forms.TabPage debugTabPage;
private System.Windows.Forms.Panel informationPanel;
private System.Windows.Forms.Label errorLabel;