From 4fb1c8bfc9d7af5505fe1688720f4d9035ad8ee3 Mon Sep 17 00:00:00 2001 From: Amrit Panesar Date: Mon, 6 Apr 2015 01:41:58 -0700 Subject: [PATCH] holy hell batman! Signed-off-by: Amrit Panesar --- COM380/Project2/ICON_MoneyBag_Payroll.gif | Bin 0 -> 3071 bytes COM380/Project2/Project2/Form1.h | 697 +++++++++++++++++++--- 2 files changed, 622 insertions(+), 75 deletions(-) create mode 100644 COM380/Project2/ICON_MoneyBag_Payroll.gif diff --git a/COM380/Project2/ICON_MoneyBag_Payroll.gif b/COM380/Project2/ICON_MoneyBag_Payroll.gif new file mode 100644 index 0000000000000000000000000000000000000000..a95b010c1f291f3af76aa24b3b6aae6c9b872f8a GIT binary patch literal 3071 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 NDXEexNeKl206RM)A6WnZ literal 0 HcmV?d00001 diff --git a/COM380/Project2/Project2/Form1.h b/COM380/Project2/Project2/Form1.h index ef1cd42..8f2e6b0 100644 --- a/COM380/Project2/Project2/Form1.h +++ b/COM380/Project2/Project2/Form1.h @@ -37,7 +37,7 @@ namespace Project2 { private: System::Windows::Forms::GroupBox^ groupBox1; protected: private: System::Windows::Forms::MaskedTextBox^ maskedTextBox2; - private: System::Windows::Forms::MaskedTextBox^ maskedTextBox1; + private: System::Windows::Forms::Label^ label9; private: System::Windows::Forms::Label^ label8; private: System::Windows::Forms::TextBox^ textBox4; @@ -81,6 +81,34 @@ namespace Project2 { private: System::Windows::Forms::Label^ label11; private: System::Windows::Forms::Label^ label10; private: System::Windows::Forms::GroupBox^ groupBox4; + private: System::Windows::Forms::Button^ button1; + private: System::Windows::Forms::Button^ button2; + private: System::Windows::Forms::TextBox^ textBox8; + private: System::Windows::Forms::Label^ label23; + private: System::Windows::Forms::Label^ label22; + private: System::Windows::Forms::Label^ label21; + private: System::Windows::Forms::TextBox^ textBox7; + private: System::Windows::Forms::TextBox^ textBox6; + private: System::Windows::Forms::TextBox^ textBox5; + private: System::Windows::Forms::TextBox^ textBox1; + private: System::Windows::Forms::Label^ label20; + private: System::Windows::Forms::Label^ label19; + private: System::Windows::Forms::Label^ label37; + private: System::Windows::Forms::Label^ label36; + private: System::Windows::Forms::Label^ label35; + private: System::Windows::Forms::Label^ label34; + private: System::Windows::Forms::Label^ label33; + private: System::Windows::Forms::Label^ label32; + private: System::Windows::Forms::Label^ label31; + private: System::Windows::Forms::Label^ label30; + private: System::Windows::Forms::Label^ label29; + private: System::Windows::Forms::Label^ label28; + private: System::Windows::Forms::Label^ label27; + private: System::Windows::Forms::Label^ label26; + private: System::Windows::Forms::Label^ label25; + private: System::Windows::Forms::Label^ label24; + private: System::Windows::Forms::NumericUpDown^ numericUpDown1; + private: System::Windows::Forms::Button^ button3; private: /// @@ -96,8 +124,8 @@ namespace Project2 { void InitializeComponent(void) { this->groupBox1 = (gcnew System::Windows::Forms::GroupBox()); + this->numericUpDown1 = (gcnew System::Windows::Forms::NumericUpDown()); this->maskedTextBox2 = (gcnew System::Windows::Forms::MaskedTextBox()); - this->maskedTextBox1 = (gcnew System::Windows::Forms::MaskedTextBox()); this->label9 = (gcnew System::Windows::Forms::Label()); this->label8 = (gcnew System::Windows::Forms::Label()); this->textBox4 = (gcnew System::Windows::Forms::TextBox()); @@ -117,6 +145,21 @@ namespace Project2 { this->dateTimePicker2 = (gcnew System::Windows::Forms::DateTimePicker()); this->dateTimePicker1 = (gcnew System::Windows::Forms::DateTimePicker()); this->groupBox3 = (gcnew System::Windows::Forms::GroupBox()); + this->button3 = (gcnew System::Windows::Forms::Button()); + this->label37 = (gcnew System::Windows::Forms::Label()); + this->label36 = (gcnew System::Windows::Forms::Label()); + this->label35 = (gcnew System::Windows::Forms::Label()); + this->label34 = (gcnew System::Windows::Forms::Label()); + this->label33 = (gcnew System::Windows::Forms::Label()); + this->label32 = (gcnew System::Windows::Forms::Label()); + this->label31 = (gcnew System::Windows::Forms::Label()); + this->label30 = (gcnew System::Windows::Forms::Label()); + this->label29 = (gcnew System::Windows::Forms::Label()); + this->label28 = (gcnew System::Windows::Forms::Label()); + this->label27 = (gcnew System::Windows::Forms::Label()); + this->label26 = (gcnew System::Windows::Forms::Label()); + this->label25 = (gcnew System::Windows::Forms::Label()); + this->label24 = (gcnew System::Windows::Forms::Label()); this->label18 = (gcnew System::Windows::Forms::Label()); this->label17 = (gcnew System::Windows::Forms::Label()); this->label16 = (gcnew System::Windows::Forms::Label()); @@ -141,16 +184,30 @@ namespace Project2 { this->label11 = (gcnew System::Windows::Forms::Label()); this->label10 = (gcnew System::Windows::Forms::Label()); this->groupBox4 = (gcnew System::Windows::Forms::GroupBox()); + this->button2 = (gcnew System::Windows::Forms::Button()); + this->textBox8 = (gcnew System::Windows::Forms::TextBox()); + this->label23 = (gcnew System::Windows::Forms::Label()); + this->label22 = (gcnew System::Windows::Forms::Label()); + this->label21 = (gcnew System::Windows::Forms::Label()); + this->textBox7 = (gcnew System::Windows::Forms::TextBox()); + this->textBox6 = (gcnew System::Windows::Forms::TextBox()); + this->textBox5 = (gcnew System::Windows::Forms::TextBox()); + this->textBox1 = (gcnew System::Windows::Forms::TextBox()); + this->label20 = (gcnew System::Windows::Forms::Label()); + this->label19 = (gcnew System::Windows::Forms::Label()); + this->button1 = (gcnew System::Windows::Forms::Button()); this->groupBox1->SuspendLayout(); + (cli::safe_cast(this->numericUpDown1))->BeginInit(); this->menuStrip1->SuspendLayout(); this->groupBox2->SuspendLayout(); this->groupBox3->SuspendLayout(); + this->groupBox4->SuspendLayout(); this->SuspendLayout(); // // groupBox1 // + this->groupBox1->Controls->Add(this->numericUpDown1); this->groupBox1->Controls->Add(this->maskedTextBox2); - this->groupBox1->Controls->Add(this->maskedTextBox1); this->groupBox1->Controls->Add(this->label9); this->groupBox1->Controls->Add(this->label8); this->groupBox1->Controls->Add(this->textBox4); @@ -166,21 +223,25 @@ namespace Project2 { this->groupBox1->TabStop = false; this->groupBox1->Text = L"Employee Information"; // + // numericUpDown1 + // + this->numericUpDown1->DecimalPlaces = 2; + this->numericUpDown1->Location = System::Drawing::Point(100, 45); + this->numericUpDown1->Name = L"numericUpDown1"; + this->numericUpDown1->RightToLeft = System::Windows::Forms::RightToLeft::No; + this->numericUpDown1->Size = System::Drawing::Size(157, 20); + this->numericUpDown1->TabIndex = 1; + this->numericUpDown1->ThousandsSeparator = true; + this->numericUpDown1->Value = System::Decimal(gcnew cli::array< System::Int32 >(4) {1350, 0, 0, 131072}); + this->numericUpDown1->ValueChanged += gcnew System::EventHandler(this, &Form1::numericUpDown1_ValueChanged); + // // maskedTextBox2 // this->maskedTextBox2->Location = System::Drawing::Point(99, 19); this->maskedTextBox2->Mask = L"#############"; this->maskedTextBox2->Name = L"maskedTextBox2"; this->maskedTextBox2->Size = System::Drawing::Size(158, 20); - this->maskedTextBox2->TabIndex = 10; - // - // maskedTextBox1 - // - this->maskedTextBox1->Location = System::Drawing::Point(99, 44); - this->maskedTextBox1->Mask = L"$#####.##"; - this->maskedTextBox1->Name = L"maskedTextBox1"; - this->maskedTextBox1->Size = System::Drawing::Size(158, 20); - this->maskedTextBox1->TabIndex = 9; + this->maskedTextBox2->TabIndex = 0; // // label9 // @@ -188,7 +249,7 @@ namespace Project2 { this->label9->Location = System::Drawing::Point(9, 47); this->label9->Name = L"label9"; this->label9->Size = System::Drawing::Size(75, 13); - this->label9->TabIndex = 8; + this->label9->TabIndex = 101; this->label9->Text = L"Hourly Wage: "; // // label8 @@ -197,7 +258,7 @@ namespace Project2 { this->label8->Location = System::Drawing::Point(23, 143); this->label8->Name = L"label8"; this->label8->Size = System::Drawing::Size(61, 13); - this->label8->TabIndex = 7; + this->label8->TabIndex = 104; this->label8->Text = L"Last Name:"; // // textBox4 @@ -206,7 +267,7 @@ namespace Project2 { this->textBox4->MaxLength = 1; this->textBox4->Name = L"textBox4"; this->textBox4->Size = System::Drawing::Size(32, 20); - this->textBox4->TabIndex = 6; + this->textBox4->TabIndex = 3; // // label7 // @@ -214,7 +275,7 @@ namespace Project2 { this->label7->Location = System::Drawing::Point(14, 114); this->label7->Name = L"label7"; this->label7->Size = System::Drawing::Size(71, 13); - this->label7->TabIndex = 5; + this->label7->TabIndex = 103; this->label7->Text = L"Middle Initial: "; // // label6 @@ -223,7 +284,7 @@ namespace Project2 { this->label6->Location = System::Drawing::Point(21, 88); this->label6->Name = L"label6"; this->label6->Size = System::Drawing::Size(63, 13); - this->label6->TabIndex = 4; + this->label6->TabIndex = 102; this->label6->Text = L"First Name: "; // // textBox3 @@ -231,14 +292,14 @@ namespace Project2 { this->textBox3->Location = System::Drawing::Point(99, 85); this->textBox3->Name = L"textBox3"; this->textBox3->Size = System::Drawing::Size(158, 20); - this->textBox3->TabIndex = 3; + this->textBox3->TabIndex = 2; // // textBox2 // this->textBox2->Location = System::Drawing::Point(99, 140); this->textBox2->Name = L"textBox2"; this->textBox2->Size = System::Drawing::Size(158, 20); - this->textBox2->TabIndex = 2; + this->textBox2->TabIndex = 4; // // label1 // @@ -246,7 +307,7 @@ namespace Project2 { this->label1->Location = System::Drawing::Point(14, 19); this->label1->Name = L"label1"; this->label1->Size = System::Drawing::Size(70, 13); - this->label1->TabIndex = 0; + this->label1->TabIndex = 100; this->label1->Text = L"Employee ID:"; // // menuStrip1 @@ -268,8 +329,9 @@ namespace Project2 { // exitToolStripMenuItem // this->exitToolStripMenuItem->Name = L"exitToolStripMenuItem"; - this->exitToolStripMenuItem->Size = System::Drawing::Size(152, 22); + this->exitToolStripMenuItem->Size = System::Drawing::Size(92, 22); this->exitToolStripMenuItem->Text = L"E&xit"; + this->exitToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::exitToolStripMenuItem_Click); // // groupBox2 // @@ -279,10 +341,10 @@ namespace Project2 { this->groupBox2->Controls->Add(this->label2); this->groupBox2->Controls->Add(this->dateTimePicker2); this->groupBox2->Controls->Add(this->dateTimePicker1); - this->groupBox2->Location = System::Drawing::Point(293, 37); + this->groupBox2->Location = System::Drawing::Point(293, 27); this->groupBox2->Name = L"groupBox2"; - this->groupBox2->Size = System::Drawing::Size(398, 166); - this->groupBox2->TabIndex = 2; + this->groupBox2->Size = System::Drawing::Size(398, 176); + this->groupBox2->TabIndex = 1; this->groupBox2->TabStop = false; this->groupBox2->Text = L"Pay Period"; // @@ -292,7 +354,7 @@ namespace Project2 { this->label5->Location = System::Drawing::Point(276, 116); this->label5->Name = L"label5"; this->label5->Size = System::Drawing::Size(44, 13); - this->label5->TabIndex = 5; + this->label5->TabIndex = 108; this->label5->Text = L"15 days"; // // label4 @@ -301,7 +363,7 @@ namespace Project2 { this->label4->Location = System::Drawing::Point(206, 116); this->label4->Name = L"label4"; this->label4->Size = System::Drawing::Size(64, 13); - this->label4->TabIndex = 4; + this->label4->TabIndex = 107; this->label4->Text = L"Total Days: "; // // label3 @@ -310,7 +372,7 @@ namespace Project2 { this->label3->Location = System::Drawing::Point(64, 82); this->label3->Name = L"label3"; this->label3->Size = System::Drawing::Size(72, 13); - this->label3->TabIndex = 3; + this->label3->TabIndex = 106; this->label3->Text = L"Ending Date: "; // // label2 @@ -319,7 +381,7 @@ namespace Project2 { this->label2->Location = System::Drawing::Point(50, 56); this->label2->Name = L"label2"; this->label2->Size = System::Drawing::Size(86, 13); - this->label2->TabIndex = 2; + this->label2->TabIndex = 105; this->label2->Text = L"Beginning Date: "; // // dateTimePicker2 @@ -328,6 +390,8 @@ namespace Project2 { this->dateTimePicker2->Name = L"dateTimePicker2"; this->dateTimePicker2->Size = System::Drawing::Size(200, 20); this->dateTimePicker2->TabIndex = 1; + this->dateTimePicker2->Value = System::DateTime(2012, 1, 10, 0, 0, 0, 0); + this->dateTimePicker2->ValueChanged += gcnew System::EventHandler(this, &Form1::dateTimePicker2_ValueChanged); // // dateTimePicker1 // @@ -335,9 +399,26 @@ namespace Project2 { this->dateTimePicker1->Name = L"dateTimePicker1"; this->dateTimePicker1->Size = System::Drawing::Size(200, 20); this->dateTimePicker1->TabIndex = 0; + this->dateTimePicker1->Value = System::DateTime(2012, 8, 21, 0, 0, 0, 0); + this->dateTimePicker1->ValueChanged += gcnew System::EventHandler(this, &Form1::dateTimePicker1_ValueChanged); // // groupBox3 // + this->groupBox3->Controls->Add(this->button3); + this->groupBox3->Controls->Add(this->label37); + this->groupBox3->Controls->Add(this->label36); + this->groupBox3->Controls->Add(this->label35); + this->groupBox3->Controls->Add(this->label34); + this->groupBox3->Controls->Add(this->label33); + this->groupBox3->Controls->Add(this->label32); + this->groupBox3->Controls->Add(this->label31); + this->groupBox3->Controls->Add(this->label30); + this->groupBox3->Controls->Add(this->label29); + this->groupBox3->Controls->Add(this->label28); + this->groupBox3->Controls->Add(this->label27); + this->groupBox3->Controls->Add(this->label26); + this->groupBox3->Controls->Add(this->label25); + this->groupBox3->Controls->Add(this->label24); this->groupBox3->Controls->Add(this->label18); this->groupBox3->Controls->Add(this->label17); this->groupBox3->Controls->Add(this->label16); @@ -364,72 +445,208 @@ namespace Project2 { this->groupBox3->Location = System::Drawing::Point(12, 209); this->groupBox3->Name = L"groupBox3"; this->groupBox3->Size = System::Drawing::Size(679, 159); - this->groupBox3->TabIndex = 3; + this->groupBox3->TabIndex = 2; this->groupBox3->TabStop = false; this->groupBox3->Text = L"Time Card"; // + // button3 + // + this->button3->Location = System::Drawing::Point(12, 30); + this->button3->Name = L"button3"; + this->button3->Size = System::Drawing::Size(75, 23); + this->button3->TabIndex = 123; + this->button3->Text = L"&Reset"; + this->button3->UseVisualStyleBackColor = true; + this->button3->Click += gcnew System::EventHandler(this, &Form1::button3_Click); + // + // label37 + // + this->label37->Location = System::Drawing::Point(553, 105); + this->label37->Name = L"label37"; + this->label37->Size = System::Drawing::Size(70, 13); + this->label37->TabIndex = 122; + this->label37->Text = L"09/05"; + this->label37->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; + // + // label36 + // + this->label36->Location = System::Drawing::Point(477, 105); + this->label36->Name = L"label36"; + this->label36->Size = System::Drawing::Size(70, 13); + this->label36->TabIndex = 121; + this->label36->Text = L"09/04"; + this->label36->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; + // + // label35 + // + this->label35->Location = System::Drawing::Point(401, 105); + this->label35->Name = L"label35"; + this->label35->Size = System::Drawing::Size(70, 13); + this->label35->TabIndex = 120; + this->label35->Text = L"09/03"; + this->label35->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; + // + // label34 + // + this->label34->Location = System::Drawing::Point(325, 105); + this->label34->Name = L"label34"; + this->label34->Size = System::Drawing::Size(70, 13); + this->label34->TabIndex = 119; + this->label34->Text = L"09/02"; + this->label34->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; + // + // label33 + // + this->label33->Location = System::Drawing::Point(249, 105); + this->label33->Name = L"label33"; + this->label33->Size = System::Drawing::Size(70, 13); + this->label33->TabIndex = 118; + this->label33->Text = L"09/01"; + this->label33->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; + // + // label32 + // + this->label32->Location = System::Drawing::Point(173, 105); + this->label32->Name = L"label32"; + this->label32->Size = System::Drawing::Size(70, 13); + this->label32->TabIndex = 117; + this->label32->Text = L"08/30"; + this->label32->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; + // + // label31 + // + this->label31->Location = System::Drawing::Point(97, 105); + this->label31->Name = L"label31"; + this->label31->Size = System::Drawing::Size(70, 13); + this->label31->TabIndex = 116; + this->label31->Text = L"08/29"; + this->label31->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; + // + // label30 + // + this->label30->Location = System::Drawing::Point(553, 50); + this->label30->Name = L"label30"; + this->label30->Size = System::Drawing::Size(70, 13); + this->label30->TabIndex = 115; + this->label30->Text = L"08/28"; + this->label30->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; + // + // label29 + // + this->label29->Location = System::Drawing::Point(477, 50); + this->label29->Name = L"label29"; + this->label29->Size = System::Drawing::Size(70, 13); + this->label29->TabIndex = 114; + this->label29->Text = L"08/27"; + this->label29->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; + // + // label28 + // + this->label28->Location = System::Drawing::Point(401, 50); + this->label28->Name = L"label28"; + this->label28->Size = System::Drawing::Size(70, 13); + this->label28->TabIndex = 113; + this->label28->Text = L"08/25"; + this->label28->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; + // + // label27 + // + this->label27->Location = System::Drawing::Point(325, 50); + this->label27->Name = L"label27"; + this->label27->Size = System::Drawing::Size(70, 13); + this->label27->TabIndex = 112; + this->label27->Text = L"08/24"; + this->label27->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; + // + // label26 + // + this->label26->Location = System::Drawing::Point(249, 50); + this->label26->Name = L"label26"; + this->label26->Size = System::Drawing::Size(70, 13); + this->label26->TabIndex = 111; + this->label26->Text = L"08/23"; + this->label26->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; + // + // label25 + // + this->label25->Location = System::Drawing::Point(173, 50); + this->label25->Name = L"label25"; + this->label25->Size = System::Drawing::Size(70, 13); + this->label25->TabIndex = 110; + this->label25->Text = L"08/22"; + this->label25->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; + // + // label24 + // + this->label24->Location = System::Drawing::Point(97, 50); + this->label24->Name = L"label24"; + this->label24->Size = System::Drawing::Size(70, 13); + this->label24->TabIndex = 109; + this->label24->Text = L"08/21"; + this->label24->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; + // // label18 // - this->label18->AutoSize = true; - this->label18->Location = System::Drawing::Point(565, 15); + this->label18->Location = System::Drawing::Point(553, 15); this->label18->Name = L"label18"; - this->label18->Size = System::Drawing::Size(43, 13); - this->label18->TabIndex = 19; + this->label18->Size = System::Drawing::Size(70, 13); + this->label18->TabIndex = 106; this->label18->Text = L"Sunday"; + this->label18->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; // // label17 // - this->label17->AutoSize = true; - this->label17->Location = System::Drawing::Point(484, 15); + this->label17->Location = System::Drawing::Point(477, 15); this->label17->Name = L"label17"; - this->label17->Size = System::Drawing::Size(49, 13); - this->label17->TabIndex = 18; + this->label17->Size = System::Drawing::Size(70, 13); + this->label17->TabIndex = 105; this->label17->Text = L"Saturday"; + this->label17->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; // // label16 // - this->label16->AutoSize = true; - this->label16->Location = System::Drawing::Point(416, 15); + this->label16->Location = System::Drawing::Point(401, 15); this->label16->Name = L"label16"; - this->label16->Size = System::Drawing::Size(35, 13); - this->label16->TabIndex = 18; + this->label16->Size = System::Drawing::Size(70, 13); + this->label16->TabIndex = 104; this->label16->Text = L"Friday"; + this->label16->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; // // label15 // - this->label15->AutoSize = true; - this->label15->Location = System::Drawing::Point(331, 15); + this->label15->Location = System::Drawing::Point(325, 15); this->label15->Name = L"label15"; - this->label15->Size = System::Drawing::Size(51, 13); - this->label15->TabIndex = 18; + this->label15->Size = System::Drawing::Size(70, 13); + this->label15->TabIndex = 103; this->label15->Text = L"Thursday"; + this->label15->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; // // label14 // - this->label14->AutoSize = true; - this->label14->Location = System::Drawing::Point(253, 15); + this->label14->Location = System::Drawing::Point(249, 15); this->label14->Name = L"label14"; - this->label14->Size = System::Drawing::Size(64, 13); - this->label14->TabIndex = 18; + this->label14->Size = System::Drawing::Size(70, 13); + this->label14->TabIndex = 102; this->label14->Text = L"Wednesday"; + this->label14->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; // // label13 // - this->label13->AutoSize = true; - this->label13->Location = System::Drawing::Point(182, 15); + this->label13->Location = System::Drawing::Point(173, 15); this->label13->Name = L"label13"; - this->label13->Size = System::Drawing::Size(48, 13); - this->label13->TabIndex = 17; + this->label13->Size = System::Drawing::Size(70, 13); + this->label13->TabIndex = 101; this->label13->Text = L"Tuesday"; + this->label13->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; // // label12 // - this->label12->AutoSize = true; - this->label12->Location = System::Drawing::Point(109, 15); + this->label12->Location = System::Drawing::Point(97, 15); this->label12->Name = L"label12"; - this->label12->Size = System::Drawing::Size(45, 13); - this->label12->TabIndex = 16; + this->label12->Size = System::Drawing::Size(70, 13); + this->label12->TabIndex = 100; this->label12->Text = L"Monday"; + this->label12->TextAlign = System::Drawing::ContentAlignment::MiddleCenter; // // maskedTextBox16 // @@ -437,7 +654,9 @@ namespace Project2 { this->maskedTextBox16->Mask = L"##.##"; this->maskedTextBox16->Name = L"maskedTextBox16"; this->maskedTextBox16->Size = System::Drawing::Size(70, 20); - this->maskedTextBox16->TabIndex = 15; + this->maskedTextBox16->TabIndex = 13; + this->maskedTextBox16->TextChanged += gcnew System::EventHandler(this, &Form1::maskedText_TextChanged); + this->maskedTextBox16->Enter += gcnew System::EventHandler(this, &Form1::maskedTextBox_Enter); // // maskedTextBox15 // @@ -445,7 +664,9 @@ namespace Project2 { this->maskedTextBox15->Mask = L"##.##"; this->maskedTextBox15->Name = L"maskedTextBox15"; this->maskedTextBox15->Size = System::Drawing::Size(70, 20); - this->maskedTextBox15->TabIndex = 14; + this->maskedTextBox15->TabIndex = 12; + this->maskedTextBox15->TextChanged += gcnew System::EventHandler(this, &Form1::maskedText_TextChanged); + this->maskedTextBox15->Enter += gcnew System::EventHandler(this, &Form1::maskedTextBox_Enter); // // maskedTextBox14 // @@ -453,7 +674,9 @@ namespace Project2 { this->maskedTextBox14->Mask = L"##.##"; this->maskedTextBox14->Name = L"maskedTextBox14"; this->maskedTextBox14->Size = System::Drawing::Size(70, 20); - this->maskedTextBox14->TabIndex = 13; + this->maskedTextBox14->TabIndex = 11; + this->maskedTextBox14->TextChanged += gcnew System::EventHandler(this, &Form1::maskedText_TextChanged); + this->maskedTextBox14->Enter += gcnew System::EventHandler(this, &Form1::maskedTextBox_Enter); // // maskedTextBox13 // @@ -461,7 +684,9 @@ namespace Project2 { this->maskedTextBox13->Mask = L"##.##"; this->maskedTextBox13->Name = L"maskedTextBox13"; this->maskedTextBox13->Size = System::Drawing::Size(70, 20); - this->maskedTextBox13->TabIndex = 12; + this->maskedTextBox13->TabIndex = 10; + this->maskedTextBox13->TextChanged += gcnew System::EventHandler(this, &Form1::maskedText_TextChanged); + this->maskedTextBox13->Enter += gcnew System::EventHandler(this, &Form1::maskedTextBox_Enter); // // maskedTextBox12 // @@ -469,7 +694,9 @@ namespace Project2 { this->maskedTextBox12->Mask = L"##.##"; this->maskedTextBox12->Name = L"maskedTextBox12"; this->maskedTextBox12->Size = System::Drawing::Size(70, 20); - this->maskedTextBox12->TabIndex = 11; + this->maskedTextBox12->TabIndex = 9; + this->maskedTextBox12->TextChanged += gcnew System::EventHandler(this, &Form1::maskedText_TextChanged); + this->maskedTextBox12->Enter += gcnew System::EventHandler(this, &Form1::maskedTextBox_Enter); // // maskedTextBox11 // @@ -477,7 +704,9 @@ namespace Project2 { this->maskedTextBox11->Mask = L"##.##"; this->maskedTextBox11->Name = L"maskedTextBox11"; this->maskedTextBox11->Size = System::Drawing::Size(70, 20); - this->maskedTextBox11->TabIndex = 10; + this->maskedTextBox11->TabIndex = 8; + this->maskedTextBox11->TextChanged += gcnew System::EventHandler(this, &Form1::maskedText_TextChanged); + this->maskedTextBox11->Enter += gcnew System::EventHandler(this, &Form1::maskedTextBox_Enter); // // maskedTextBox10 // @@ -485,7 +714,9 @@ namespace Project2 { this->maskedTextBox10->Mask = L"##.##"; this->maskedTextBox10->Name = L"maskedTextBox10"; this->maskedTextBox10->Size = System::Drawing::Size(70, 20); - this->maskedTextBox10->TabIndex = 9; + this->maskedTextBox10->TabIndex = 7; + this->maskedTextBox10->TextChanged += gcnew System::EventHandler(this, &Form1::maskedText_TextChanged); + this->maskedTextBox10->Enter += gcnew System::EventHandler(this, &Form1::maskedTextBox_Enter); // // maskedTextBox9 // @@ -493,7 +724,9 @@ namespace Project2 { this->maskedTextBox9->Mask = L"##.##"; this->maskedTextBox9->Name = L"maskedTextBox9"; this->maskedTextBox9->Size = System::Drawing::Size(70, 20); - this->maskedTextBox9->TabIndex = 8; + this->maskedTextBox9->TabIndex = 6; + this->maskedTextBox9->TextChanged += gcnew System::EventHandler(this, &Form1::maskedText_TextChanged); + this->maskedTextBox9->Enter += gcnew System::EventHandler(this, &Form1::maskedTextBox_Enter); // // maskedTextBox8 // @@ -501,7 +734,9 @@ namespace Project2 { this->maskedTextBox8->Mask = L"##.##"; this->maskedTextBox8->Name = L"maskedTextBox8"; this->maskedTextBox8->Size = System::Drawing::Size(70, 20); - this->maskedTextBox8->TabIndex = 7; + this->maskedTextBox8->TabIndex = 5; + this->maskedTextBox8->TextChanged += gcnew System::EventHandler(this, &Form1::maskedText_TextChanged); + this->maskedTextBox8->Enter += gcnew System::EventHandler(this, &Form1::maskedTextBox_Enter); // // maskedTextBox7 // @@ -509,7 +744,9 @@ namespace Project2 { this->maskedTextBox7->Mask = L"##.##"; this->maskedTextBox7->Name = L"maskedTextBox7"; this->maskedTextBox7->Size = System::Drawing::Size(70, 20); - this->maskedTextBox7->TabIndex = 6; + this->maskedTextBox7->TabIndex = 4; + this->maskedTextBox7->TextChanged += gcnew System::EventHandler(this, &Form1::maskedText_TextChanged); + this->maskedTextBox7->Enter += gcnew System::EventHandler(this, &Form1::maskedTextBox_Enter); // // maskedTextBox6 // @@ -517,7 +754,9 @@ namespace Project2 { this->maskedTextBox6->Mask = L"##.##"; this->maskedTextBox6->Name = L"maskedTextBox6"; this->maskedTextBox6->Size = System::Drawing::Size(70, 20); - this->maskedTextBox6->TabIndex = 5; + this->maskedTextBox6->TabIndex = 3; + this->maskedTextBox6->TextChanged += gcnew System::EventHandler(this, &Form1::maskedText_TextChanged); + this->maskedTextBox6->Enter += gcnew System::EventHandler(this, &Form1::maskedTextBox_Enter); // // maskedTextBox5 // @@ -525,7 +764,9 @@ namespace Project2 { this->maskedTextBox5->Mask = L"##.##"; this->maskedTextBox5->Name = L"maskedTextBox5"; this->maskedTextBox5->Size = System::Drawing::Size(70, 20); - this->maskedTextBox5->TabIndex = 4; + this->maskedTextBox5->TabIndex = 2; + this->maskedTextBox5->TextChanged += gcnew System::EventHandler(this, &Form1::maskedText_TextChanged); + this->maskedTextBox5->Enter += gcnew System::EventHandler(this, &Form1::maskedTextBox_Enter); // // maskedTextBox4 // @@ -533,7 +774,9 @@ namespace Project2 { this->maskedTextBox4->Mask = L"##.##"; this->maskedTextBox4->Name = L"maskedTextBox4"; this->maskedTextBox4->Size = System::Drawing::Size(70, 20); - this->maskedTextBox4->TabIndex = 3; + this->maskedTextBox4->TabIndex = 1; + this->maskedTextBox4->TextChanged += gcnew System::EventHandler(this, &Form1::maskedText_TextChanged); + this->maskedTextBox4->Enter += gcnew System::EventHandler(this, &Form1::maskedTextBox_Enter); // // maskedTextBox3 // @@ -541,7 +784,9 @@ namespace Project2 { this->maskedTextBox3->Mask = L"##.##"; this->maskedTextBox3->Name = L"maskedTextBox3"; this->maskedTextBox3->Size = System::Drawing::Size(70, 20); - this->maskedTextBox3->TabIndex = 2; + this->maskedTextBox3->TabIndex = 0; + this->maskedTextBox3->TextChanged += gcnew System::EventHandler(this, &Form1::maskedText_TextChanged); + this->maskedTextBox3->Enter += gcnew System::EventHandler(this, &Form1::maskedTextBox_Enter); // // label11 // @@ -549,7 +794,7 @@ namespace Project2 { this->label11->Location = System::Drawing::Point(9, 124); this->label11->Name = L"label11"; this->label11->Size = System::Drawing::Size(82, 13); - this->label11->TabIndex = 1; + this->label11->TabIndex = 108; this->label11->Text = L"Second Week: "; // // label10 @@ -558,48 +803,350 @@ namespace Project2 { this->label10->Location = System::Drawing::Point(27, 69); this->label10->Name = L"label10"; this->label10->Size = System::Drawing::Size(64, 13); - this->label10->TabIndex = 0; + this->label10->TabIndex = 107; this->label10->Text = L"First Week: "; // // groupBox4 // + this->groupBox4->Controls->Add(this->button2); + this->groupBox4->Controls->Add(this->textBox8); + this->groupBox4->Controls->Add(this->label23); + this->groupBox4->Controls->Add(this->label22); + this->groupBox4->Controls->Add(this->label21); + this->groupBox4->Controls->Add(this->textBox7); + this->groupBox4->Controls->Add(this->textBox6); + this->groupBox4->Controls->Add(this->textBox5); + this->groupBox4->Controls->Add(this->textBox1); + this->groupBox4->Controls->Add(this->label20); + this->groupBox4->Controls->Add(this->label19); + this->groupBox4->Controls->Add(this->button1); this->groupBox4->Location = System::Drawing::Point(12, 374); this->groupBox4->Name = L"groupBox4"; this->groupBox4->Size = System::Drawing::Size(679, 120); - this->groupBox4->TabIndex = 4; + this->groupBox4->TabIndex = 3; this->groupBox4->TabStop = false; this->groupBox4->Text = L"Payroll Processing"; // + // button2 + // + this->button2->DialogResult = System::Windows::Forms::DialogResult::Cancel; + this->button2->Location = System::Drawing::Point(548, 73); + this->button2->Name = L"button2"; + this->button2->Size = System::Drawing::Size(75, 23); + this->button2->TabIndex = 1; + this->button2->Text = L"&Close"; + this->button2->UseVisualStyleBackColor = true; + this->button2->Click += gcnew System::EventHandler(this, &Form1::button2_Click); + // + // textBox8 + // + this->textBox8->Location = System::Drawing::Point(527, 42); + this->textBox8->Name = L"textBox8"; + this->textBox8->ReadOnly = true; + this->textBox8->Size = System::Drawing::Size(100, 20); + this->textBox8->TabIndex = 6; + this->textBox8->TabStop = false; + this->textBox8->Text = L"$0.00"; + // + // label23 + // + this->label23->AutoSize = true; + this->label23->Location = System::Drawing::Point(443, 45); + this->label23->Name = L"label23"; + this->label23->Size = System::Drawing::Size(78, 13); + this->label23->TabIndex = 104; + this->label23->Text = L"Total Earnings:"; + // + // label22 + // + this->label22->AutoSize = true; + this->label22->Location = System::Drawing::Point(341, 23); + this->label22->Name = L"label22"; + this->label22->Size = System::Drawing::Size(43, 13); + this->label22->TabIndex = 103; + this->label22->Text = L"Amount"; + // + // label21 + // + this->label21->AutoSize = true; + this->label21->Location = System::Drawing::Point(204, 23); + this->label21->Name = L"label21"; + this->label21->Size = System::Drawing::Size(35, 13); + this->label21->TabIndex = 102; + this->label21->Text = L"Hours"; + // + // textBox7 + // + this->textBox7->Location = System::Drawing::Point(317, 70); + this->textBox7->Name = L"textBox7"; + this->textBox7->ReadOnly = true; + this->textBox7->Size = System::Drawing::Size(100, 20); + this->textBox7->TabIndex = 5; + this->textBox7->TabStop = false; + this->textBox7->Text = L"$0.00"; + // + // textBox6 + // + this->textBox6->Location = System::Drawing::Point(317, 42); + this->textBox6->Name = L"textBox6"; + this->textBox6->ReadOnly = true; + this->textBox6->Size = System::Drawing::Size(100, 20); + this->textBox6->TabIndex = 4; + this->textBox6->TabStop = false; + this->textBox6->Text = L"$0.00"; + // + // textBox5 + // + this->textBox5->Location = System::Drawing::Point(178, 70); + this->textBox5->Name = L"textBox5"; + this->textBox5->ReadOnly = true; + this->textBox5->Size = System::Drawing::Size(100, 20); + this->textBox5->TabIndex = 3; + this->textBox5->TabStop = false; + this->textBox5->Text = L"0.00"; + // + // textBox1 + // + this->textBox1->Location = System::Drawing::Point(178, 42); + this->textBox1->Name = L"textBox1"; + this->textBox1->ReadOnly = true; + this->textBox1->Size = System::Drawing::Size(100, 20); + this->textBox1->TabIndex = 2; + this->textBox1->TabStop = false; + this->textBox1->Text = L"0.00"; + // + // label20 + // + this->label20->AutoSize = true; + this->label20->Location = System::Drawing::Point(120, 73); + this->label20->Name = L"label20"; + this->label20->Size = System::Drawing::Size(52, 13); + this->label20->TabIndex = 101; + this->label20->Text = L"Overtime:"; + // + // label19 + // + this->label19->AutoSize = true; + this->label19->Location = System::Drawing::Point(125, 45); + this->label19->Name = L"label19"; + this->label19->Size = System::Drawing::Size(47, 13); + this->label19->TabIndex = 100; + this->label19->Text = L"Regular:"; + // + // button1 + // + this->button1->DialogResult = System::Windows::Forms::DialogResult::Cancel; + this->button1->Location = System::Drawing::Point(12, 53); + this->button1->Name = L"button1"; + this->button1->Size = System::Drawing::Size(75, 23); + this->button1->TabIndex = 0; + this->button1->Text = L"&Process"; + this->button1->UseVisualStyleBackColor = true; + // // Form1 // + this->AcceptButton = this->button1; this->AutoScaleDimensions = System::Drawing::SizeF(6, 13); this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; + this->CancelButton = this->button2; this->ClientSize = System::Drawing::Size(703, 506); this->Controls->Add(this->groupBox4); this->Controls->Add(this->groupBox3); this->Controls->Add(this->groupBox2); this->Controls->Add(this->groupBox1); this->Controls->Add(this->menuStrip1); + this->FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedSingle; this->MainMenuStrip = this->menuStrip1; + this->MaximizeBox = false; + this->MinimizeBox = false; this->Name = L"Form1"; - this->Text = L"Form1"; + this->Text = L"Employee Payroll"; this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load); this->groupBox1->ResumeLayout(false); this->groupBox1->PerformLayout(); + (cli::safe_cast(this->numericUpDown1))->EndInit(); this->menuStrip1->ResumeLayout(false); this->menuStrip1->PerformLayout(); this->groupBox2->ResumeLayout(false); this->groupBox2->PerformLayout(); this->groupBox3->ResumeLayout(false); this->groupBox3->PerformLayout(); + this->groupBox4->ResumeLayout(false); + this->groupBox4->PerformLayout(); this->ResumeLayout(false); this->PerformLayout(); } #pragma endregion + + + private: System::Collections::ArrayList dayLabels; + private: System::Collections::ArrayList dateLabels; + private: System::Collections::ArrayList hourTextBoxes; + private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { + //initalize day of week labels + dayLabels.Add(label12); + dayLabels.Add(label13); + dayLabels.Add(label14); + dayLabels.Add(label15); + dayLabels.Add(label16); + dayLabels.Add(label17); + dayLabels.Add(label18); + + //initalize date labels + dateLabels.Add(label24); + dateLabels.Add(label25); + dateLabels.Add(label26); + dateLabels.Add(label27); + dateLabels.Add(label28); + dateLabels.Add(label29); + dateLabels.Add(label30); + dateLabels.Add(label31); + dateLabels.Add(label32); + dateLabels.Add(label33); + dateLabels.Add(label34); + dateLabels.Add(label35); + dateLabels.Add(label36); + dateLabels.Add(label37); + + //initalize hour boxes + hourTextBoxes.Add(maskedTextBox3); + hourTextBoxes.Add(maskedTextBox4); + hourTextBoxes.Add(maskedTextBox5); + hourTextBoxes.Add(maskedTextBox6); + hourTextBoxes.Add(maskedTextBox7); + hourTextBoxes.Add(maskedTextBox8); + hourTextBoxes.Add(maskedTextBox9); + hourTextBoxes.Add(maskedTextBox10); + hourTextBoxes.Add(maskedTextBox11); + hourTextBoxes.Add(maskedTextBox12); + hourTextBoxes.Add(maskedTextBox13); + hourTextBoxes.Add(maskedTextBox14); + hourTextBoxes.Add(maskedTextBox15); + hourTextBoxes.Add(maskedTextBox16); + + // initialize todays date + DateTime today = DateTime::Now; + DateTime set1 = DateTime::Now; + DateTime set2 = DateTime::Now; + if (today.Day <= 15) // if today is the 15th, we're still in the first pay period + { + set1 = DateTime(today.Year, today.Month, 1); + set2 = DateTime(today.Year, today.Month, 15); + } + else + { + // 16th to the End of the month + set1 = DateTime(today.Year, today.Month, 16); + set2 = DateTime(today.Year, today.Month, DateTime::DaysInMonth(today.Year, today.Month)); + } + // now set it + dateTimePicker1->Value = set1; + dateTimePicker2->Value = set2; + + // and label it + label5->Text = (set2.Day - set1.Day) + 1 + " days"; } + +private: System::Void exitToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) + { + Application::Exit(); + } +private: System::Void dateTimePicker1_ValueChanged(System::Object^ sender, System::EventArgs^ e) + { + DateTime set1 = dateTimePicker1->Value; + DateTime set2 = dateTimePicker2->Value; + label5->Text = (set2.Day - set1.Day) + 1 + " days"; + DateTime helper = set1; + Label^ hold; + for (int i = 0; i < dayLabels.Count; i++) + { + hold = safe_cast(dayLabels[i]); + hold->Text = helper.DayOfWeek.ToString(); + helper = helper.AddDays(1); + } + + helper = set1; + for (int i = 0; i < dateLabels.Count; i++) + { + hold = safe_cast(dateLabels[i]); + hold->Text = helper.Month + "/" + helper.Day; + helper = helper.AddDays(1); + } + } +private: System::Void dateTimePicker2_ValueChanged(System::Object^ sender, System::EventArgs^ e) + { + DateTime set1 = dateTimePicker1->Value; + DateTime set2 = dateTimePicker2->Value; + label5->Text = (set2.Day - set1.Day) + 1 + " days"; + } +private: System::Void button2_Click(System::Object^ sender, System::EventArgs^ e) + { + Application::Exit(); + } +private: System::Void update_hours() + { + Decimal hours = 0; + Decimal tryHours = 0; + + MaskedTextBox^ hold; + for (int i = 0; i < hourTextBoxes.Count; i++) + { + hold = safe_cast(hourTextBoxes[i]); + Decimal::TryParse(hold->Text, tryHours); + hours += tryHours; + } + Decimal overtime = hours - 80; + if (overtime > 0) + { + hours = 80; + } + else + { + overtime = 0; + } + + textBox1->Text = String::Format("{0:00.00}", hours); + textBox5->Text = String::Format("{0:00.00}", overtime); + + Decimal wage = 0; + Decimal::TryParse(numericUpDown1->Text, wage); + Decimal calcWage = wage * hours; + textBox6->Text = String::Format("{0:C2}", calcWage ); + Decimal calcOverTime = overtime * hours * (Decimal)1.5; + textBox7->Text = String::Format("{0:C2}", calcOverTime); + + Decimal total = calcWage = calcOverTime; + textBox8->Text = String::Format("{0:C2}", total); + + } + +private: System::Void maskedText_TextChanged(System::Object^ sender, System::EventArgs^ e) + { + update_hours(); + } +private: System::Void maskedTextBox_Enter(System::Object^ sender, System::EventArgs^ e) + { + MaskedTextBox^ hold; + hold = safe_cast(sender); + hold->SelectionStart = 0; + hold->SelectionLength = hold->Text->Length; + } +private: System::Void button3_Click(System::Object^ sender, System::EventArgs^ e) + { + MaskedTextBox^ hold; + for(int i = 0; i < hourTextBoxes.Count; i++) + { + hold = safe_cast(hourTextBoxes[i]); + hold->Text = ""; + } + } +private: System::Void numericUpDown1_ValueChanged(System::Object^ sender, System::EventArgs^ e) + { + update_hours() + } }; }