Update MP4

This commit is contained in:
2022-11-17 17:00:33 -06:00
parent 1fdcdabcbe
commit 2be3b984a3
49 changed files with 329 additions and 128 deletions

View File

@@ -48,13 +48,13 @@
this.transmissionFlushCheckBox = new System.Windows.Forms.CheckBox();
this.radiatorFlushCheckBox = new System.Windows.Forms.CheckBox();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.laborInputTextBox = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.partsInputTextBox = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.clearButton = new System.Windows.Forms.Button();
this.exitButton = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
@@ -191,38 +191,38 @@
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(51, 101);
this.label6.Location = new System.Drawing.Point(48, 101);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(58, 15);
this.label6.Size = new System.Drawing.Size(61, 15);
this.label6.TabIndex = 3;
this.label6.Text = "Total Fees";
this.label6.Text = "Total Fees:";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(31, 72);
this.label5.Location = new System.Drawing.Point(28, 72);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(78, 15);
this.label5.Size = new System.Drawing.Size(81, 15);
this.label5.TabIndex = 2;
this.label5.Text = "Tax (on parts)";
this.label5.Text = "Tax (on parts):";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(76, 43);
this.label4.Location = new System.Drawing.Point(73, 43);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(33, 15);
this.label4.Size = new System.Drawing.Size(36, 15);
this.label4.TabIndex = 1;
this.label4.Text = "Parts";
this.label4.Text = "Parts:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(14, 19);
this.label3.Location = new System.Drawing.Point(11, 19);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(95, 15);
this.label3.Size = new System.Drawing.Size(98, 15);
this.label3.TabIndex = 0;
this.label3.Text = "Services && Labor";
this.label3.Text = "Services && Labor:";
//
// groupBox4
//
@@ -257,9 +257,9 @@
//
// groupBox5
//
this.groupBox5.Controls.Add(this.textBox2);
this.groupBox5.Controls.Add(this.laborInputTextBox);
this.groupBox5.Controls.Add(this.label2);
this.groupBox5.Controls.Add(this.textBox1);
this.groupBox5.Controls.Add(this.partsInputTextBox);
this.groupBox5.Controls.Add(this.label1);
this.groupBox5.Location = new System.Drawing.Point(218, 94);
this.groupBox5.Name = "groupBox5";
@@ -268,12 +268,12 @@
this.groupBox5.TabStop = false;
this.groupBox5.Text = "Parts and Labor";
//
// textBox2
// laborInputTextBox
//
this.textBox2.Location = new System.Drawing.Point(65, 45);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(100, 23);
this.textBox2.TabIndex = 3;
this.laborInputTextBox.Location = new System.Drawing.Point(65, 45);
this.laborInputTextBox.Name = "laborInputTextBox";
this.laborInputTextBox.Size = new System.Drawing.Size(100, 23);
this.laborInputTextBox.TabIndex = 3;
//
// label2
//
@@ -284,12 +284,12 @@
this.label2.TabIndex = 2;
this.label2.Text = "Labor ($)";
//
// textBox1
// partsInputTextBox
//
this.textBox1.Location = new System.Drawing.Point(65, 18);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100, 23);
this.textBox1.TabIndex = 1;
this.partsInputTextBox.Location = new System.Drawing.Point(65, 18);
this.partsInputTextBox.Name = "partsInputTextBox";
this.partsInputTextBox.Size = new System.Drawing.Size(100, 23);
this.partsInputTextBox.TabIndex = 1;
//
// label1
//
@@ -306,35 +306,35 @@
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(109, 33);
this.button1.TabIndex = 5;
this.button1.Text = "calculateButton";
this.button1.Text = "Calculate!";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.calculateButton_Click);
//
// button2
// clearButton
//
this.button2.Location = new System.Drawing.Point(163, 362);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(109, 33);
this.button2.TabIndex = 6;
this.button2.Text = "button2";
this.button2.UseVisualStyleBackColor = true;
this.clearButton.Location = new System.Drawing.Point(159, 362);
this.clearButton.Name = "clearButton";
this.clearButton.Size = new System.Drawing.Size(109, 33);
this.clearButton.TabIndex = 6;
this.clearButton.Text = "Clear";
this.clearButton.UseVisualStyleBackColor = true;
//
// button3
// exitButton
//
this.button3.Location = new System.Drawing.Point(309, 362);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(109, 33);
this.button3.TabIndex = 7;
this.button3.Text = "button3";
this.button3.UseVisualStyleBackColor = true;
this.exitButton.Location = new System.Drawing.Point(303, 362);
this.exitButton.Name = "exitButton";
this.exitButton.Size = new System.Drawing.Size(109, 33);
this.exitButton.TabIndex = 7;
this.exitButton.Text = "Exit";
this.exitButton.UseVisualStyleBackColor = true;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(428, 424);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.exitButton);
this.Controls.Add(this.clearButton);
this.Controls.Add(this.button1);
this.Controls.Add(this.groupBox5);
this.Controls.Add(this.groupBox4);
@@ -379,12 +379,12 @@
private CheckBox transmissionFlushCheckBox;
private CheckBox radiatorFlushCheckBox;
private GroupBox groupBox5;
private TextBox textBox2;
private TextBox laborInputTextBox;
private Label label2;
private TextBox textBox1;
private TextBox partsInputTextBox;
private Label label1;
private Button button1;
private Button button2;
private Button button3;
private Button clearButton;
private Button exitButton;
}
}

View File

@@ -51,32 +51,40 @@ namespace JoesAutomotive_CalebFontenot
}
return total;
}
private decimal TotalCharges()
{
decimal total = 0m;
total = OilLubeChanges(total);
total = FlushCharges(total);
total = MiscCharges(total);
return total;
}
private decimal TaxCharges()
private decimal TotalCharges()
{
decimal total = 0m;
total = OilLubeChanges(total);
total = FlushCharges(total);
total = MiscCharges(total);
total += OtherCharges();
return total;
}
private decimal TaxCharges()
{
decimal total = 0m;
total = MiscCharges(total);
decimal tax = total * 0.06m;
return tax;
}
private void calculateButton_Click(object sender, EventArgs e)
private decimal OtherCharges()
{
decimal partsCost, laborCost;
decimal.TryParse(partsInputTextBox.Text, out partsCost);
decimal.TryParse(laborInputTextBox.Text, out laborCost);
return partsCost + laborCost;
}
private void calculateButton_Click(object sender, EventArgs e)
{
decimal total = TotalCharges();
decimal tax = TaxCharges();
decimal outputOtherCharges = OtherCharges();
// Set textboxes
totalFeesTextBox.Text = total.ToString("c");
servicesAndLaborTextBox.Text = total.ToString("c");
totalFeesTextBox.Text = (total + tax + outputOtherCharges).ToString("c");
taxTextBox.Text = tax.ToString("c");
}
}
}
}