├── .gitattributes ├── EmployeeManagementSystem ├── .vs │ └── EmployeeManagementSystem │ │ └── v16 │ │ └── .suo ├── EmployeeManagementSystem.sln └── EmployeeManagementSystem │ ├── AddEmployee.Designer.cs │ ├── AddEmployee.cs │ ├── AddEmployee.resx │ ├── App.config │ ├── Assets │ ├── icons8_Salary_male_30px.png │ ├── icons8_commercial_development_management_60px.png │ ├── icons8_dashboard_30px.png │ ├── icons8_employee_card_100px.png │ ├── icons8_employee_card_30px.png │ ├── icons8_employee_card_60px_1.png │ ├── icons8_group_background_selected_60px.png │ ├── icons8_group_background_selected_filled_60px.png │ └── icons8_logout_rounded_up_filled_25px.png │ ├── Dashboard.Designer.cs │ ├── Dashboard.cs │ ├── Dashboard.resx │ ├── Directory │ ├── EMID-01.jpg │ └── EMID-02.jpg │ ├── EmployeeData.cs │ ├── EmployeeManagementSystem.csproj │ ├── Form1.Designer.cs │ ├── Form1.cs │ ├── Form1.resx │ ├── MainForm.Designer.cs │ ├── MainForm.cs │ ├── MainForm.resx │ ├── Program.cs │ ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings │ ├── RegisterForm.Designer.cs │ ├── RegisterForm.cs │ ├── RegisterForm.resx │ ├── Resources │ └── pexels-jane-doan-1024248.jpg │ ├── Salary.Designer.cs │ ├── Salary.cs │ ├── Salary.resx │ ├── SalaryData.cs │ ├── bin │ └── Debug │ │ ├── EmployeeManagementSystem.exe │ │ ├── EmployeeManagementSystem.exe.config │ │ └── EmployeeManagementSystem.pdb │ └── obj │ └── Debug │ ├── .NETFramework,Version=v4.7.2.AssemblyAttributes.cs │ ├── DesignTimeResolveAssemblyReferences.cache │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ ├── EmployeeManagementSystem.AddEmployee.resources │ ├── EmployeeManagementSystem.Dashboard.resources │ ├── EmployeeManagementSystem.Form1.resources │ ├── EmployeeManagementSystem.MainForm.resources │ ├── EmployeeManagementSystem.Properties.Resources.resources │ ├── EmployeeManagementSystem.RegisterForm.resources │ ├── EmployeeManagementSystem.Salary.resources │ ├── EmployeeManagementSystem.csproj.AssemblyReference.cache │ ├── EmployeeManagementSystem.csproj.CoreCompileInputs.cache │ ├── EmployeeManagementSystem.csproj.FileListAbsolute.txt │ ├── EmployeeManagementSystem.csproj.GenerateResource.cache │ ├── EmployeeManagementSystem.exe │ ├── EmployeeManagementSystem.pdb │ └── TempPE │ └── Properties.Resources.Designer.cs.dll ├── README.md └── gitattributes /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/.vs/EmployeeManagementSystem/v16/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/.vs/EmployeeManagementSystem/v16/.suo -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.32901.82 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EmployeeManagementSystem", "EmployeeManagementSystem\EmployeeManagementSystem.csproj", "{6C7DAF6B-9712-48EE-B405-C746F1E3043D}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {6C7DAF6B-9712-48EE-B405-C746F1E3043D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {6C7DAF6B-9712-48EE-B405-C746F1E3043D}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {6C7DAF6B-9712-48EE-B405-C746F1E3043D}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {6C7DAF6B-9712-48EE-B405-C746F1E3043D}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {5A66CD00-6526-4E1B-8FA9-E7DCD9808D9F} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/AddEmployee.Designer.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace EmployeeManagementSystem 3 | { 4 | partial class AddEmployee 5 | { 6 | /// 7 | /// Required designer variable. 8 | /// 9 | private System.ComponentModel.IContainer components = null; 10 | 11 | /// 12 | /// Clean up any resources being used. 13 | /// 14 | /// true if managed resources should be disposed; otherwise, false. 15 | protected override void Dispose(bool disposing) 16 | { 17 | if (disposing && (components != null)) 18 | { 19 | components.Dispose(); 20 | } 21 | base.Dispose(disposing); 22 | } 23 | 24 | #region Component Designer generated code 25 | 26 | /// 27 | /// Required method for Designer support - do not modify 28 | /// the contents of this method with the code editor. 29 | /// 30 | private void InitializeComponent() 31 | { 32 | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); 33 | this.panel1 = new System.Windows.Forms.Panel(); 34 | this.dataGridView1 = new System.Windows.Forms.DataGridView(); 35 | this.label1 = new System.Windows.Forms.Label(); 36 | this.panel2 = new System.Windows.Forms.Panel(); 37 | this.panel3 = new System.Windows.Forms.Panel(); 38 | this.addEmployee_status = new System.Windows.Forms.ComboBox(); 39 | this.label7 = new System.Windows.Forms.Label(); 40 | this.addEmployee_clearBtn = new System.Windows.Forms.Button(); 41 | this.addEmployee_deleteBtn = new System.Windows.Forms.Button(); 42 | this.addEmployee_updateBtn = new System.Windows.Forms.Button(); 43 | this.addEmployee_addBtn = new System.Windows.Forms.Button(); 44 | this.addEmployee_importBtn = new System.Windows.Forms.Button(); 45 | this.addEmployee_picture = new System.Windows.Forms.PictureBox(); 46 | this.addEmployee_position = new System.Windows.Forms.ComboBox(); 47 | this.label6 = new System.Windows.Forms.Label(); 48 | this.addEmployee_phoneNum = new System.Windows.Forms.TextBox(); 49 | this.label5 = new System.Windows.Forms.Label(); 50 | this.addEmployee_gender = new System.Windows.Forms.ComboBox(); 51 | this.label4 = new System.Windows.Forms.Label(); 52 | this.addEmployee_fullName = new System.Windows.Forms.TextBox(); 53 | this.label3 = new System.Windows.Forms.Label(); 54 | this.addEmployee_id = new System.Windows.Forms.TextBox(); 55 | this.label2 = new System.Windows.Forms.Label(); 56 | this.panel4 = new System.Windows.Forms.Panel(); 57 | this.panel1.SuspendLayout(); 58 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); 59 | this.panel3.SuspendLayout(); 60 | ((System.ComponentModel.ISupportInitialize)(this.addEmployee_picture)).BeginInit(); 61 | this.SuspendLayout(); 62 | // 63 | // panel1 64 | // 65 | this.panel1.BackColor = System.Drawing.SystemColors.ButtonHighlight; 66 | this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 67 | this.panel1.Controls.Add(this.dataGridView1); 68 | this.panel1.Controls.Add(this.label1); 69 | this.panel1.Controls.Add(this.panel2); 70 | this.panel1.Location = new System.Drawing.Point(18, 24); 71 | this.panel1.Name = "panel1"; 72 | this.panel1.Size = new System.Drawing.Size(839, 279); 73 | this.panel1.TabIndex = 0; 74 | // 75 | // dataGridView1 76 | // 77 | this.dataGridView1.AllowUserToAddRows = false; 78 | this.dataGridView1.AllowUserToDeleteRows = false; 79 | dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; 80 | dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(11)))), ((int)(((byte)(97))))); 81 | dataGridViewCellStyle4.Font = new System.Drawing.Font("Arial Rounded MT Bold", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 82 | dataGridViewCellStyle4.ForeColor = System.Drawing.Color.White; 83 | dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; 84 | dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; 85 | dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; 86 | this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; 87 | this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; 88 | this.dataGridView1.EnableHeadersVisualStyles = false; 89 | this.dataGridView1.Location = new System.Drawing.Point(22, 59); 90 | this.dataGridView1.Name = "dataGridView1"; 91 | this.dataGridView1.ReadOnly = true; 92 | this.dataGridView1.RowHeadersVisible = false; 93 | this.dataGridView1.Size = new System.Drawing.Size(798, 193); 94 | this.dataGridView1.TabIndex = 3; 95 | this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick); 96 | // 97 | // label1 98 | // 99 | this.label1.AutoSize = true; 100 | this.label1.Font = new System.Drawing.Font("Tahoma", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 101 | this.label1.Location = new System.Drawing.Point(18, 21); 102 | this.label1.Name = "label1"; 103 | this.label1.Size = new System.Drawing.Size(148, 23); 104 | this.label1.TabIndex = 2; 105 | this.label1.Text = "Employee\'s Data"; 106 | // 107 | // panel2 108 | // 109 | this.panel2.BackColor = System.Drawing.SystemColors.ButtonHighlight; 110 | this.panel2.Location = new System.Drawing.Point(0, 299); 111 | this.panel2.Name = "panel2"; 112 | this.panel2.Size = new System.Drawing.Size(839, 226); 113 | this.panel2.TabIndex = 1; 114 | // 115 | // panel3 116 | // 117 | this.panel3.BackColor = System.Drawing.SystemColors.ButtonHighlight; 118 | this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 119 | this.panel3.Controls.Add(this.addEmployee_status); 120 | this.panel3.Controls.Add(this.label7); 121 | this.panel3.Controls.Add(this.addEmployee_clearBtn); 122 | this.panel3.Controls.Add(this.addEmployee_deleteBtn); 123 | this.panel3.Controls.Add(this.addEmployee_updateBtn); 124 | this.panel3.Controls.Add(this.addEmployee_addBtn); 125 | this.panel3.Controls.Add(this.addEmployee_importBtn); 126 | this.panel3.Controls.Add(this.addEmployee_picture); 127 | this.panel3.Controls.Add(this.addEmployee_position); 128 | this.panel3.Controls.Add(this.label6); 129 | this.panel3.Controls.Add(this.addEmployee_phoneNum); 130 | this.panel3.Controls.Add(this.label5); 131 | this.panel3.Controls.Add(this.addEmployee_gender); 132 | this.panel3.Controls.Add(this.label4); 133 | this.panel3.Controls.Add(this.addEmployee_fullName); 134 | this.panel3.Controls.Add(this.label3); 135 | this.panel3.Controls.Add(this.addEmployee_id); 136 | this.panel3.Controls.Add(this.label2); 137 | this.panel3.Controls.Add(this.panel4); 138 | this.panel3.Location = new System.Drawing.Point(18, 323); 139 | this.panel3.Name = "panel3"; 140 | this.panel3.Size = new System.Drawing.Size(839, 215); 141 | this.panel3.TabIndex = 2; 142 | // 143 | // addEmployee_status 144 | // 145 | this.addEmployee_status.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 146 | this.addEmployee_status.FormattingEnabled = true; 147 | this.addEmployee_status.Items.AddRange(new object[] { 148 | "Active", 149 | "Ianctive"}); 150 | this.addEmployee_status.Location = new System.Drawing.Point(422, 108); 151 | this.addEmployee_status.Name = "addEmployee_status"; 152 | this.addEmployee_status.Size = new System.Drawing.Size(170, 23); 153 | this.addEmployee_status.TabIndex = 19; 154 | // 155 | // label7 156 | // 157 | this.label7.AutoSize = true; 158 | this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 159 | this.label7.Location = new System.Drawing.Point(374, 108); 160 | this.label7.Name = "label7"; 161 | this.label7.Size = new System.Drawing.Size(44, 15); 162 | this.label7.TabIndex = 18; 163 | this.label7.Text = "Status:"; 164 | // 165 | // addEmployee_clearBtn 166 | // 167 | this.addEmployee_clearBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(11)))), ((int)(((byte)(97))))); 168 | this.addEmployee_clearBtn.Cursor = System.Windows.Forms.Cursors.Hand; 169 | this.addEmployee_clearBtn.FlatAppearance.BorderSize = 0; 170 | this.addEmployee_clearBtn.FlatAppearance.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 171 | this.addEmployee_clearBtn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 172 | this.addEmployee_clearBtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 173 | this.addEmployee_clearBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 174 | this.addEmployee_clearBtn.Font = new System.Drawing.Font("Arial Rounded MT Bold", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 175 | this.addEmployee_clearBtn.ForeColor = System.Drawing.Color.White; 176 | this.addEmployee_clearBtn.Location = new System.Drawing.Point(591, 163); 177 | this.addEmployee_clearBtn.Name = "addEmployee_clearBtn"; 178 | this.addEmployee_clearBtn.Size = new System.Drawing.Size(113, 37); 179 | this.addEmployee_clearBtn.TabIndex = 17; 180 | this.addEmployee_clearBtn.Text = "Clear"; 181 | this.addEmployee_clearBtn.UseVisualStyleBackColor = false; 182 | this.addEmployee_clearBtn.Click += new System.EventHandler(this.addEmployee_clearBtn_Click); 183 | // 184 | // addEmployee_deleteBtn 185 | // 186 | this.addEmployee_deleteBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(11)))), ((int)(((byte)(97))))); 187 | this.addEmployee_deleteBtn.Cursor = System.Windows.Forms.Cursors.Hand; 188 | this.addEmployee_deleteBtn.FlatAppearance.BorderSize = 0; 189 | this.addEmployee_deleteBtn.FlatAppearance.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 190 | this.addEmployee_deleteBtn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 191 | this.addEmployee_deleteBtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 192 | this.addEmployee_deleteBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 193 | this.addEmployee_deleteBtn.Font = new System.Drawing.Font("Arial Rounded MT Bold", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 194 | this.addEmployee_deleteBtn.ForeColor = System.Drawing.Color.White; 195 | this.addEmployee_deleteBtn.Location = new System.Drawing.Point(461, 163); 196 | this.addEmployee_deleteBtn.Name = "addEmployee_deleteBtn"; 197 | this.addEmployee_deleteBtn.Size = new System.Drawing.Size(113, 37); 198 | this.addEmployee_deleteBtn.TabIndex = 16; 199 | this.addEmployee_deleteBtn.Text = "Delete"; 200 | this.addEmployee_deleteBtn.UseVisualStyleBackColor = false; 201 | this.addEmployee_deleteBtn.Click += new System.EventHandler(this.addEmployee_deleteBtn_Click); 202 | // 203 | // addEmployee_updateBtn 204 | // 205 | this.addEmployee_updateBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(11)))), ((int)(((byte)(97))))); 206 | this.addEmployee_updateBtn.Cursor = System.Windows.Forms.Cursors.Hand; 207 | this.addEmployee_updateBtn.FlatAppearance.BorderSize = 0; 208 | this.addEmployee_updateBtn.FlatAppearance.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 209 | this.addEmployee_updateBtn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 210 | this.addEmployee_updateBtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 211 | this.addEmployee_updateBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 212 | this.addEmployee_updateBtn.Font = new System.Drawing.Font("Arial Rounded MT Bold", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 213 | this.addEmployee_updateBtn.ForeColor = System.Drawing.Color.White; 214 | this.addEmployee_updateBtn.Location = new System.Drawing.Point(312, 163); 215 | this.addEmployee_updateBtn.Name = "addEmployee_updateBtn"; 216 | this.addEmployee_updateBtn.Size = new System.Drawing.Size(113, 37); 217 | this.addEmployee_updateBtn.TabIndex = 15; 218 | this.addEmployee_updateBtn.Text = "Update"; 219 | this.addEmployee_updateBtn.UseVisualStyleBackColor = false; 220 | this.addEmployee_updateBtn.Click += new System.EventHandler(this.addEmployee_updateBtn_Click); 221 | // 222 | // addEmployee_addBtn 223 | // 224 | this.addEmployee_addBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(11)))), ((int)(((byte)(97))))); 225 | this.addEmployee_addBtn.Cursor = System.Windows.Forms.Cursors.Hand; 226 | this.addEmployee_addBtn.FlatAppearance.BorderSize = 0; 227 | this.addEmployee_addBtn.FlatAppearance.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 228 | this.addEmployee_addBtn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 229 | this.addEmployee_addBtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 230 | this.addEmployee_addBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 231 | this.addEmployee_addBtn.Font = new System.Drawing.Font("Arial Rounded MT Bold", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 232 | this.addEmployee_addBtn.ForeColor = System.Drawing.Color.White; 233 | this.addEmployee_addBtn.Location = new System.Drawing.Point(182, 163); 234 | this.addEmployee_addBtn.Name = "addEmployee_addBtn"; 235 | this.addEmployee_addBtn.Size = new System.Drawing.Size(113, 37); 236 | this.addEmployee_addBtn.TabIndex = 14; 237 | this.addEmployee_addBtn.Text = "Add"; 238 | this.addEmployee_addBtn.UseVisualStyleBackColor = false; 239 | this.addEmployee_addBtn.Click += new System.EventHandler(this.addEmployee_addBtn_Click); 240 | // 241 | // addEmployee_importBtn 242 | // 243 | this.addEmployee_importBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(11)))), ((int)(((byte)(97))))); 244 | this.addEmployee_importBtn.Cursor = System.Windows.Forms.Cursors.Hand; 245 | this.addEmployee_importBtn.FlatAppearance.BorderSize = 0; 246 | this.addEmployee_importBtn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 247 | this.addEmployee_importBtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 248 | this.addEmployee_importBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 249 | this.addEmployee_importBtn.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 250 | this.addEmployee_importBtn.ForeColor = System.Drawing.Color.White; 251 | this.addEmployee_importBtn.Location = new System.Drawing.Point(737, 126); 252 | this.addEmployee_importBtn.Name = "addEmployee_importBtn"; 253 | this.addEmployee_importBtn.Size = new System.Drawing.Size(82, 23); 254 | this.addEmployee_importBtn.TabIndex = 13; 255 | this.addEmployee_importBtn.Text = "Import"; 256 | this.addEmployee_importBtn.UseVisualStyleBackColor = false; 257 | this.addEmployee_importBtn.Click += new System.EventHandler(this.addEmployee_importBtn_Click); 258 | // 259 | // addEmployee_picture 260 | // 261 | this.addEmployee_picture.BackColor = System.Drawing.SystemColors.ButtonShadow; 262 | this.addEmployee_picture.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 263 | this.addEmployee_picture.Location = new System.Drawing.Point(738, 34); 264 | this.addEmployee_picture.Name = "addEmployee_picture"; 265 | this.addEmployee_picture.Size = new System.Drawing.Size(82, 92); 266 | this.addEmployee_picture.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; 267 | this.addEmployee_picture.TabIndex = 12; 268 | this.addEmployee_picture.TabStop = false; 269 | // 270 | // addEmployee_position 271 | // 272 | this.addEmployee_position.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 273 | this.addEmployee_position.FormattingEnabled = true; 274 | this.addEmployee_position.Items.AddRange(new object[] { 275 | "Business Management", 276 | "Front-End Developer", 277 | "Back-End Developer", 278 | "Data Administrator", 279 | "UI/UX Design"}); 280 | this.addEmployee_position.Location = new System.Drawing.Point(422, 69); 281 | this.addEmployee_position.Name = "addEmployee_position"; 282 | this.addEmployee_position.Size = new System.Drawing.Size(170, 23); 283 | this.addEmployee_position.TabIndex = 11; 284 | // 285 | // label6 286 | // 287 | this.label6.AutoSize = true; 288 | this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 289 | this.label6.Location = new System.Drawing.Point(364, 69); 290 | this.label6.Name = "label6"; 291 | this.label6.Size = new System.Drawing.Size(54, 15); 292 | this.label6.TabIndex = 10; 293 | this.label6.Text = "Position:"; 294 | // 295 | // addEmployee_phoneNum 296 | // 297 | this.addEmployee_phoneNum.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 298 | this.addEmployee_phoneNum.Location = new System.Drawing.Point(422, 34); 299 | this.addEmployee_phoneNum.Name = "addEmployee_phoneNum"; 300 | this.addEmployee_phoneNum.Size = new System.Drawing.Size(152, 21); 301 | this.addEmployee_phoneNum.TabIndex = 9; 302 | // 303 | // label5 304 | // 305 | this.label5.AutoSize = true; 306 | this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 307 | this.label5.Location = new System.Drawing.Point(322, 34); 308 | this.label5.Name = "label5"; 309 | this.label5.Size = new System.Drawing.Size(94, 15); 310 | this.label5.TabIndex = 8; 311 | this.label5.Text = "Phone Number:"; 312 | // 313 | // addEmployee_gender 314 | // 315 | this.addEmployee_gender.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 316 | this.addEmployee_gender.FormattingEnabled = true; 317 | this.addEmployee_gender.Items.AddRange(new object[] { 318 | "Male", 319 | "Female", 320 | "Others"}); 321 | this.addEmployee_gender.Location = new System.Drawing.Point(125, 111); 322 | this.addEmployee_gender.Name = "addEmployee_gender"; 323 | this.addEmployee_gender.Size = new System.Drawing.Size(170, 23); 324 | this.addEmployee_gender.TabIndex = 7; 325 | // 326 | // label4 327 | // 328 | this.label4.AutoSize = true; 329 | this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 330 | this.label4.Location = new System.Drawing.Point(67, 111); 331 | this.label4.Name = "label4"; 332 | this.label4.Size = new System.Drawing.Size(51, 15); 333 | this.label4.TabIndex = 6; 334 | this.label4.Text = "Gender:"; 335 | // 336 | // addEmployee_fullName 337 | // 338 | this.addEmployee_fullName.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 339 | this.addEmployee_fullName.Location = new System.Drawing.Point(125, 75); 340 | this.addEmployee_fullName.Name = "addEmployee_fullName"; 341 | this.addEmployee_fullName.Size = new System.Drawing.Size(170, 21); 342 | this.addEmployee_fullName.TabIndex = 5; 343 | // 344 | // label3 345 | // 346 | this.label3.AutoSize = true; 347 | this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 348 | this.label3.Location = new System.Drawing.Point(51, 75); 349 | this.label3.Name = "label3"; 350 | this.label3.Size = new System.Drawing.Size(67, 15); 351 | this.label3.TabIndex = 4; 352 | this.label3.Text = "Full Name:"; 353 | // 354 | // addEmployee_id 355 | // 356 | this.addEmployee_id.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 357 | this.addEmployee_id.Location = new System.Drawing.Point(125, 35); 358 | this.addEmployee_id.Name = "addEmployee_id"; 359 | this.addEmployee_id.Size = new System.Drawing.Size(134, 21); 360 | this.addEmployee_id.TabIndex = 3; 361 | // 362 | // label2 363 | // 364 | this.label2.AutoSize = true; 365 | this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 366 | this.label2.Location = new System.Drawing.Point(38, 35); 367 | this.label2.Name = "label2"; 368 | this.label2.Size = new System.Drawing.Size(80, 15); 369 | this.label2.TabIndex = 2; 370 | this.label2.Text = "Employee ID:"; 371 | // 372 | // panel4 373 | // 374 | this.panel4.BackColor = System.Drawing.SystemColors.ButtonHighlight; 375 | this.panel4.Location = new System.Drawing.Point(0, 299); 376 | this.panel4.Name = "panel4"; 377 | this.panel4.Size = new System.Drawing.Size(839, 226); 378 | this.panel4.TabIndex = 1; 379 | // 380 | // AddEmployee 381 | // 382 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 383 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 384 | this.Controls.Add(this.panel3); 385 | this.Controls.Add(this.panel1); 386 | this.Name = "AddEmployee"; 387 | this.Size = new System.Drawing.Size(875, 565); 388 | this.panel1.ResumeLayout(false); 389 | this.panel1.PerformLayout(); 390 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); 391 | this.panel3.ResumeLayout(false); 392 | this.panel3.PerformLayout(); 393 | ((System.ComponentModel.ISupportInitialize)(this.addEmployee_picture)).EndInit(); 394 | this.ResumeLayout(false); 395 | 396 | } 397 | 398 | #endregion 399 | 400 | private System.Windows.Forms.Panel panel1; 401 | private System.Windows.Forms.Panel panel2; 402 | private System.Windows.Forms.Panel panel3; 403 | private System.Windows.Forms.Panel panel4; 404 | private System.Windows.Forms.DataGridView dataGridView1; 405 | private System.Windows.Forms.Label label1; 406 | private System.Windows.Forms.TextBox addEmployee_fullName; 407 | private System.Windows.Forms.Label label3; 408 | private System.Windows.Forms.TextBox addEmployee_id; 409 | private System.Windows.Forms.Label label2; 410 | private System.Windows.Forms.TextBox addEmployee_phoneNum; 411 | private System.Windows.Forms.Label label5; 412 | private System.Windows.Forms.ComboBox addEmployee_gender; 413 | private System.Windows.Forms.Label label4; 414 | private System.Windows.Forms.ComboBox addEmployee_position; 415 | private System.Windows.Forms.Label label6; 416 | private System.Windows.Forms.Button addEmployee_clearBtn; 417 | private System.Windows.Forms.Button addEmployee_deleteBtn; 418 | private System.Windows.Forms.Button addEmployee_updateBtn; 419 | private System.Windows.Forms.Button addEmployee_addBtn; 420 | private System.Windows.Forms.Button addEmployee_importBtn; 421 | private System.Windows.Forms.PictureBox addEmployee_picture; 422 | private System.Windows.Forms.ComboBox addEmployee_status; 423 | private System.Windows.Forms.Label label7; 424 | } 425 | } 426 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/AddEmployee.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using System.Data; 11 | using System.Data.SqlClient; 12 | using System.IO; 13 | 14 | namespace EmployeeManagementSystem 15 | { 16 | public partial class AddEmployee : UserControl 17 | { 18 | SqlConnection connect = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\WINDOWS 10\Documents\employee.mdf;Integrated Security=True;Connect Timeout=30"); 19 | 20 | public AddEmployee() 21 | { 22 | InitializeComponent(); 23 | 24 | // TO DISPLAY THE DATA FROM DATABASE TO YOUR DATA GRID VIEW 25 | displayEmployeeData(); 26 | } 27 | 28 | public void RefreshData() 29 | { 30 | if (InvokeRequired) 31 | { 32 | Invoke((MethodInvoker)RefreshData); 33 | return; 34 | } 35 | displayEmployeeData(); 36 | } 37 | 38 | public void displayEmployeeData() 39 | { 40 | EmployeeData ed = new EmployeeData(); 41 | List listData = ed.employeeListData(); 42 | 43 | dataGridView1.DataSource = listData; 44 | } 45 | 46 | private void addEmployee_addBtn_Click(object sender, EventArgs e) 47 | { 48 | if(addEmployee_id.Text == "" 49 | || addEmployee_fullName.Text == "" 50 | || addEmployee_gender.Text == "" 51 | || addEmployee_phoneNum.Text == "" 52 | || addEmployee_position.Text == "" 53 | || addEmployee_status.Text == "" 54 | || addEmployee_picture.Image == null) 55 | { 56 | MessageBox.Show("Please fill all blank fields" 57 | , "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 58 | } 59 | else 60 | { 61 | if(connect.State == ConnectionState.Closed) 62 | { 63 | try 64 | { 65 | connect.Open(); 66 | string checkEmID = "SELECT COUNT(*) FROM employees WHERE employee_id = @emID AND delete_date IS NULL"; 67 | 68 | using(SqlCommand checkEm = new SqlCommand(checkEmID, connect)) 69 | { 70 | checkEm.Parameters.AddWithValue("@emID", addEmployee_id.Text.Trim()); 71 | int count = (int)checkEm.ExecuteScalar(); 72 | 73 | if(count >= 1) 74 | { 75 | MessageBox.Show(addEmployee_id.Text.Trim() + " is already taken" 76 | , "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 77 | } 78 | else 79 | { 80 | DateTime today = DateTime.Today; 81 | string insertData = "INSERT INTO employees " + 82 | "(employee_id, full_name, gender, contact_number" + 83 | ", position, image, salary, insert_date, status) " + 84 | "VALUES(@employeeID, @fullName, @gender, @contactNum" + 85 | ", @position, @image, @salary, @insertDate, @status)"; 86 | 87 | string path = Path.Combine(@"C:\Users\WINDOWS 10\source\repos\EmployeeManagementSystem\EmployeeManagementSystem\Directory\" 88 | + addEmployee_id.Text.Trim() + ".jpg"); 89 | 90 | string directoryPath = Path.GetDirectoryName(path); 91 | 92 | if (!Directory.Exists(directoryPath)) 93 | { 94 | Directory.CreateDirectory(directoryPath); 95 | } 96 | 97 | File.Copy(addEmployee_picture.ImageLocation, path, true); 98 | 99 | using(SqlCommand cmd = new SqlCommand(insertData, connect)) 100 | { 101 | cmd.Parameters.AddWithValue("@employeeID", addEmployee_id.Text.Trim()); 102 | cmd.Parameters.AddWithValue("@fullName", addEmployee_fullName.Text.Trim()); 103 | cmd.Parameters.AddWithValue("@gender", addEmployee_gender.Text.Trim()); 104 | cmd.Parameters.AddWithValue("@contactNum", addEmployee_phoneNum.Text.Trim()); 105 | cmd.Parameters.AddWithValue("@position", addEmployee_position.Text.Trim()); 106 | cmd.Parameters.AddWithValue("@image", path); 107 | cmd.Parameters.AddWithValue("@salary", 0); 108 | cmd.Parameters.AddWithValue("@insertDate", today); 109 | cmd.Parameters.AddWithValue("@status", addEmployee_status.Text.Trim()); 110 | 111 | cmd.ExecuteNonQuery(); 112 | 113 | displayEmployeeData(); 114 | 115 | MessageBox.Show("Added successfully!" 116 | , "Information Message", MessageBoxButtons.OK, MessageBoxIcon.Information); 117 | 118 | clearFields(); 119 | } 120 | } 121 | } 122 | } 123 | catch(Exception ex) 124 | { 125 | MessageBox.Show("Error: " + ex 126 | , "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 127 | } 128 | finally 129 | { 130 | connect.Close(); 131 | } 132 | } 133 | } 134 | } 135 | 136 | private void addEmployee_importBtn_Click(object sender, EventArgs e) 137 | { 138 | try 139 | { 140 | OpenFileDialog dialog = new OpenFileDialog(); 141 | dialog.Filter = "Image Files (*.jpg; *.png)|*.jpg;*.png"; 142 | string imagePath = ""; 143 | if (dialog.ShowDialog() == DialogResult.OK) 144 | { 145 | imagePath = dialog.FileName; 146 | addEmployee_picture.ImageLocation = imagePath; 147 | } 148 | } 149 | catch(Exception ex) 150 | { 151 | MessageBox.Show("Error: " + ex, "Error Message" 152 | , MessageBoxButtons.OK, MessageBoxIcon.Error); 153 | } 154 | } 155 | 156 | private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) 157 | { 158 | if(e.RowIndex != -1) 159 | { 160 | DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; 161 | addEmployee_id.Text = row.Cells[1].Value.ToString(); 162 | addEmployee_fullName.Text = row.Cells[2].Value.ToString(); 163 | addEmployee_gender.Text = row.Cells[3].Value.ToString(); 164 | addEmployee_phoneNum.Text = row.Cells[4].Value.ToString(); 165 | addEmployee_position.Text = row.Cells[5].Value.ToString(); 166 | 167 | string imagePath = row.Cells[6].Value.ToString(); 168 | 169 | if(imagePath != null) 170 | { 171 | addEmployee_picture.Image = Image.FromFile(imagePath); 172 | } 173 | else 174 | { 175 | addEmployee_picture.Image = null; 176 | } 177 | 178 | addEmployee_status.Text = row.Cells[8].Value.ToString(); 179 | } 180 | } 181 | 182 | public void clearFields() 183 | { 184 | addEmployee_id.Text = ""; 185 | addEmployee_fullName.Text = ""; 186 | addEmployee_gender.SelectedIndex = -1; 187 | addEmployee_phoneNum.Text = ""; 188 | addEmployee_position.SelectedIndex = -1; 189 | addEmployee_status.SelectedIndex = -1; 190 | addEmployee_picture.Image = null; 191 | } 192 | 193 | private void addEmployee_updateBtn_Click(object sender, EventArgs e) 194 | { 195 | if (addEmployee_id.Text == "" 196 | || addEmployee_fullName.Text == "" 197 | || addEmployee_gender.Text == "" 198 | || addEmployee_phoneNum.Text == "" 199 | || addEmployee_position.Text == "" 200 | || addEmployee_status.Text == "" 201 | || addEmployee_picture.Image == null) 202 | { 203 | MessageBox.Show("Please fill all blank fields" 204 | , "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 205 | } 206 | else 207 | { 208 | DialogResult check = MessageBox.Show("Are you sure you want to UPDATE " + 209 | "Employee ID: " + addEmployee_id.Text.Trim() + "?", "Confirmation Message" 210 | , MessageBoxButtons.YesNo, MessageBoxIcon.Information); 211 | 212 | if (check == DialogResult.Yes) 213 | { 214 | try 215 | { 216 | connect.Open(); 217 | DateTime today = DateTime.Today; 218 | 219 | string updateData = "UPDATE employees SET full_name = @fullName" + 220 | ", gender = @gender, contact_number = @contactNum" + 221 | ", position = @position, update_date = @updateDate, status = @status " + 222 | "WHERE employee_id = @employeeID"; 223 | 224 | using (SqlCommand cmd = new SqlCommand(updateData, connect)) 225 | { 226 | cmd.Parameters.AddWithValue("@fullName", addEmployee_fullName.Text.Trim()); 227 | cmd.Parameters.AddWithValue("@gender", addEmployee_gender.Text.Trim()); 228 | cmd.Parameters.AddWithValue("@contactNum", addEmployee_phoneNum.Text.Trim()); 229 | cmd.Parameters.AddWithValue("@position", addEmployee_position.Text.Trim()); 230 | cmd.Parameters.AddWithValue("@updateDate", today); 231 | cmd.Parameters.AddWithValue("@status", addEmployee_status.Text.Trim()); 232 | cmd.Parameters.AddWithValue("@employeeID", addEmployee_id.Text.Trim()); 233 | 234 | cmd.ExecuteNonQuery(); 235 | 236 | displayEmployeeData(); 237 | 238 | MessageBox.Show("Update successfully!" 239 | , "Information Message", MessageBoxButtons.OK, MessageBoxIcon.Information); 240 | 241 | clearFields(); 242 | } 243 | } 244 | catch (Exception ex) 245 | { 246 | MessageBox.Show("Error: " + ex 247 | , "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 248 | } 249 | finally 250 | { 251 | connect.Close(); 252 | } 253 | } 254 | else 255 | { 256 | MessageBox.Show("Cancelled." 257 | , "Information Message", MessageBoxButtons.OK, MessageBoxIcon.Warning); 258 | } 259 | 260 | } 261 | } 262 | 263 | private void addEmployee_clearBtn_Click(object sender, EventArgs e) 264 | { 265 | clearFields(); 266 | } 267 | 268 | private void addEmployee_deleteBtn_Click(object sender, EventArgs e) 269 | { 270 | if (addEmployee_id.Text == "" 271 | || addEmployee_fullName.Text == "" 272 | || addEmployee_gender.Text == "" 273 | || addEmployee_phoneNum.Text == "" 274 | || addEmployee_position.Text == "" 275 | || addEmployee_status.Text == "" 276 | || addEmployee_picture.Image == null) 277 | { 278 | MessageBox.Show("Please fill all blank fields" 279 | , "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 280 | } 281 | else 282 | { 283 | DialogResult check = MessageBox.Show("Are you sure you want to DELETE " + 284 | "Employee ID: " + addEmployee_id.Text.Trim() + "?", "Confirmation Message" 285 | , MessageBoxButtons.YesNo, MessageBoxIcon.Information); 286 | 287 | if (check == DialogResult.Yes) 288 | { 289 | try 290 | { 291 | connect.Open(); 292 | DateTime today = DateTime.Today; 293 | 294 | string updateData = "UPDATE employees SET delete_date = @deleteDate " + 295 | "WHERE employee_id = @employeeID"; 296 | 297 | using (SqlCommand cmd = new SqlCommand(updateData, connect)) 298 | { 299 | cmd.Parameters.AddWithValue("@deleteDate", today); 300 | cmd.Parameters.AddWithValue("@employeeID", addEmployee_id.Text.Trim()); 301 | 302 | cmd.ExecuteNonQuery(); 303 | 304 | displayEmployeeData(); 305 | 306 | MessageBox.Show("Update successfully!" 307 | , "Information Message", MessageBoxButtons.OK, MessageBoxIcon.Information); 308 | 309 | clearFields(); 310 | } 311 | } 312 | catch (Exception ex) 313 | { 314 | MessageBox.Show("Error: " + ex 315 | , "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 316 | } 317 | finally 318 | { 319 | connect.Close(); 320 | } 321 | } 322 | else 323 | { 324 | MessageBox.Show("Cancelled." 325 | , "Information Message", MessageBoxButtons.OK, MessageBoxIcon.Warning); 326 | } 327 | 328 | } 329 | } 330 | } 331 | } 332 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/AddEmployee.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Assets/icons8_Salary_male_30px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/Assets/icons8_Salary_male_30px.png -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Assets/icons8_commercial_development_management_60px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/Assets/icons8_commercial_development_management_60px.png -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Assets/icons8_dashboard_30px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/Assets/icons8_dashboard_30px.png -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Assets/icons8_employee_card_100px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/Assets/icons8_employee_card_100px.png -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Assets/icons8_employee_card_30px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/Assets/icons8_employee_card_30px.png -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Assets/icons8_employee_card_60px_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/Assets/icons8_employee_card_60px_1.png -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Assets/icons8_group_background_selected_60px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/Assets/icons8_group_background_selected_60px.png -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Assets/icons8_group_background_selected_filled_60px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/Assets/icons8_group_background_selected_filled_60px.png -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Assets/icons8_logout_rounded_up_filled_25px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/Assets/icons8_logout_rounded_up_filled_25px.png -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Dashboard.Designer.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace EmployeeManagementSystem 3 | { 4 | partial class Dashboard 5 | { 6 | /// 7 | /// Required designer variable. 8 | /// 9 | private System.ComponentModel.IContainer components = null; 10 | 11 | /// 12 | /// Clean up any resources being used. 13 | /// 14 | /// true if managed resources should be disposed; otherwise, false. 15 | protected override void Dispose(bool disposing) 16 | { 17 | if (disposing && (components != null)) 18 | { 19 | components.Dispose(); 20 | } 21 | base.Dispose(disposing); 22 | } 23 | 24 | #region Component Designer generated code 25 | 26 | /// 27 | /// Required method for Designer support - do not modify 28 | /// the contents of this method with the code editor. 29 | /// 30 | private void InitializeComponent() 31 | { 32 | this.panel1 = new System.Windows.Forms.Panel(); 33 | this.panel5 = new System.Windows.Forms.Panel(); 34 | this.dashboard_IE = new System.Windows.Forms.Label(); 35 | this.label6 = new System.Windows.Forms.Label(); 36 | this.panel4 = new System.Windows.Forms.Panel(); 37 | this.dashboard_AE = new System.Windows.Forms.Label(); 38 | this.label4 = new System.Windows.Forms.Label(); 39 | this.panel3 = new System.Windows.Forms.Panel(); 40 | this.dashboard_TE = new System.Windows.Forms.Label(); 41 | this.label1 = new System.Windows.Forms.Label(); 42 | this.panel2 = new System.Windows.Forms.Panel(); 43 | this.pictureBox4 = new System.Windows.Forms.PictureBox(); 44 | this.pictureBox3 = new System.Windows.Forms.PictureBox(); 45 | this.pictureBox2 = new System.Windows.Forms.PictureBox(); 46 | this.pictureBox1 = new System.Windows.Forms.PictureBox(); 47 | this.panel1.SuspendLayout(); 48 | this.panel5.SuspendLayout(); 49 | this.panel4.SuspendLayout(); 50 | this.panel3.SuspendLayout(); 51 | this.panel2.SuspendLayout(); 52 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit(); 53 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit(); 54 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); 55 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); 56 | this.SuspendLayout(); 57 | // 58 | // panel1 59 | // 60 | this.panel1.BackColor = System.Drawing.SystemColors.ButtonHighlight; 61 | this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 62 | this.panel1.Controls.Add(this.panel5); 63 | this.panel1.Controls.Add(this.panel4); 64 | this.panel1.Controls.Add(this.panel3); 65 | this.panel1.Location = new System.Drawing.Point(17, 22); 66 | this.panel1.Name = "panel1"; 67 | this.panel1.Size = new System.Drawing.Size(844, 176); 68 | this.panel1.TabIndex = 0; 69 | // 70 | // panel5 71 | // 72 | this.panel5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 73 | this.panel5.Controls.Add(this.dashboard_IE); 74 | this.panel5.Controls.Add(this.label6); 75 | this.panel5.Controls.Add(this.pictureBox3); 76 | this.panel5.Location = new System.Drawing.Point(573, 27); 77 | this.panel5.Name = "panel5"; 78 | this.panel5.Size = new System.Drawing.Size(236, 123); 79 | this.panel5.TabIndex = 2; 80 | // 81 | // dashboard_IE 82 | // 83 | this.dashboard_IE.AutoSize = true; 84 | this.dashboard_IE.Font = new System.Drawing.Font("Tahoma", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 85 | this.dashboard_IE.ForeColor = System.Drawing.Color.White; 86 | this.dashboard_IE.Location = new System.Drawing.Point(193, 27); 87 | this.dashboard_IE.Name = "dashboard_IE"; 88 | this.dashboard_IE.Size = new System.Drawing.Size(23, 25); 89 | this.dashboard_IE.TabIndex = 6; 90 | this.dashboard_IE.Text = "0"; 91 | // 92 | // label6 93 | // 94 | this.label6.AutoSize = true; 95 | this.label6.Font = new System.Drawing.Font("Tahoma", 11F); 96 | this.label6.ForeColor = System.Drawing.Color.White; 97 | this.label6.Location = new System.Drawing.Point(90, 86); 98 | this.label6.Name = "label6"; 99 | this.label6.Size = new System.Drawing.Size(135, 18); 100 | this.label6.TabIndex = 5; 101 | this.label6.Text = "Inactive Employees"; 102 | // 103 | // panel4 104 | // 105 | this.panel4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 106 | this.panel4.Controls.Add(this.dashboard_AE); 107 | this.panel4.Controls.Add(this.label4); 108 | this.panel4.Controls.Add(this.pictureBox2); 109 | this.panel4.Location = new System.Drawing.Point(302, 27); 110 | this.panel4.Name = "panel4"; 111 | this.panel4.Size = new System.Drawing.Size(236, 123); 112 | this.panel4.TabIndex = 1; 113 | // 114 | // dashboard_AE 115 | // 116 | this.dashboard_AE.AutoSize = true; 117 | this.dashboard_AE.Font = new System.Drawing.Font("Tahoma", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 118 | this.dashboard_AE.ForeColor = System.Drawing.Color.White; 119 | this.dashboard_AE.Location = new System.Drawing.Point(194, 27); 120 | this.dashboard_AE.Name = "dashboard_AE"; 121 | this.dashboard_AE.Size = new System.Drawing.Size(23, 25); 122 | this.dashboard_AE.TabIndex = 4; 123 | this.dashboard_AE.Text = "0"; 124 | // 125 | // label4 126 | // 127 | this.label4.AutoSize = true; 128 | this.label4.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 129 | this.label4.ForeColor = System.Drawing.Color.White; 130 | this.label4.Location = new System.Drawing.Point(91, 86); 131 | this.label4.Name = "label4"; 132 | this.label4.Size = new System.Drawing.Size(133, 19); 133 | this.label4.TabIndex = 3; 134 | this.label4.Text = "Active Employees"; 135 | // 136 | // panel3 137 | // 138 | this.panel3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 139 | this.panel3.Controls.Add(this.dashboard_TE); 140 | this.panel3.Controls.Add(this.label1); 141 | this.panel3.Controls.Add(this.pictureBox1); 142 | this.panel3.Location = new System.Drawing.Point(32, 27); 143 | this.panel3.Name = "panel3"; 144 | this.panel3.Size = new System.Drawing.Size(236, 123); 145 | this.panel3.TabIndex = 0; 146 | // 147 | // dashboard_TE 148 | // 149 | this.dashboard_TE.AutoSize = true; 150 | this.dashboard_TE.Font = new System.Drawing.Font("Tahoma", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 151 | this.dashboard_TE.ForeColor = System.Drawing.Color.White; 152 | this.dashboard_TE.Location = new System.Drawing.Point(196, 27); 153 | this.dashboard_TE.Name = "dashboard_TE"; 154 | this.dashboard_TE.Size = new System.Drawing.Size(23, 25); 155 | this.dashboard_TE.TabIndex = 2; 156 | this.dashboard_TE.Text = "0"; 157 | // 158 | // label1 159 | // 160 | this.label1.AutoSize = true; 161 | this.label1.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 162 | this.label1.ForeColor = System.Drawing.Color.White; 163 | this.label1.Location = new System.Drawing.Point(93, 86); 164 | this.label1.Name = "label1"; 165 | this.label1.Size = new System.Drawing.Size(126, 19); 166 | this.label1.TabIndex = 1; 167 | this.label1.Text = "Total Employees"; 168 | // 169 | // panel2 170 | // 171 | this.panel2.BackColor = System.Drawing.SystemColors.ButtonHighlight; 172 | this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 173 | this.panel2.Controls.Add(this.pictureBox4); 174 | this.panel2.Location = new System.Drawing.Point(17, 219); 175 | this.panel2.Name = "panel2"; 176 | this.panel2.Size = new System.Drawing.Size(844, 324); 177 | this.panel2.TabIndex = 1; 178 | // 179 | // pictureBox4 180 | // 181 | this.pictureBox4.Dock = System.Windows.Forms.DockStyle.Fill; 182 | this.pictureBox4.Image = global::EmployeeManagementSystem.Properties.Resources.pexels_jane_doan_1024248; 183 | this.pictureBox4.Location = new System.Drawing.Point(0, 0); 184 | this.pictureBox4.Name = "pictureBox4"; 185 | this.pictureBox4.Size = new System.Drawing.Size(842, 322); 186 | this.pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; 187 | this.pictureBox4.TabIndex = 0; 188 | this.pictureBox4.TabStop = false; 189 | // 190 | // pictureBox3 191 | // 192 | this.pictureBox3.Image = global::EmployeeManagementSystem.Properties.Resources.icons8_group_background_selected_60px; 193 | this.pictureBox3.Location = new System.Drawing.Point(20, 27); 194 | this.pictureBox3.Name = "pictureBox3"; 195 | this.pictureBox3.Size = new System.Drawing.Size(60, 60); 196 | this.pictureBox3.TabIndex = 2; 197 | this.pictureBox3.TabStop = false; 198 | // 199 | // pictureBox2 200 | // 201 | this.pictureBox2.Image = global::EmployeeManagementSystem.Properties.Resources.icons8_group_background_selected_filled_60px; 202 | this.pictureBox2.Location = new System.Drawing.Point(16, 27); 203 | this.pictureBox2.Name = "pictureBox2"; 204 | this.pictureBox2.Size = new System.Drawing.Size(60, 60); 205 | this.pictureBox2.TabIndex = 1; 206 | this.pictureBox2.TabStop = false; 207 | // 208 | // pictureBox1 209 | // 210 | this.pictureBox1.Image = global::EmployeeManagementSystem.Properties.Resources.icons8_employee_card_60px_1; 211 | this.pictureBox1.Location = new System.Drawing.Point(18, 27); 212 | this.pictureBox1.Name = "pictureBox1"; 213 | this.pictureBox1.Size = new System.Drawing.Size(60, 60); 214 | this.pictureBox1.TabIndex = 0; 215 | this.pictureBox1.TabStop = false; 216 | // 217 | // Dashboard 218 | // 219 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 220 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 221 | this.Controls.Add(this.panel2); 222 | this.Controls.Add(this.panel1); 223 | this.Name = "Dashboard"; 224 | this.Size = new System.Drawing.Size(875, 565); 225 | this.panel1.ResumeLayout(false); 226 | this.panel5.ResumeLayout(false); 227 | this.panel5.PerformLayout(); 228 | this.panel4.ResumeLayout(false); 229 | this.panel4.PerformLayout(); 230 | this.panel3.ResumeLayout(false); 231 | this.panel3.PerformLayout(); 232 | this.panel2.ResumeLayout(false); 233 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit(); 234 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit(); 235 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); 236 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); 237 | this.ResumeLayout(false); 238 | 239 | } 240 | 241 | #endregion 242 | 243 | private System.Windows.Forms.Panel panel1; 244 | private System.Windows.Forms.Panel panel2; 245 | private System.Windows.Forms.Panel panel5; 246 | private System.Windows.Forms.Panel panel4; 247 | private System.Windows.Forms.Panel panel3; 248 | private System.Windows.Forms.PictureBox pictureBox1; 249 | private System.Windows.Forms.PictureBox pictureBox2; 250 | private System.Windows.Forms.PictureBox pictureBox3; 251 | private System.Windows.Forms.Label dashboard_IE; 252 | private System.Windows.Forms.Label label6; 253 | private System.Windows.Forms.Label dashboard_AE; 254 | private System.Windows.Forms.Label label4; 255 | private System.Windows.Forms.Label dashboard_TE; 256 | private System.Windows.Forms.Label label1; 257 | private System.Windows.Forms.PictureBox pictureBox4; 258 | } 259 | } 260 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Dashboard.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using System.Data; 11 | using System.Data.SqlClient; 12 | 13 | namespace EmployeeManagementSystem 14 | { 15 | public partial class Dashboard : UserControl 16 | { 17 | SqlConnection connect = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\WINDOWS 10\Documents\employee.mdf;Integrated Security=True;Connect Timeout=30"); 18 | public Dashboard() 19 | { 20 | InitializeComponent(); 21 | 22 | displayTE(); 23 | displayAE(); 24 | displayIE(); 25 | } 26 | 27 | public void RefreshData() 28 | { 29 | if (InvokeRequired) 30 | { 31 | Invoke((MethodInvoker)RefreshData); 32 | return; 33 | } 34 | 35 | displayTE(); 36 | displayAE(); 37 | displayIE(); 38 | } 39 | 40 | public void displayTE() 41 | { 42 | if(connect.State != ConnectionState.Open) 43 | { 44 | try 45 | { 46 | connect.Open(); 47 | 48 | string selectData = "SELECT COUNT(id) FROM employees WHERE delete_date IS NULL"; 49 | 50 | using(SqlCommand cmd = new SqlCommand(selectData, connect)) 51 | { 52 | SqlDataReader reader = cmd.ExecuteReader(); 53 | 54 | if (reader.Read()) 55 | { 56 | int count = Convert.ToInt32(reader[0]); 57 | dashboard_TE.Text = count.ToString(); 58 | } 59 | reader.Close(); 60 | } 61 | 62 | }catch(Exception ex) 63 | { 64 | MessageBox.Show("Error: " + ex, "Error Message" 65 | , MessageBoxButtons.OK, MessageBoxIcon.Error); 66 | } 67 | finally 68 | { 69 | connect.Close(); 70 | } 71 | } 72 | } 73 | 74 | public void displayAE() 75 | { 76 | if (connect.State != ConnectionState.Open) 77 | { 78 | try 79 | { 80 | connect.Open(); 81 | 82 | string selectData = "SELECT COUNT(id) FROM employees WHERE status = @status " + 83 | "AND delete_date IS NULL"; 84 | 85 | using (SqlCommand cmd = new SqlCommand(selectData, connect)) 86 | { 87 | cmd.Parameters.AddWithValue("@status", "Active"); 88 | SqlDataReader reader = cmd.ExecuteReader(); 89 | 90 | if (reader.Read()) 91 | { 92 | int count = Convert.ToInt32(reader[0]); 93 | dashboard_AE.Text = count.ToString(); 94 | } 95 | reader.Close(); 96 | } 97 | 98 | } 99 | catch (Exception ex) 100 | { 101 | MessageBox.Show("Error: " + ex, "Error Message" 102 | , MessageBoxButtons.OK, MessageBoxIcon.Error); 103 | } 104 | finally 105 | { 106 | connect.Close(); 107 | } 108 | } 109 | } 110 | 111 | public void displayIE() 112 | { 113 | if (connect.State != ConnectionState.Open) 114 | { 115 | try 116 | { 117 | connect.Open(); 118 | 119 | string selectData = "SELECT COUNT(id) FROM employees WHERE status = @status " + 120 | "AND delete_date IS NULL"; 121 | 122 | using (SqlCommand cmd = new SqlCommand(selectData, connect)) 123 | { 124 | cmd.Parameters.AddWithValue("@status", "Ianctive"); 125 | SqlDataReader reader = cmd.ExecuteReader(); 126 | 127 | if (reader.Read()) 128 | { 129 | int count = Convert.ToInt32(reader[0]); 130 | dashboard_IE.Text = count.ToString(); 131 | } 132 | reader.Close(); 133 | } 134 | 135 | } 136 | catch (Exception ex) 137 | { 138 | MessageBox.Show("Error: " + ex, "Error Message" 139 | , MessageBoxButtons.OK, MessageBoxIcon.Error); 140 | } 141 | finally 142 | { 143 | connect.Close(); 144 | } 145 | } 146 | } 147 | 148 | } 149 | } 150 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Dashboard.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Directory/EMID-01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/Directory/EMID-01.jpg -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Directory/EMID-02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/Directory/EMID-02.jpg -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/EmployeeData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Data; 7 | using System.Data.SqlClient; 8 | 9 | namespace EmployeeManagementSystem 10 | { 11 | class EmployeeData 12 | { 13 | 14 | public int ID { set; get; } // 0 15 | public string EmployeeID { set; get; } // 1 16 | public string Name { set; get; } // 2 17 | public string Gender { set; get; } // 3 18 | public string Contact { set; get; } // 4 19 | public string Position { set; get; } // 5 20 | public string Image { set; get; } // 6 21 | public int Salary { set; get; } // 7 22 | public string Status { set; get; } // 8 23 | 24 | 25 | SqlConnection connect = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\WINDOWS 10\Documents\employee.mdf;Integrated Security=True;Connect Timeout=30"); 26 | 27 | 28 | public List employeeListData() 29 | { 30 | List listdata = new List(); 31 | 32 | if(connect.State != ConnectionState.Open) 33 | { 34 | try 35 | { 36 | connect.Open(); 37 | 38 | string selectData = "SELECT * FROM employees WHERE delete_date IS NULL"; 39 | 40 | using(SqlCommand cmd = new SqlCommand(selectData, connect)) 41 | { 42 | SqlDataReader reader = cmd.ExecuteReader(); 43 | 44 | while (reader.Read()) 45 | { 46 | EmployeeData ed = new EmployeeData(); 47 | ed.ID = (int)reader["id"]; 48 | ed.EmployeeID = reader["employee_id"].ToString(); 49 | ed.Name = reader["full_name"].ToString(); 50 | ed.Gender = reader["gender"].ToString(); 51 | ed.Contact = reader["contact_number"].ToString(); 52 | ed.Position = reader["position"].ToString(); 53 | ed.Image = reader["image"].ToString(); 54 | ed.Salary = (int)reader["salary"]; 55 | ed.Status = reader["status"].ToString(); 56 | 57 | listdata.Add(ed); 58 | } 59 | } 60 | 61 | }catch(Exception ex) 62 | { 63 | Console.WriteLine("Error: " + ex); 64 | } 65 | finally 66 | { 67 | connect.Close(); 68 | } 69 | } 70 | return listdata; 71 | } 72 | 73 | public List salaryEmployeeListData() 74 | { 75 | List listdata = new List(); 76 | 77 | if (connect.State != ConnectionState.Open) 78 | { 79 | try 80 | { 81 | connect.Open(); 82 | 83 | string selectData = "SELECT * FROM employees WHERE delete_date IS NULL"; 84 | 85 | using (SqlCommand cmd = new SqlCommand(selectData, connect)) 86 | { 87 | SqlDataReader reader = cmd.ExecuteReader(); 88 | 89 | while (reader.Read()) 90 | { 91 | EmployeeData ed = new EmployeeData(); 92 | ed.EmployeeID = reader["employee_id"].ToString(); 93 | ed.Name = reader["full_name"].ToString(); 94 | ed.Position = reader["position"].ToString(); 95 | ed.Salary = (int)reader["salary"]; 96 | 97 | listdata.Add(ed); 98 | } 99 | } 100 | } 101 | catch (Exception ex) 102 | { 103 | Console.WriteLine("Error: " + ex); 104 | } 105 | finally 106 | { 107 | connect.Close(); 108 | } 109 | } 110 | return listdata; 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/EmployeeManagementSystem.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {6C7DAF6B-9712-48EE-B405-C746F1E3043D} 8 | WinExe 9 | EmployeeManagementSystem 10 | EmployeeManagementSystem 11 | v4.7.2 12 | 512 13 | true 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | UserControl 51 | 52 | 53 | AddEmployee.cs 54 | 55 | 56 | UserControl 57 | 58 | 59 | Dashboard.cs 60 | 61 | 62 | 63 | Form 64 | 65 | 66 | Form1.cs 67 | 68 | 69 | Form 70 | 71 | 72 | MainForm.cs 73 | 74 | 75 | 76 | 77 | Form 78 | 79 | 80 | RegisterForm.cs 81 | 82 | 83 | UserControl 84 | 85 | 86 | Salary.cs 87 | 88 | 89 | 90 | AddEmployee.cs 91 | 92 | 93 | Dashboard.cs 94 | 95 | 96 | Form1.cs 97 | 98 | 99 | MainForm.cs 100 | 101 | 102 | ResXFileCodeGenerator 103 | Resources.Designer.cs 104 | Designer 105 | 106 | 107 | True 108 | Resources.resx 109 | True 110 | 111 | 112 | RegisterForm.cs 113 | 114 | 115 | Salary.cs 116 | 117 | 118 | SettingsSingleFileGenerator 119 | Settings.Designer.cs 120 | 121 | 122 | True 123 | Settings.settings 124 | True 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Form1.Designer.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace EmployeeManagementSystem 3 | { 4 | partial class Form1 5 | { 6 | /// 7 | /// Required designer variable. 8 | /// 9 | private System.ComponentModel.IContainer components = null; 10 | 11 | /// 12 | /// Clean up any resources being used. 13 | /// 14 | /// true if managed resources should be disposed; otherwise, false. 15 | protected override void Dispose(bool disposing) 16 | { 17 | if (disposing && (components != null)) 18 | { 19 | components.Dispose(); 20 | } 21 | base.Dispose(disposing); 22 | } 23 | 24 | #region Windows Form Designer generated code 25 | 26 | /// 27 | /// Required method for Designer support - do not modify 28 | /// the contents of this method with the code editor. 29 | /// 30 | private void InitializeComponent() 31 | { 32 | this.panel1 = new System.Windows.Forms.Panel(); 33 | this.label6 = new System.Windows.Forms.Label(); 34 | this.login_signupBtn = new System.Windows.Forms.Button(); 35 | this.label5 = new System.Windows.Forms.Label(); 36 | this.exit = new System.Windows.Forms.Label(); 37 | this.label2 = new System.Windows.Forms.Label(); 38 | this.label3 = new System.Windows.Forms.Label(); 39 | this.login_username = new System.Windows.Forms.TextBox(); 40 | this.login_password = new System.Windows.Forms.TextBox(); 41 | this.label4 = new System.Windows.Forms.Label(); 42 | this.login_showPass = new System.Windows.Forms.CheckBox(); 43 | this.login_btn = new System.Windows.Forms.Button(); 44 | this.pictureBox1 = new System.Windows.Forms.PictureBox(); 45 | this.panel1.SuspendLayout(); 46 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); 47 | this.SuspendLayout(); 48 | // 49 | // panel1 50 | // 51 | this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 52 | this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 53 | this.panel1.Controls.Add(this.pictureBox1); 54 | this.panel1.Controls.Add(this.label6); 55 | this.panel1.Controls.Add(this.login_signupBtn); 56 | this.panel1.Controls.Add(this.label5); 57 | this.panel1.Dock = System.Windows.Forms.DockStyle.Left; 58 | this.panel1.Location = new System.Drawing.Point(0, 0); 59 | this.panel1.Name = "panel1"; 60 | this.panel1.Size = new System.Drawing.Size(267, 400); 61 | this.panel1.TabIndex = 0; 62 | // 63 | // label6 64 | // 65 | this.label6.AutoSize = true; 66 | this.label6.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 67 | this.label6.ForeColor = System.Drawing.Color.White; 68 | this.label6.Location = new System.Drawing.Point(19, 175); 69 | this.label6.Name = "label6"; 70 | this.label6.Size = new System.Drawing.Size(229, 19); 71 | this.label6.TabIndex = 2; 72 | this.label6.Text = "Employee Management System"; 73 | // 74 | // login_signupBtn 75 | // 76 | this.login_signupBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(11)))), ((int)(((byte)(97))))); 77 | this.login_signupBtn.Cursor = System.Windows.Forms.Cursors.Hand; 78 | this.login_signupBtn.FlatAppearance.BorderSize = 0; 79 | this.login_signupBtn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Purple; 80 | this.login_signupBtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Purple; 81 | this.login_signupBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 82 | this.login_signupBtn.Font = new System.Drawing.Font("Arial Narrow", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 83 | this.login_signupBtn.ForeColor = System.Drawing.Color.White; 84 | this.login_signupBtn.Location = new System.Drawing.Point(22, 356); 85 | this.login_signupBtn.Name = "login_signupBtn"; 86 | this.login_signupBtn.Size = new System.Drawing.Size(226, 31); 87 | this.login_signupBtn.TabIndex = 1; 88 | this.login_signupBtn.Text = "SIGNUP"; 89 | this.login_signupBtn.UseVisualStyleBackColor = false; 90 | this.login_signupBtn.Click += new System.EventHandler(this.login_signupBtn_Click); 91 | // 92 | // label5 93 | // 94 | this.label5.AutoSize = true; 95 | this.label5.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 96 | this.label5.ForeColor = System.Drawing.Color.White; 97 | this.label5.Location = new System.Drawing.Point(70, 330); 98 | this.label5.Name = "label5"; 99 | this.label5.Size = new System.Drawing.Size(129, 14); 100 | this.label5.TabIndex = 0; 101 | this.label5.Text = "Register your Account"; 102 | this.label5.Click += new System.EventHandler(this.label5_Click); 103 | // 104 | // exit 105 | // 106 | this.exit.AutoSize = true; 107 | this.exit.Cursor = System.Windows.Forms.Cursors.Hand; 108 | this.exit.Font = new System.Drawing.Font("Tahoma", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 109 | this.exit.Location = new System.Drawing.Point(550, 7); 110 | this.exit.Name = "exit"; 111 | this.exit.Size = new System.Drawing.Size(17, 18); 112 | this.exit.TabIndex = 1; 113 | this.exit.Text = "X"; 114 | this.exit.Click += new System.EventHandler(this.exit_Click); 115 | // 116 | // label2 117 | // 118 | this.label2.AutoSize = true; 119 | this.label2.Font = new System.Drawing.Font("Arial Rounded MT Bold", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 120 | this.label2.Location = new System.Drawing.Point(286, 60); 121 | this.label2.Name = "label2"; 122 | this.label2.Size = new System.Drawing.Size(141, 22); 123 | this.label2.TabIndex = 2; 124 | this.label2.Text = "Login Account"; 125 | // 126 | // label3 127 | // 128 | this.label3.AutoSize = true; 129 | this.label3.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 130 | this.label3.Location = new System.Drawing.Point(287, 133); 131 | this.label3.Name = "label3"; 132 | this.label3.Size = new System.Drawing.Size(71, 16); 133 | this.label3.TabIndex = 3; 134 | this.label3.Text = "Username:"; 135 | // 136 | // login_username 137 | // 138 | this.login_username.Font = new System.Drawing.Font("Tahoma", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 139 | this.login_username.Location = new System.Drawing.Point(290, 153); 140 | this.login_username.Multiline = true; 141 | this.login_username.Name = "login_username"; 142 | this.login_username.Size = new System.Drawing.Size(261, 30); 143 | this.login_username.TabIndex = 4; 144 | // 145 | // login_password 146 | // 147 | this.login_password.Font = new System.Drawing.Font("Tahoma", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 148 | this.login_password.Location = new System.Drawing.Point(290, 217); 149 | this.login_password.Multiline = true; 150 | this.login_password.Name = "login_password"; 151 | this.login_password.PasswordChar = '*'; 152 | this.login_password.Size = new System.Drawing.Size(261, 30); 153 | this.login_password.TabIndex = 6; 154 | // 155 | // label4 156 | // 157 | this.label4.AutoSize = true; 158 | this.label4.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 159 | this.label4.Location = new System.Drawing.Point(287, 197); 160 | this.label4.Name = "label4"; 161 | this.label4.Size = new System.Drawing.Size(68, 16); 162 | this.label4.TabIndex = 5; 163 | this.label4.Text = "Password:"; 164 | // 165 | // login_showPass 166 | // 167 | this.login_showPass.AutoSize = true; 168 | this.login_showPass.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 169 | this.login_showPass.Location = new System.Drawing.Point(439, 253); 170 | this.login_showPass.Name = "login_showPass"; 171 | this.login_showPass.Size = new System.Drawing.Size(112, 18); 172 | this.login_showPass.TabIndex = 7; 173 | this.login_showPass.Text = "Show Password"; 174 | this.login_showPass.UseVisualStyleBackColor = true; 175 | this.login_showPass.CheckedChanged += new System.EventHandler(this.login_showPass_CheckedChanged); 176 | // 177 | // login_btn 178 | // 179 | this.login_btn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(11)))), ((int)(((byte)(97))))); 180 | this.login_btn.Cursor = System.Windows.Forms.Cursors.Hand; 181 | this.login_btn.FlatAppearance.BorderSize = 0; 182 | this.login_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 183 | this.login_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 184 | this.login_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 185 | this.login_btn.Font = new System.Drawing.Font("Arial Rounded MT Bold", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 186 | this.login_btn.ForeColor = System.Drawing.Color.White; 187 | this.login_btn.Location = new System.Drawing.Point(290, 292); 188 | this.login_btn.Name = "login_btn"; 189 | this.login_btn.Size = new System.Drawing.Size(93, 34); 190 | this.login_btn.TabIndex = 8; 191 | this.login_btn.Text = "LOGIN"; 192 | this.login_btn.UseVisualStyleBackColor = false; 193 | this.login_btn.Click += new System.EventHandler(this.login_btn_Click); 194 | // 195 | // pictureBox1 196 | // 197 | this.pictureBox1.Image = global::EmployeeManagementSystem.Properties.Resources.icons8_employee_card_100px; 198 | this.pictureBox1.Location = new System.Drawing.Point(79, 59); 199 | this.pictureBox1.Name = "pictureBox1"; 200 | this.pictureBox1.Size = new System.Drawing.Size(100, 100); 201 | this.pictureBox1.TabIndex = 3; 202 | this.pictureBox1.TabStop = false; 203 | // 204 | // Form1 205 | // 206 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 207 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 208 | this.BackColor = System.Drawing.SystemColors.ButtonHighlight; 209 | this.ClientSize = new System.Drawing.Size(575, 400); 210 | this.Controls.Add(this.login_btn); 211 | this.Controls.Add(this.login_showPass); 212 | this.Controls.Add(this.login_password); 213 | this.Controls.Add(this.label4); 214 | this.Controls.Add(this.login_username); 215 | this.Controls.Add(this.label3); 216 | this.Controls.Add(this.label2); 217 | this.Controls.Add(this.exit); 218 | this.Controls.Add(this.panel1); 219 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 220 | this.Name = "Form1"; 221 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 222 | this.Text = "Form1"; 223 | this.Load += new System.EventHandler(this.Form1_Load); 224 | this.panel1.ResumeLayout(false); 225 | this.panel1.PerformLayout(); 226 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); 227 | this.ResumeLayout(false); 228 | this.PerformLayout(); 229 | 230 | } 231 | 232 | #endregion 233 | 234 | private System.Windows.Forms.Panel panel1; 235 | private System.Windows.Forms.Label exit; 236 | private System.Windows.Forms.Label label2; 237 | private System.Windows.Forms.Label label3; 238 | private System.Windows.Forms.TextBox login_username; 239 | private System.Windows.Forms.TextBox login_password; 240 | private System.Windows.Forms.Label label4; 241 | private System.Windows.Forms.CheckBox login_showPass; 242 | private System.Windows.Forms.Button login_btn; 243 | private System.Windows.Forms.Button login_signupBtn; 244 | private System.Windows.Forms.Label label5; 245 | private System.Windows.Forms.Label label6; 246 | private System.Windows.Forms.PictureBox pictureBox1; 247 | } 248 | } 249 | 250 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Form1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using System.Data; 11 | using System.Data.SqlClient; 12 | 13 | namespace EmployeeManagementSystem 14 | { 15 | public partial class Form1 : Form 16 | { 17 | SqlConnection connect 18 | = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\WINDOWS 10\Documents\employee.mdf;Integrated Security=True;Connect Timeout=30"); 19 | public Form1() 20 | { 21 | InitializeComponent(); 22 | } 23 | 24 | private void label5_Click(object sender, EventArgs e) 25 | { 26 | 27 | } 28 | 29 | private void Form1_Load(object sender, EventArgs e) 30 | { 31 | 32 | } 33 | 34 | private void exit_Click(object sender, EventArgs e) 35 | { 36 | Application.Exit(); 37 | } 38 | 39 | private void login_signupBtn_Click(object sender, EventArgs e) 40 | { 41 | RegisterForm regForm = new RegisterForm(); 42 | regForm.Show(); 43 | this.Hide(); 44 | } 45 | 46 | private void login_showPass_CheckedChanged(object sender, EventArgs e) 47 | { 48 | login_password.PasswordChar = login_showPass.Checked ? '\0' : '*'; 49 | } 50 | 51 | private void login_btn_Click(object sender, EventArgs e) 52 | { 53 | if(login_username.Text == "" 54 | || login_password.Text == "") 55 | { 56 | MessageBox.Show("Please fill all blank fields" 57 | , "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 58 | } 59 | else 60 | { 61 | if(connect.State == ConnectionState.Closed) 62 | { 63 | try 64 | { 65 | connect.Open(); 66 | 67 | string selectData = "SELECT * FROM users WHERE username = @username " + 68 | "AND password = @password"; 69 | 70 | using(SqlCommand cmd = new SqlCommand(selectData, connect)) 71 | { 72 | cmd.Parameters.AddWithValue("@username", login_username.Text.Trim()); 73 | cmd.Parameters.AddWithValue("@password", login_password.Text.Trim()); 74 | 75 | SqlDataAdapter adapter = new SqlDataAdapter(cmd); 76 | DataTable table = new DataTable(); 77 | adapter.Fill(table); 78 | 79 | if(table.Rows.Count >= 1) 80 | { 81 | MessageBox.Show("Login successfully!" 82 | , "Information Message", MessageBoxButtons.OK, MessageBoxIcon.Information); 83 | 84 | MainForm mForm = new MainForm(); 85 | mForm.Show(); 86 | this.Hide(); 87 | } 88 | else 89 | { 90 | MessageBox.Show("Incorrect Username/Password" 91 | , "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 92 | } 93 | } 94 | } 95 | catch (Exception ex) 96 | { 97 | MessageBox.Show("Error: " + ex 98 | , "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 99 | } 100 | finally 101 | { 102 | connect.Close(); 103 | } 104 | } 105 | 106 | } 107 | } 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Form1.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/MainForm.Designer.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace EmployeeManagementSystem 3 | { 4 | partial class MainForm 5 | { 6 | /// 7 | /// Required designer variable. 8 | /// 9 | private System.ComponentModel.IContainer components = null; 10 | 11 | /// 12 | /// Clean up any resources being used. 13 | /// 14 | /// true if managed resources should be disposed; otherwise, false. 15 | protected override void Dispose(bool disposing) 16 | { 17 | if (disposing && (components != null)) 18 | { 19 | components.Dispose(); 20 | } 21 | base.Dispose(disposing); 22 | } 23 | 24 | #region Windows Form Designer generated code 25 | 26 | /// 27 | /// Required method for Designer support - do not modify 28 | /// the contents of this method with the code editor. 29 | /// 30 | private void InitializeComponent() 31 | { 32 | this.panel1 = new System.Windows.Forms.Panel(); 33 | this.exit = new System.Windows.Forms.Label(); 34 | this.label2 = new System.Windows.Forms.Label(); 35 | this.panel2 = new System.Windows.Forms.Panel(); 36 | this.greet_user = new System.Windows.Forms.Label(); 37 | this.label4 = new System.Windows.Forms.Label(); 38 | this.panel3 = new System.Windows.Forms.Panel(); 39 | this.logout_btn = new System.Windows.Forms.Button(); 40 | this.salary_btn = new System.Windows.Forms.Button(); 41 | this.addEmployee_btn = new System.Windows.Forms.Button(); 42 | this.dashboard_btn = new System.Windows.Forms.Button(); 43 | this.pictureBox1 = new System.Windows.Forms.PictureBox(); 44 | this.dashboard1 = new EmployeeManagementSystem.Dashboard(); 45 | this.addEmployee1 = new EmployeeManagementSystem.AddEmployee(); 46 | this.salary1 = new EmployeeManagementSystem.Salary(); 47 | this.panel1.SuspendLayout(); 48 | this.panel2.SuspendLayout(); 49 | this.panel3.SuspendLayout(); 50 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); 51 | this.SuspendLayout(); 52 | // 53 | // panel1 54 | // 55 | this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(11)))), ((int)(((byte)(97))))); 56 | this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 57 | this.panel1.Controls.Add(this.label2); 58 | this.panel1.Controls.Add(this.exit); 59 | this.panel1.Dock = System.Windows.Forms.DockStyle.Top; 60 | this.panel1.Location = new System.Drawing.Point(0, 0); 61 | this.panel1.Name = "panel1"; 62 | this.panel1.Size = new System.Drawing.Size(1100, 35); 63 | this.panel1.TabIndex = 0; 64 | // 65 | // exit 66 | // 67 | this.exit.AutoSize = true; 68 | this.exit.Cursor = System.Windows.Forms.Cursors.Hand; 69 | this.exit.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 70 | this.exit.ForeColor = System.Drawing.Color.White; 71 | this.exit.Location = new System.Drawing.Point(1079, 8); 72 | this.exit.Name = "exit"; 73 | this.exit.Size = new System.Drawing.Size(16, 16); 74 | this.exit.TabIndex = 0; 75 | this.exit.Text = "X"; 76 | this.exit.Click += new System.EventHandler(this.exit_Click); 77 | // 78 | // label2 79 | // 80 | this.label2.AutoSize = true; 81 | this.label2.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 82 | this.label2.ForeColor = System.Drawing.Color.White; 83 | this.label2.Location = new System.Drawing.Point(7, 9); 84 | this.label2.Name = "label2"; 85 | this.label2.Size = new System.Drawing.Size(187, 16); 86 | this.label2.TabIndex = 1; 87 | this.label2.Text = "Employee Management System"; 88 | // 89 | // panel2 90 | // 91 | this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(11)))), ((int)(((byte)(97))))); 92 | this.panel2.Controls.Add(this.label4); 93 | this.panel2.Controls.Add(this.logout_btn); 94 | this.panel2.Controls.Add(this.salary_btn); 95 | this.panel2.Controls.Add(this.addEmployee_btn); 96 | this.panel2.Controls.Add(this.dashboard_btn); 97 | this.panel2.Controls.Add(this.greet_user); 98 | this.panel2.Controls.Add(this.pictureBox1); 99 | this.panel2.Dock = System.Windows.Forms.DockStyle.Left; 100 | this.panel2.Location = new System.Drawing.Point(0, 35); 101 | this.panel2.Name = "panel2"; 102 | this.panel2.Size = new System.Drawing.Size(225, 565); 103 | this.panel2.TabIndex = 1; 104 | // 105 | // greet_user 106 | // 107 | this.greet_user.AutoSize = true; 108 | this.greet_user.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 109 | this.greet_user.ForeColor = System.Drawing.Color.White; 110 | this.greet_user.Location = new System.Drawing.Point(55, 149); 111 | this.greet_user.Name = "greet_user"; 112 | this.greet_user.Size = new System.Drawing.Size(115, 19); 113 | this.greet_user.TabIndex = 1; 114 | this.greet_user.Text = "Welcome, User"; 115 | // 116 | // label4 117 | // 118 | this.label4.AutoSize = true; 119 | this.label4.Font = new System.Drawing.Font("Tahoma", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 120 | this.label4.ForeColor = System.Drawing.Color.White; 121 | this.label4.Location = new System.Drawing.Point(53, 527); 122 | this.label4.Name = "label4"; 123 | this.label4.Size = new System.Drawing.Size(63, 18); 124 | this.label4.TabIndex = 6; 125 | this.label4.Text = "Sign Out"; 126 | // 127 | // panel3 128 | // 129 | this.panel3.Controls.Add(this.dashboard1); 130 | this.panel3.Controls.Add(this.addEmployee1); 131 | this.panel3.Controls.Add(this.salary1); 132 | this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; 133 | this.panel3.Location = new System.Drawing.Point(225, 35); 134 | this.panel3.Name = "panel3"; 135 | this.panel3.Size = new System.Drawing.Size(875, 565); 136 | this.panel3.TabIndex = 2; 137 | // 138 | // logout_btn 139 | // 140 | this.logout_btn.Cursor = System.Windows.Forms.Cursors.Hand; 141 | this.logout_btn.FlatAppearance.BorderSize = 0; 142 | this.logout_btn.FlatAppearance.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 143 | this.logout_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 144 | this.logout_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 145 | this.logout_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 146 | this.logout_btn.ForeColor = System.Drawing.Color.White; 147 | this.logout_btn.Image = global::EmployeeManagementSystem.Properties.Resources.icons8_logout_rounded_up_filled_25px; 148 | this.logout_btn.Location = new System.Drawing.Point(11, 517); 149 | this.logout_btn.Name = "logout_btn"; 150 | this.logout_btn.Size = new System.Drawing.Size(35, 35); 151 | this.logout_btn.TabIndex = 5; 152 | this.logout_btn.UseVisualStyleBackColor = true; 153 | this.logout_btn.Click += new System.EventHandler(this.logout_btn_Click); 154 | // 155 | // salary_btn 156 | // 157 | this.salary_btn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(11)))), ((int)(((byte)(97))))); 158 | this.salary_btn.Cursor = System.Windows.Forms.Cursors.Hand; 159 | this.salary_btn.FlatAppearance.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 160 | this.salary_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 161 | this.salary_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 162 | this.salary_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 163 | this.salary_btn.Font = new System.Drawing.Font("Arial Rounded MT Bold", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 164 | this.salary_btn.ForeColor = System.Drawing.Color.White; 165 | this.salary_btn.Image = global::EmployeeManagementSystem.Properties.Resources.icons8_Salary_male_30px; 166 | this.salary_btn.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 167 | this.salary_btn.Location = new System.Drawing.Point(14, 334); 168 | this.salary_btn.Name = "salary_btn"; 169 | this.salary_btn.Size = new System.Drawing.Size(200, 40); 170 | this.salary_btn.TabIndex = 4; 171 | this.salary_btn.Text = "SALARY"; 172 | this.salary_btn.UseVisualStyleBackColor = false; 173 | this.salary_btn.Click += new System.EventHandler(this.salary_btn_Click); 174 | // 175 | // addEmployee_btn 176 | // 177 | this.addEmployee_btn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(11)))), ((int)(((byte)(97))))); 178 | this.addEmployee_btn.Cursor = System.Windows.Forms.Cursors.Hand; 179 | this.addEmployee_btn.FlatAppearance.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 180 | this.addEmployee_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 181 | this.addEmployee_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 182 | this.addEmployee_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 183 | this.addEmployee_btn.Font = new System.Drawing.Font("Arial Rounded MT Bold", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 184 | this.addEmployee_btn.ForeColor = System.Drawing.Color.White; 185 | this.addEmployee_btn.Image = global::EmployeeManagementSystem.Properties.Resources.icons8_employee_card_30px; 186 | this.addEmployee_btn.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 187 | this.addEmployee_btn.Location = new System.Drawing.Point(14, 277); 188 | this.addEmployee_btn.Name = "addEmployee_btn"; 189 | this.addEmployee_btn.Size = new System.Drawing.Size(200, 40); 190 | this.addEmployee_btn.TabIndex = 3; 191 | this.addEmployee_btn.Text = "ADD EMPLOYEE"; 192 | this.addEmployee_btn.UseVisualStyleBackColor = false; 193 | this.addEmployee_btn.Click += new System.EventHandler(this.addEmployee_btn_Click); 194 | // 195 | // dashboard_btn 196 | // 197 | this.dashboard_btn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(11)))), ((int)(((byte)(97))))); 198 | this.dashboard_btn.Cursor = System.Windows.Forms.Cursors.Hand; 199 | this.dashboard_btn.FlatAppearance.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 200 | this.dashboard_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 201 | this.dashboard_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 202 | this.dashboard_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 203 | this.dashboard_btn.Font = new System.Drawing.Font("Arial Rounded MT Bold", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 204 | this.dashboard_btn.ForeColor = System.Drawing.Color.White; 205 | this.dashboard_btn.Image = global::EmployeeManagementSystem.Properties.Resources.icons8_dashboard_30px; 206 | this.dashboard_btn.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; 207 | this.dashboard_btn.Location = new System.Drawing.Point(14, 220); 208 | this.dashboard_btn.Name = "dashboard_btn"; 209 | this.dashboard_btn.Size = new System.Drawing.Size(200, 40); 210 | this.dashboard_btn.TabIndex = 2; 211 | this.dashboard_btn.Text = "DASHBOARD"; 212 | this.dashboard_btn.UseVisualStyleBackColor = false; 213 | this.dashboard_btn.Click += new System.EventHandler(this.dashboard_btn_Click); 214 | // 215 | // pictureBox1 216 | // 217 | this.pictureBox1.Image = global::EmployeeManagementSystem.Properties.Resources.icons8_employee_card_100px; 218 | this.pictureBox1.Location = new System.Drawing.Point(62, 45); 219 | this.pictureBox1.Name = "pictureBox1"; 220 | this.pictureBox1.Size = new System.Drawing.Size(100, 100); 221 | this.pictureBox1.TabIndex = 0; 222 | this.pictureBox1.TabStop = false; 223 | // 224 | // dashboard1 225 | // 226 | this.dashboard1.Location = new System.Drawing.Point(0, 0); 227 | this.dashboard1.Name = "dashboard1"; 228 | this.dashboard1.Size = new System.Drawing.Size(875, 565); 229 | this.dashboard1.TabIndex = 2; 230 | // 231 | // addEmployee1 232 | // 233 | this.addEmployee1.Location = new System.Drawing.Point(0, 0); 234 | this.addEmployee1.Name = "addEmployee1"; 235 | this.addEmployee1.Size = new System.Drawing.Size(875, 565); 236 | this.addEmployee1.TabIndex = 1; 237 | // 238 | // salary1 239 | // 240 | this.salary1.Location = new System.Drawing.Point(0, 0); 241 | this.salary1.Name = "salary1"; 242 | this.salary1.Size = new System.Drawing.Size(875, 565); 243 | this.salary1.TabIndex = 0; 244 | // 245 | // MainForm 246 | // 247 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 248 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 249 | this.ClientSize = new System.Drawing.Size(1100, 600); 250 | this.Controls.Add(this.panel3); 251 | this.Controls.Add(this.panel2); 252 | this.Controls.Add(this.panel1); 253 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 254 | this.Name = "MainForm"; 255 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 256 | this.Text = "MainForm"; 257 | this.panel1.ResumeLayout(false); 258 | this.panel1.PerformLayout(); 259 | this.panel2.ResumeLayout(false); 260 | this.panel2.PerformLayout(); 261 | this.panel3.ResumeLayout(false); 262 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); 263 | this.ResumeLayout(false); 264 | 265 | } 266 | 267 | #endregion 268 | 269 | private System.Windows.Forms.Panel panel1; 270 | private System.Windows.Forms.Label exit; 271 | private System.Windows.Forms.Label label2; 272 | private System.Windows.Forms.Panel panel2; 273 | private System.Windows.Forms.PictureBox pictureBox1; 274 | private System.Windows.Forms.Label greet_user; 275 | private System.Windows.Forms.Button dashboard_btn; 276 | private System.Windows.Forms.Button salary_btn; 277 | private System.Windows.Forms.Button addEmployee_btn; 278 | private System.Windows.Forms.Button logout_btn; 279 | private System.Windows.Forms.Label label4; 280 | private System.Windows.Forms.Panel panel3; 281 | private Salary salary1; 282 | private Dashboard dashboard1; 283 | private AddEmployee addEmployee1; 284 | } 285 | } -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/MainForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace EmployeeManagementSystem 12 | { 13 | public partial class MainForm : Form 14 | { 15 | public MainForm() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | private void exit_Click(object sender, EventArgs e) 21 | { 22 | Application.Exit(); 23 | } 24 | 25 | private void logout_btn_Click(object sender, EventArgs e) 26 | { 27 | DialogResult check = MessageBox.Show("Are you sure you want to logout?" 28 | , "Confirmation Message", MessageBoxButtons.YesNo, MessageBoxIcon.Question); 29 | 30 | if(check == DialogResult.Yes) 31 | { 32 | Form1 loginForm = new Form1(); 33 | loginForm.Show(); 34 | this.Hide(); 35 | } 36 | } 37 | 38 | private void dashboard_btn_Click(object sender, EventArgs e) 39 | { 40 | dashboard1.Visible = true; 41 | addEmployee1.Visible = false; 42 | salary1.Visible = false; 43 | 44 | Dashboard dashForm = dashboard1 as Dashboard; 45 | 46 | if(dashForm != null) 47 | { 48 | dashForm.RefreshData(); 49 | } 50 | 51 | } 52 | 53 | private void addEmployee_btn_Click(object sender, EventArgs e) 54 | { 55 | dashboard1.Visible = false; 56 | addEmployee1.Visible = true; 57 | salary1.Visible = false; 58 | 59 | AddEmployee addEmForm = addEmployee1 as AddEmployee; 60 | 61 | if(addEmForm != null) 62 | { 63 | addEmForm.RefreshData(); 64 | } 65 | 66 | } 67 | 68 | private void salary_btn_Click(object sender, EventArgs e) 69 | { 70 | dashboard1.Visible = false; 71 | addEmployee1.Visible = false; 72 | salary1.Visible = true; 73 | 74 | Salary salaryForm = salary1 as Salary; 75 | 76 | if(salaryForm != null) 77 | { 78 | salaryForm.RefreshData(); 79 | } 80 | 81 | } 82 | } 83 | } 84 | 85 | 86 | // THATS IT FOR THIS VIDEO, THANKS FOR WATCHING! 87 | // SUBSCRIBE FOR MORE C# PROJECT TUTORIALS 88 | // THANKS : ) -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/MainForm.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace EmployeeManagementSystem 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new Form1()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("EmployeeManagementSystem")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("EmployeeManagementSystem")] 13 | [assembly: AssemblyCopyright("Copyright © 2023")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("6c7daf6b-9712-48ee-b405-c746f1e3043d")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace EmployeeManagementSystem.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("EmployeeManagementSystem.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap icons8_dashboard_30px { 67 | get { 68 | object obj = ResourceManager.GetObject("icons8_dashboard_30px", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// Looks up a localized resource of type System.Drawing.Bitmap. 75 | /// 76 | internal static System.Drawing.Bitmap icons8_employee_card_100px { 77 | get { 78 | object obj = ResourceManager.GetObject("icons8_employee_card_100px", resourceCulture); 79 | return ((System.Drawing.Bitmap)(obj)); 80 | } 81 | } 82 | 83 | /// 84 | /// Looks up a localized resource of type System.Drawing.Bitmap. 85 | /// 86 | internal static System.Drawing.Bitmap icons8_employee_card_30px { 87 | get { 88 | object obj = ResourceManager.GetObject("icons8_employee_card_30px", resourceCulture); 89 | return ((System.Drawing.Bitmap)(obj)); 90 | } 91 | } 92 | 93 | /// 94 | /// Looks up a localized resource of type System.Drawing.Bitmap. 95 | /// 96 | internal static System.Drawing.Bitmap icons8_employee_card_60px_1 { 97 | get { 98 | object obj = ResourceManager.GetObject("icons8_employee_card_60px_1", resourceCulture); 99 | return ((System.Drawing.Bitmap)(obj)); 100 | } 101 | } 102 | 103 | /// 104 | /// Looks up a localized resource of type System.Drawing.Bitmap. 105 | /// 106 | internal static System.Drawing.Bitmap icons8_group_background_selected_60px { 107 | get { 108 | object obj = ResourceManager.GetObject("icons8_group_background_selected_60px", resourceCulture); 109 | return ((System.Drawing.Bitmap)(obj)); 110 | } 111 | } 112 | 113 | /// 114 | /// Looks up a localized resource of type System.Drawing.Bitmap. 115 | /// 116 | internal static System.Drawing.Bitmap icons8_group_background_selected_filled_60px { 117 | get { 118 | object obj = ResourceManager.GetObject("icons8_group_background_selected_filled_60px", resourceCulture); 119 | return ((System.Drawing.Bitmap)(obj)); 120 | } 121 | } 122 | 123 | /// 124 | /// Looks up a localized resource of type System.Drawing.Bitmap. 125 | /// 126 | internal static System.Drawing.Bitmap icons8_logout_rounded_up_filled_25px { 127 | get { 128 | object obj = ResourceManager.GetObject("icons8_logout_rounded_up_filled_25px", resourceCulture); 129 | return ((System.Drawing.Bitmap)(obj)); 130 | } 131 | } 132 | 133 | /// 134 | /// Looks up a localized resource of type System.Drawing.Bitmap. 135 | /// 136 | internal static System.Drawing.Bitmap icons8_Salary_male_30px { 137 | get { 138 | object obj = ResourceManager.GetObject("icons8_Salary_male_30px", resourceCulture); 139 | return ((System.Drawing.Bitmap)(obj)); 140 | } 141 | } 142 | 143 | /// 144 | /// Looks up a localized resource of type System.Drawing.Bitmap. 145 | /// 146 | internal static System.Drawing.Bitmap pexels_jane_doan_1024248 { 147 | get { 148 | object obj = ResourceManager.GetObject("pexels-jane-doan-1024248", resourceCulture); 149 | return ((System.Drawing.Bitmap)(obj)); 150 | } 151 | } 152 | } 153 | } 154 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\Assets\icons8_employee_card_30px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | ..\Assets\icons8_logout_rounded_up_filled_25px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | 128 | ..\Assets\icons8_dashboard_30px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 129 | 130 | 131 | ..\Assets\icons8_Salary_male_30px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 132 | 133 | 134 | ..\Assets\icons8_employee_card_100px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 135 | 136 | 137 | ..\Assets\icons8_employee_card_60px_1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 138 | 139 | 140 | ..\Assets\icons8_group_background_selected_60px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 141 | 142 | 143 | ..\Assets\icons8_group_background_selected_filled_60px.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 144 | 145 | 146 | ..\Resources\pexels-jane-doan-1024248.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 147 | 148 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | 12 | namespace EmployeeManagementSystem.Properties 13 | { 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 17 | { 18 | 19 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 20 | 21 | public static Settings Default 22 | { 23 | get 24 | { 25 | return defaultInstance; 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/RegisterForm.Designer.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace EmployeeManagementSystem 3 | { 4 | partial class RegisterForm 5 | { 6 | /// 7 | /// Required designer variable. 8 | /// 9 | private System.ComponentModel.IContainer components = null; 10 | 11 | /// 12 | /// Clean up any resources being used. 13 | /// 14 | /// true if managed resources should be disposed; otherwise, false. 15 | protected override void Dispose(bool disposing) 16 | { 17 | if (disposing && (components != null)) 18 | { 19 | components.Dispose(); 20 | } 21 | base.Dispose(disposing); 22 | } 23 | 24 | #region Windows Form Designer generated code 25 | 26 | /// 27 | /// Required method for Designer support - do not modify 28 | /// the contents of this method with the code editor. 29 | /// 30 | private void InitializeComponent() 31 | { 32 | this.signup_btn = new System.Windows.Forms.Button(); 33 | this.signup_showPass = new System.Windows.Forms.CheckBox(); 34 | this.signup_password = new System.Windows.Forms.TextBox(); 35 | this.label4 = new System.Windows.Forms.Label(); 36 | this.signup_username = new System.Windows.Forms.TextBox(); 37 | this.label3 = new System.Windows.Forms.Label(); 38 | this.label2 = new System.Windows.Forms.Label(); 39 | this.exit = new System.Windows.Forms.Label(); 40 | this.panel1 = new System.Windows.Forms.Panel(); 41 | this.pictureBox1 = new System.Windows.Forms.PictureBox(); 42 | this.label6 = new System.Windows.Forms.Label(); 43 | this.signup_loginBtn = new System.Windows.Forms.Button(); 44 | this.label5 = new System.Windows.Forms.Label(); 45 | this.panel1.SuspendLayout(); 46 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); 47 | this.SuspendLayout(); 48 | // 49 | // signup_btn 50 | // 51 | this.signup_btn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(11)))), ((int)(((byte)(97))))); 52 | this.signup_btn.Cursor = System.Windows.Forms.Cursors.Hand; 53 | this.signup_btn.FlatAppearance.BorderSize = 0; 54 | this.signup_btn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 55 | this.signup_btn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 56 | this.signup_btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 57 | this.signup_btn.Font = new System.Drawing.Font("Arial Rounded MT Bold", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 58 | this.signup_btn.ForeColor = System.Drawing.Color.White; 59 | this.signup_btn.Location = new System.Drawing.Point(294, 292); 60 | this.signup_btn.Name = "signup_btn"; 61 | this.signup_btn.Size = new System.Drawing.Size(93, 34); 62 | this.signup_btn.TabIndex = 17; 63 | this.signup_btn.Text = "SIGNUP"; 64 | this.signup_btn.UseVisualStyleBackColor = false; 65 | this.signup_btn.Click += new System.EventHandler(this.signup_btn_Click); 66 | // 67 | // signup_showPass 68 | // 69 | this.signup_showPass.AutoSize = true; 70 | this.signup_showPass.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 71 | this.signup_showPass.Location = new System.Drawing.Point(443, 253); 72 | this.signup_showPass.Name = "signup_showPass"; 73 | this.signup_showPass.Size = new System.Drawing.Size(112, 18); 74 | this.signup_showPass.TabIndex = 16; 75 | this.signup_showPass.Text = "Show Password"; 76 | this.signup_showPass.UseVisualStyleBackColor = true; 77 | this.signup_showPass.CheckedChanged += new System.EventHandler(this.signup_showPass_CheckedChanged); 78 | // 79 | // signup_password 80 | // 81 | this.signup_password.Font = new System.Drawing.Font("Tahoma", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 82 | this.signup_password.Location = new System.Drawing.Point(294, 217); 83 | this.signup_password.Multiline = true; 84 | this.signup_password.Name = "signup_password"; 85 | this.signup_password.PasswordChar = '*'; 86 | this.signup_password.Size = new System.Drawing.Size(261, 30); 87 | this.signup_password.TabIndex = 15; 88 | // 89 | // label4 90 | // 91 | this.label4.AutoSize = true; 92 | this.label4.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 93 | this.label4.Location = new System.Drawing.Point(291, 197); 94 | this.label4.Name = "label4"; 95 | this.label4.Size = new System.Drawing.Size(68, 16); 96 | this.label4.TabIndex = 14; 97 | this.label4.Text = "Password:"; 98 | // 99 | // signup_username 100 | // 101 | this.signup_username.Font = new System.Drawing.Font("Tahoma", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 102 | this.signup_username.Location = new System.Drawing.Point(294, 153); 103 | this.signup_username.Multiline = true; 104 | this.signup_username.Name = "signup_username"; 105 | this.signup_username.Size = new System.Drawing.Size(261, 30); 106 | this.signup_username.TabIndex = 13; 107 | // 108 | // label3 109 | // 110 | this.label3.AutoSize = true; 111 | this.label3.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 112 | this.label3.Location = new System.Drawing.Point(291, 133); 113 | this.label3.Name = "label3"; 114 | this.label3.Size = new System.Drawing.Size(71, 16); 115 | this.label3.TabIndex = 12; 116 | this.label3.Text = "Username:"; 117 | // 118 | // label2 119 | // 120 | this.label2.AutoSize = true; 121 | this.label2.Font = new System.Drawing.Font("Arial Rounded MT Bold", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 122 | this.label2.Location = new System.Drawing.Point(290, 60); 123 | this.label2.Name = "label2"; 124 | this.label2.Size = new System.Drawing.Size(169, 22); 125 | this.label2.TabIndex = 11; 126 | this.label2.Text = "Register Account"; 127 | // 128 | // exit 129 | // 130 | this.exit.AutoSize = true; 131 | this.exit.Cursor = System.Windows.Forms.Cursors.Hand; 132 | this.exit.Font = new System.Drawing.Font("Tahoma", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 133 | this.exit.Location = new System.Drawing.Point(551, 7); 134 | this.exit.Name = "exit"; 135 | this.exit.Size = new System.Drawing.Size(17, 18); 136 | this.exit.TabIndex = 10; 137 | this.exit.Text = "X"; 138 | this.exit.Click += new System.EventHandler(this.exit_Click); 139 | // 140 | // panel1 141 | // 142 | this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 143 | this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 144 | this.panel1.Controls.Add(this.pictureBox1); 145 | this.panel1.Controls.Add(this.label6); 146 | this.panel1.Controls.Add(this.signup_loginBtn); 147 | this.panel1.Controls.Add(this.label5); 148 | this.panel1.Dock = System.Windows.Forms.DockStyle.Left; 149 | this.panel1.Location = new System.Drawing.Point(0, 0); 150 | this.panel1.Name = "panel1"; 151 | this.panel1.Size = new System.Drawing.Size(267, 400); 152 | this.panel1.TabIndex = 9; 153 | // 154 | // pictureBox1 155 | // 156 | this.pictureBox1.Image = global::EmployeeManagementSystem.Properties.Resources.icons8_employee_card_100px; 157 | this.pictureBox1.Location = new System.Drawing.Point(79, 59); 158 | this.pictureBox1.Name = "pictureBox1"; 159 | this.pictureBox1.Size = new System.Drawing.Size(100, 100); 160 | this.pictureBox1.TabIndex = 3; 161 | this.pictureBox1.TabStop = false; 162 | // 163 | // label6 164 | // 165 | this.label6.AutoSize = true; 166 | this.label6.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 167 | this.label6.ForeColor = System.Drawing.Color.White; 168 | this.label6.Location = new System.Drawing.Point(19, 175); 169 | this.label6.Name = "label6"; 170 | this.label6.Size = new System.Drawing.Size(229, 19); 171 | this.label6.TabIndex = 2; 172 | this.label6.Text = "Employee Management System"; 173 | // 174 | // signup_loginBtn 175 | // 176 | this.signup_loginBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(11)))), ((int)(((byte)(97))))); 177 | this.signup_loginBtn.Cursor = System.Windows.Forms.Cursors.Hand; 178 | this.signup_loginBtn.FlatAppearance.BorderSize = 0; 179 | this.signup_loginBtn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Purple; 180 | this.signup_loginBtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Purple; 181 | this.signup_loginBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 182 | this.signup_loginBtn.Font = new System.Drawing.Font("Arial Narrow", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 183 | this.signup_loginBtn.ForeColor = System.Drawing.Color.White; 184 | this.signup_loginBtn.Location = new System.Drawing.Point(22, 356); 185 | this.signup_loginBtn.Name = "signup_loginBtn"; 186 | this.signup_loginBtn.Size = new System.Drawing.Size(226, 31); 187 | this.signup_loginBtn.TabIndex = 1; 188 | this.signup_loginBtn.Text = "SIGN IN"; 189 | this.signup_loginBtn.UseVisualStyleBackColor = false; 190 | this.signup_loginBtn.Click += new System.EventHandler(this.signup_loginBtn_Click); 191 | // 192 | // label5 193 | // 194 | this.label5.AutoSize = true; 195 | this.label5.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 196 | this.label5.ForeColor = System.Drawing.Color.White; 197 | this.label5.Location = new System.Drawing.Point(81, 332); 198 | this.label5.Name = "label5"; 199 | this.label5.Size = new System.Drawing.Size(114, 14); 200 | this.label5.TabIndex = 0; 201 | this.label5.Text = "Login your Account"; 202 | // 203 | // RegisterForm 204 | // 205 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 206 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 207 | this.BackColor = System.Drawing.SystemColors.ButtonHighlight; 208 | this.ClientSize = new System.Drawing.Size(575, 400); 209 | this.Controls.Add(this.signup_btn); 210 | this.Controls.Add(this.signup_showPass); 211 | this.Controls.Add(this.signup_password); 212 | this.Controls.Add(this.label4); 213 | this.Controls.Add(this.signup_username); 214 | this.Controls.Add(this.label3); 215 | this.Controls.Add(this.label2); 216 | this.Controls.Add(this.exit); 217 | this.Controls.Add(this.panel1); 218 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 219 | this.Name = "RegisterForm"; 220 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 221 | this.Text = "RegisterForm"; 222 | this.Load += new System.EventHandler(this.RegisterForm_Load); 223 | this.panel1.ResumeLayout(false); 224 | this.panel1.PerformLayout(); 225 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); 226 | this.ResumeLayout(false); 227 | this.PerformLayout(); 228 | 229 | } 230 | 231 | #endregion 232 | 233 | private System.Windows.Forms.Button signup_btn; 234 | private System.Windows.Forms.CheckBox signup_showPass; 235 | private System.Windows.Forms.TextBox signup_password; 236 | private System.Windows.Forms.Label label4; 237 | private System.Windows.Forms.TextBox signup_username; 238 | private System.Windows.Forms.Label label3; 239 | private System.Windows.Forms.Label label2; 240 | private System.Windows.Forms.Label exit; 241 | private System.Windows.Forms.Panel panel1; 242 | private System.Windows.Forms.PictureBox pictureBox1; 243 | private System.Windows.Forms.Label label6; 244 | private System.Windows.Forms.Button signup_loginBtn; 245 | private System.Windows.Forms.Label label5; 246 | } 247 | } -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/RegisterForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using System.Data; 11 | using System.Data.SqlClient; 12 | 13 | namespace EmployeeManagementSystem 14 | { 15 | public partial class RegisterForm : Form 16 | { 17 | SqlConnection connect 18 | = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\WINDOWS 10\Documents\employee.mdf;Integrated Security=True;Connect Timeout=30"); 19 | public RegisterForm() 20 | { 21 | InitializeComponent(); 22 | } 23 | 24 | private void exit_Click(object sender, EventArgs e) 25 | { 26 | Application.Exit(); 27 | } 28 | 29 | private void signup_loginBtn_Click(object sender, EventArgs e) 30 | { 31 | Form1 loginForm = new Form1(); 32 | loginForm.Show(); 33 | this.Hide(); 34 | } 35 | 36 | private void RegisterForm_Load(object sender, EventArgs e) 37 | { 38 | 39 | } 40 | 41 | private void signup_btn_Click(object sender, EventArgs e) 42 | { 43 | if(signup_username.Text == "" 44 | || signup_password.Text == "") 45 | { 46 | MessageBox.Show("Please fill all blank fields" 47 | , "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 48 | } 49 | else 50 | { 51 | if(connect.State != ConnectionState.Open) 52 | { 53 | try 54 | { 55 | connect.Open(); 56 | // TO CHECK IF THE USER IS EXISTING ALREADY 57 | string selectUsername = "SELECT COUNT(id) FROM users WHERE username = @user"; 58 | 59 | using(SqlCommand checkUser = new SqlCommand(selectUsername, connect)) 60 | { 61 | checkUser.Parameters.AddWithValue("@user", signup_username.Text.Trim()); 62 | int count = (int)checkUser.ExecuteScalar(); 63 | 64 | if(count >= 1) 65 | { 66 | MessageBox.Show(signup_username.Text.Trim() + " is already taken" 67 | , "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 68 | } 69 | else 70 | { 71 | DateTime today = DateTime.Today; 72 | 73 | string insertData = "INSERT INTO users " + 74 | "(username, password, date_register) " + 75 | "VALUES(@username, @password, @dateReg)"; 76 | 77 | using (SqlCommand cmd = new SqlCommand(insertData, connect)) 78 | { 79 | cmd.Parameters.AddWithValue("@username", signup_username.Text.Trim()); 80 | cmd.Parameters.AddWithValue("@password", signup_password.Text.Trim()); 81 | cmd.Parameters.AddWithValue("@dateReg", today); 82 | 83 | cmd.ExecuteNonQuery(); 84 | 85 | MessageBox.Show("Registered successfully!" 86 | , "Information Message", MessageBoxButtons.OK, MessageBoxIcon.Information); 87 | 88 | Form1 loginForm = new Form1(); 89 | loginForm.Show(); 90 | this.Hide(); 91 | } 92 | } 93 | } 94 | 95 | 96 | 97 | }catch(Exception ex) 98 | { 99 | MessageBox.Show("Error: " + ex 100 | , "Error Message", MessageBoxButtons.OK, MessageBoxIcon.Error); 101 | } 102 | finally 103 | { 104 | connect.Close(); 105 | } 106 | } 107 | } 108 | } 109 | 110 | private void signup_showPass_CheckedChanged(object sender, EventArgs e) 111 | { 112 | signup_password.PasswordChar = signup_showPass.Checked ? '\0' : '*'; 113 | } 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/RegisterForm.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Resources/pexels-jane-doan-1024248.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/Resources/pexels-jane-doan-1024248.jpg -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Salary.Designer.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace EmployeeManagementSystem 3 | { 4 | partial class Salary 5 | { 6 | /// 7 | /// Required designer variable. 8 | /// 9 | private System.ComponentModel.IContainer components = null; 10 | 11 | /// 12 | /// Clean up any resources being used. 13 | /// 14 | /// true if managed resources should be disposed; otherwise, false. 15 | protected override void Dispose(bool disposing) 16 | { 17 | if (disposing && (components != null)) 18 | { 19 | components.Dispose(); 20 | } 21 | base.Dispose(disposing); 22 | } 23 | 24 | #region Component Designer generated code 25 | 26 | /// 27 | /// Required method for Designer support - do not modify 28 | /// the contents of this method with the code editor. 29 | /// 30 | private void InitializeComponent() 31 | { 32 | System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); 33 | this.panel1 = new System.Windows.Forms.Panel(); 34 | this.salary_clearBtn = new System.Windows.Forms.Button(); 35 | this.salary_updateBtn = new System.Windows.Forms.Button(); 36 | this.salary_salary = new System.Windows.Forms.TextBox(); 37 | this.label5 = new System.Windows.Forms.Label(); 38 | this.salary_position = new System.Windows.Forms.TextBox(); 39 | this.label4 = new System.Windows.Forms.Label(); 40 | this.salary_name = new System.Windows.Forms.TextBox(); 41 | this.label3 = new System.Windows.Forms.Label(); 42 | this.salary_employeeID = new System.Windows.Forms.TextBox(); 43 | this.label2 = new System.Windows.Forms.Label(); 44 | this.panel2 = new System.Windows.Forms.Panel(); 45 | this.label1 = new System.Windows.Forms.Label(); 46 | this.dataGridView1 = new System.Windows.Forms.DataGridView(); 47 | this.panel1.SuspendLayout(); 48 | this.panel2.SuspendLayout(); 49 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); 50 | this.SuspendLayout(); 51 | // 52 | // panel1 53 | // 54 | this.panel1.BackColor = System.Drawing.SystemColors.ButtonHighlight; 55 | this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 56 | this.panel1.Controls.Add(this.salary_clearBtn); 57 | this.panel1.Controls.Add(this.salary_updateBtn); 58 | this.panel1.Controls.Add(this.salary_salary); 59 | this.panel1.Controls.Add(this.label5); 60 | this.panel1.Controls.Add(this.salary_position); 61 | this.panel1.Controls.Add(this.label4); 62 | this.panel1.Controls.Add(this.salary_name); 63 | this.panel1.Controls.Add(this.label3); 64 | this.panel1.Controls.Add(this.salary_employeeID); 65 | this.panel1.Controls.Add(this.label2); 66 | this.panel1.Location = new System.Drawing.Point(16, 23); 67 | this.panel1.Name = "panel1"; 68 | this.panel1.Size = new System.Drawing.Size(279, 517); 69 | this.panel1.TabIndex = 0; 70 | // 71 | // salary_clearBtn 72 | // 73 | this.salary_clearBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(11)))), ((int)(((byte)(97))))); 74 | this.salary_clearBtn.Cursor = System.Windows.Forms.Cursors.Hand; 75 | this.salary_clearBtn.FlatAppearance.BorderSize = 0; 76 | this.salary_clearBtn.FlatAppearance.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 77 | this.salary_clearBtn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 78 | this.salary_clearBtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 79 | this.salary_clearBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 80 | this.salary_clearBtn.Font = new System.Drawing.Font("Arial Rounded MT Bold", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 81 | this.salary_clearBtn.ForeColor = System.Drawing.Color.White; 82 | this.salary_clearBtn.Location = new System.Drawing.Point(147, 312); 83 | this.salary_clearBtn.Name = "salary_clearBtn"; 84 | this.salary_clearBtn.Size = new System.Drawing.Size(96, 37); 85 | this.salary_clearBtn.TabIndex = 16; 86 | this.salary_clearBtn.Text = "Clear"; 87 | this.salary_clearBtn.UseVisualStyleBackColor = false; 88 | this.salary_clearBtn.Click += new System.EventHandler(this.salary_clearBtn_Click); 89 | // 90 | // salary_updateBtn 91 | // 92 | this.salary_updateBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(11)))), ((int)(((byte)(97))))); 93 | this.salary_updateBtn.Cursor = System.Windows.Forms.Cursors.Hand; 94 | this.salary_updateBtn.FlatAppearance.BorderSize = 0; 95 | this.salary_updateBtn.FlatAppearance.CheckedBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 96 | this.salary_updateBtn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 97 | this.salary_updateBtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(75)))), ((int)(((byte)(8)))), ((int)(((byte)(138))))); 98 | this.salary_updateBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 99 | this.salary_updateBtn.Font = new System.Drawing.Font("Arial Rounded MT Bold", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 100 | this.salary_updateBtn.ForeColor = System.Drawing.Color.White; 101 | this.salary_updateBtn.Location = new System.Drawing.Point(31, 312); 102 | this.salary_updateBtn.Name = "salary_updateBtn"; 103 | this.salary_updateBtn.Size = new System.Drawing.Size(96, 37); 104 | this.salary_updateBtn.TabIndex = 15; 105 | this.salary_updateBtn.Text = "Update"; 106 | this.salary_updateBtn.UseVisualStyleBackColor = false; 107 | this.salary_updateBtn.Click += new System.EventHandler(this.salary_updateBtn_Click); 108 | // 109 | // salary_salary 110 | // 111 | this.salary_salary.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 112 | this.salary_salary.Location = new System.Drawing.Point(22, 245); 113 | this.salary_salary.Multiline = true; 114 | this.salary_salary.Name = "salary_salary"; 115 | this.salary_salary.Size = new System.Drawing.Size(239, 25); 116 | this.salary_salary.TabIndex = 7; 117 | // 118 | // label5 119 | // 120 | this.label5.AutoSize = true; 121 | this.label5.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 122 | this.label5.Location = new System.Drawing.Point(19, 226); 123 | this.label5.Name = "label5"; 124 | this.label5.Size = new System.Drawing.Size(49, 16); 125 | this.label5.TabIndex = 6; 126 | this.label5.Text = "Salary:"; 127 | // 128 | // salary_position 129 | // 130 | this.salary_position.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 131 | this.salary_position.Location = new System.Drawing.Point(22, 186); 132 | this.salary_position.Multiline = true; 133 | this.salary_position.Name = "salary_position"; 134 | this.salary_position.Size = new System.Drawing.Size(239, 25); 135 | this.salary_position.TabIndex = 5; 136 | // 137 | // label4 138 | // 139 | this.label4.AutoSize = true; 140 | this.label4.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 141 | this.label4.Location = new System.Drawing.Point(19, 167); 142 | this.label4.Name = "label4"; 143 | this.label4.Size = new System.Drawing.Size(57, 16); 144 | this.label4.TabIndex = 4; 145 | this.label4.Text = "Position:"; 146 | // 147 | // salary_name 148 | // 149 | this.salary_name.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 150 | this.salary_name.Location = new System.Drawing.Point(22, 126); 151 | this.salary_name.Multiline = true; 152 | this.salary_name.Name = "salary_name"; 153 | this.salary_name.Size = new System.Drawing.Size(239, 25); 154 | this.salary_name.TabIndex = 3; 155 | // 156 | // label3 157 | // 158 | this.label3.AutoSize = true; 159 | this.label3.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 160 | this.label3.Location = new System.Drawing.Point(19, 107); 161 | this.label3.Name = "label3"; 162 | this.label3.Size = new System.Drawing.Size(70, 16); 163 | this.label3.TabIndex = 2; 164 | this.label3.Text = "Full Name:"; 165 | // 166 | // salary_employeeID 167 | // 168 | this.salary_employeeID.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 169 | this.salary_employeeID.Location = new System.Drawing.Point(22, 64); 170 | this.salary_employeeID.Multiline = true; 171 | this.salary_employeeID.Name = "salary_employeeID"; 172 | this.salary_employeeID.Size = new System.Drawing.Size(239, 25); 173 | this.salary_employeeID.TabIndex = 1; 174 | // 175 | // label2 176 | // 177 | this.label2.AutoSize = true; 178 | this.label2.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 179 | this.label2.Location = new System.Drawing.Point(19, 45); 180 | this.label2.Name = "label2"; 181 | this.label2.Size = new System.Drawing.Size(84, 16); 182 | this.label2.TabIndex = 0; 183 | this.label2.Text = "Employee ID:"; 184 | // 185 | // panel2 186 | // 187 | this.panel2.BackColor = System.Drawing.SystemColors.ButtonHighlight; 188 | this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 189 | this.panel2.Controls.Add(this.dataGridView1); 190 | this.panel2.Controls.Add(this.label1); 191 | this.panel2.Location = new System.Drawing.Point(311, 23); 192 | this.panel2.Name = "panel2"; 193 | this.panel2.Size = new System.Drawing.Size(547, 517); 194 | this.panel2.TabIndex = 1; 195 | // 196 | // label1 197 | // 198 | this.label1.AutoSize = true; 199 | this.label1.Font = new System.Drawing.Font("Tahoma", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 200 | this.label1.Location = new System.Drawing.Point(16, 22); 201 | this.label1.Name = "label1"; 202 | this.label1.Size = new System.Drawing.Size(99, 23); 203 | this.label1.TabIndex = 0; 204 | this.label1.Text = "Employees"; 205 | // 206 | // dataGridView1 207 | // 208 | this.dataGridView1.AllowUserToAddRows = false; 209 | this.dataGridView1.AllowUserToDeleteRows = false; 210 | dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; 211 | dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(11)))), ((int)(((byte)(97))))); 212 | dataGridViewCellStyle2.Font = new System.Drawing.Font("Arial Rounded MT Bold", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 213 | dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White; 214 | dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; 215 | dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; 216 | dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; 217 | this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; 218 | this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; 219 | this.dataGridView1.EnableHeadersVisualStyles = false; 220 | this.dataGridView1.Location = new System.Drawing.Point(20, 64); 221 | this.dataGridView1.Name = "dataGridView1"; 222 | this.dataGridView1.ReadOnly = true; 223 | this.dataGridView1.RowHeadersVisible = false; 224 | this.dataGridView1.Size = new System.Drawing.Size(508, 431); 225 | this.dataGridView1.TabIndex = 4; 226 | this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick); 227 | // 228 | // Salary 229 | // 230 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 231 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 232 | this.Controls.Add(this.panel2); 233 | this.Controls.Add(this.panel1); 234 | this.Name = "Salary"; 235 | this.Size = new System.Drawing.Size(875, 565); 236 | this.panel1.ResumeLayout(false); 237 | this.panel1.PerformLayout(); 238 | this.panel2.ResumeLayout(false); 239 | this.panel2.PerformLayout(); 240 | ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); 241 | this.ResumeLayout(false); 242 | 243 | } 244 | 245 | #endregion 246 | 247 | private System.Windows.Forms.Panel panel1; 248 | private System.Windows.Forms.Panel panel2; 249 | private System.Windows.Forms.Label label1; 250 | private System.Windows.Forms.TextBox salary_name; 251 | private System.Windows.Forms.Label label3; 252 | private System.Windows.Forms.TextBox salary_employeeID; 253 | private System.Windows.Forms.Label label2; 254 | private System.Windows.Forms.TextBox salary_position; 255 | private System.Windows.Forms.Label label4; 256 | private System.Windows.Forms.TextBox salary_salary; 257 | private System.Windows.Forms.Label label5; 258 | private System.Windows.Forms.Button salary_clearBtn; 259 | private System.Windows.Forms.Button salary_updateBtn; 260 | private System.Windows.Forms.DataGridView dataGridView1; 261 | } 262 | } 263 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Salary.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using System.Data; 11 | using System.Data.SqlClient; 12 | 13 | namespace EmployeeManagementSystem 14 | { 15 | public partial class Salary : UserControl 16 | { 17 | SqlConnection connect = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\WINDOWS 10\Documents\employee.mdf;Integrated Security=True;Connect Timeout=30"); 18 | 19 | public Salary() 20 | { 21 | InitializeComponent(); 22 | 23 | displayEmployees(); 24 | disableFields(); 25 | } 26 | 27 | public void RefreshData() 28 | { 29 | if (InvokeRequired) 30 | { 31 | Invoke((MethodInvoker)RefreshData); 32 | return; 33 | } 34 | 35 | displayEmployees(); 36 | disableFields(); 37 | } 38 | 39 | public void disableFields() 40 | { 41 | salary_employeeID.Enabled = false; 42 | salary_name.Enabled = false; 43 | salary_position.Enabled = false; 44 | } 45 | 46 | public void displayEmployees() 47 | { 48 | SalaryData ed = new SalaryData(); 49 | List listData = ed.salaryEmployeeListData(); 50 | 51 | dataGridView1.DataSource = listData; 52 | } 53 | 54 | private void salary_updateBtn_Click(object sender, EventArgs e) 55 | { 56 | if(salary_employeeID.Text == "" 57 | || salary_name.Text == "" 58 | || salary_position.Text == "" 59 | || salary_salary.Text == "") 60 | { 61 | MessageBox.Show("Please fill all blank fields", "Error Message" 62 | , MessageBoxButtons.OK, MessageBoxIcon.Error); 63 | } 64 | else 65 | { 66 | DialogResult check = MessageBox.Show("Are you sure you want to UPDATE Employee ID: " 67 | + salary_employeeID.Text.Trim() + "?", "Confirmation Message" 68 | , MessageBoxButtons.YesNo, MessageBoxIcon.Question); 69 | 70 | if(check == DialogResult.Yes) 71 | { 72 | if(connect.State == ConnectionState.Closed) 73 | { 74 | try 75 | { 76 | connect.Open(); 77 | DateTime today = DateTime.Today; 78 | 79 | string updateData = "UPDATE employees SET salary = @salary" + 80 | ", update_date = @updateData WHERE employee_id = @employeeID"; 81 | 82 | using(SqlCommand cmd = new SqlCommand(updateData, connect)) 83 | { 84 | cmd.Parameters.AddWithValue("@salary", salary_salary.Text.Trim()); 85 | cmd.Parameters.AddWithValue("@updateData", today); 86 | cmd.Parameters.AddWithValue("@employeeID", salary_employeeID.Text.Trim()); 87 | 88 | cmd.ExecuteNonQuery(); 89 | 90 | displayEmployees(); 91 | 92 | MessageBox.Show("Updated successfully!" 93 | , "Information Message", MessageBoxButtons.OK 94 | , MessageBoxIcon.Information); 95 | 96 | clearFields(); 97 | 98 | } 99 | }catch(Exception ex) 100 | { 101 | MessageBox.Show("Error: " + ex, "Error Message" 102 | , MessageBoxButtons.OK, MessageBoxIcon.Error); 103 | } 104 | finally 105 | { 106 | connect.Close(); 107 | } 108 | } 109 | } 110 | else 111 | { 112 | MessageBox.Show("Cancelled", "Information Message" 113 | , MessageBoxButtons.OK, MessageBoxIcon.Warning); 114 | } 115 | } 116 | } 117 | 118 | public void clearFields() 119 | { 120 | salary_employeeID.Text = ""; 121 | salary_name.Text = ""; 122 | salary_position.Text = ""; 123 | salary_salary.Text = ""; 124 | } 125 | 126 | private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) 127 | { 128 | if(e.RowIndex != -1) 129 | { 130 | DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; 131 | salary_employeeID.Text = row.Cells[0].Value.ToString(); 132 | salary_name.Text = row.Cells[1].Value.ToString(); 133 | salary_position.Text = row.Cells[4].Value.ToString(); 134 | salary_salary.Text = row.Cells[5].Value.ToString(); 135 | } 136 | } 137 | 138 | private void salary_clearBtn_Click(object sender, EventArgs e) 139 | { 140 | clearFields(); 141 | } 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/Salary.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/SalaryData.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Data; 7 | using System.Data.SqlClient; 8 | 9 | namespace EmployeeManagementSystem 10 | { 11 | class SalaryData 12 | { 13 | 14 | public string EmployeeID { set; get; } // 0 15 | public string Name { set; get; } // 1 16 | public string Gender { set; get; } // 2 17 | public string Contact { set; get; } // 3 18 | public string Position { set; get; } // 4 19 | public int Salary { set; get; } // 5 20 | 21 | SqlConnection connect = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\WINDOWS 10\Documents\employee.mdf;Integrated Security=True;Connect Timeout=30"); 22 | 23 | public List salaryEmployeeListData() 24 | { 25 | List listdata = new List(); 26 | 27 | if (connect.State != ConnectionState.Open) 28 | { 29 | try 30 | { 31 | connect.Open(); 32 | 33 | string selectData = "SELECT * FROM employees WHERE status = 'Active' " + 34 | "AND delete_date IS NULL"; 35 | 36 | using (SqlCommand cmd = new SqlCommand(selectData, connect)) 37 | { 38 | SqlDataReader reader = cmd.ExecuteReader(); 39 | 40 | while (reader.Read()) 41 | { 42 | SalaryData sd = new SalaryData(); 43 | sd.EmployeeID = reader["employee_id"].ToString(); 44 | sd.Name = reader["full_name"].ToString(); 45 | sd.Gender = reader["gender"].ToString(); 46 | sd.Contact = reader["contact_number"].ToString(); 47 | sd.Position = reader["position"].ToString(); 48 | sd.Salary = (int)reader["salary"]; 49 | 50 | listdata.Add(sd); 51 | } 52 | } 53 | } 54 | catch (Exception ex) 55 | { 56 | Console.WriteLine("Error: " + ex); 57 | } 58 | finally 59 | { 60 | connect.Close(); 61 | } 62 | } 63 | return listdata; 64 | } 65 | 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/bin/Debug/EmployeeManagementSystem.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/bin/Debug/EmployeeManagementSystem.exe -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/bin/Debug/EmployeeManagementSystem.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/bin/Debug/EmployeeManagementSystem.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/bin/Debug/EmployeeManagementSystem.pdb -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] 5 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.AddEmployee.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.AddEmployee.resources -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.Dashboard.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.Dashboard.resources -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.Form1.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.Form1.resources -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.MainForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.MainForm.resources -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.Properties.Resources.resources -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.RegisterForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.RegisterForm.resources -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.Salary.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.Salary.resources -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.csproj.AssemblyReference.cache: -------------------------------------------------------------------------------- 1 | MBRSC -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 02fb6d6e0d78dd61d5af6d54003943b051e0da86 2 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\WINDOWS 10\source\repos\EmployeeManagementSystem\EmployeeManagementSystem\bin\Debug\EmployeeManagementSystem.exe.config 2 | C:\Users\WINDOWS 10\source\repos\EmployeeManagementSystem\EmployeeManagementSystem\bin\Debug\EmployeeManagementSystem.exe 3 | C:\Users\WINDOWS 10\source\repos\EmployeeManagementSystem\EmployeeManagementSystem\bin\Debug\EmployeeManagementSystem.pdb 4 | C:\Users\WINDOWS 10\source\repos\EmployeeManagementSystem\EmployeeManagementSystem\obj\Debug\EmployeeManagementSystem.Form1.resources 5 | C:\Users\WINDOWS 10\source\repos\EmployeeManagementSystem\EmployeeManagementSystem\obj\Debug\EmployeeManagementSystem.Properties.Resources.resources 6 | C:\Users\WINDOWS 10\source\repos\EmployeeManagementSystem\EmployeeManagementSystem\obj\Debug\EmployeeManagementSystem.csproj.GenerateResource.cache 7 | C:\Users\WINDOWS 10\source\repos\EmployeeManagementSystem\EmployeeManagementSystem\obj\Debug\EmployeeManagementSystem.csproj.CoreCompileInputs.cache 8 | C:\Users\WINDOWS 10\source\repos\EmployeeManagementSystem\EmployeeManagementSystem\obj\Debug\EmployeeManagementSystem.exe 9 | C:\Users\WINDOWS 10\source\repos\EmployeeManagementSystem\EmployeeManagementSystem\obj\Debug\EmployeeManagementSystem.pdb 10 | C:\Users\WINDOWS 10\source\repos\EmployeeManagementSystem\EmployeeManagementSystem\obj\Debug\EmployeeManagementSystem.RegisterForm.resources 11 | C:\Users\WINDOWS 10\source\repos\EmployeeManagementSystem\EmployeeManagementSystem\obj\Debug\EmployeeManagementSystem.MainForm.resources 12 | C:\Users\WINDOWS 10\source\repos\EmployeeManagementSystem\EmployeeManagementSystem\obj\Debug\EmployeeManagementSystem.AddEmployee.resources 13 | C:\Users\WINDOWS 10\source\repos\EmployeeManagementSystem\EmployeeManagementSystem\obj\Debug\EmployeeManagementSystem.Dashboard.resources 14 | C:\Users\WINDOWS 10\source\repos\EmployeeManagementSystem\EmployeeManagementSystem\obj\Debug\EmployeeManagementSystem.Salary.resources 15 | C:\Users\WINDOWS 10\source\repos\EmployeeManagementSystem\EmployeeManagementSystem\obj\Debug\EmployeeManagementSystem.csproj.AssemblyReference.cache 16 | -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.csproj.GenerateResource.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.csproj.GenerateResource.cache -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.exe -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/EmployeeManagementSystem.pdb -------------------------------------------------------------------------------- /EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcoman2/Employee-Management-System-in-CSharp/4d31abbde8d10bbdc352eacd5955d0ef9e5074c7/EmployeeManagementSystem/EmployeeManagementSystem/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Employee Management System in CSharp 2 | Employee Management System in CSharp 3 | -------------------------------------------------------------------------------- /gitattributes: -------------------------------------------------------------------------------- 1 | ## Unity ## 2 | 3 | *.cs diff=csharp text 4 | *.cginc text 5 | *.shader text 6 | 7 | *.mat merge=unityyamlmerge eol=lf 8 | *.anim merge=unityyamlmerge eol=lf 9 | *.unity merge=unityyamlmerge eol=lf 10 | *.prefab merge=unityyamlmerge eol=lf 11 | *.physicsMaterial2D merge=unityyamlmerge eol=lf 12 | *.physicMaterial merge=unityyamlmerge eol=lf 13 | *.asset merge=unityyamlmerge eol=lf 14 | *.meta merge=unityyamlmerge eol=lf 15 | *.controller merge=unityyamlmerge eol=lf 16 | 17 | 18 | ## git-lfs ## 19 | 20 | #Image 21 | *.jpg filter=lfs diff=lfs merge=lfs -text 22 | *.jpeg filter=lfs diff=lfs merge=lfs -text 23 | *.png filter=lfs diff=lfs merge=lfs -text 24 | *.gif filter=lfs diff=lfs merge=lfs -text 25 | *.psd filter=lfs diff=lfs merge=lfs -text 26 | *.ai filter=lfs diff=lfs merge=lfs -text 27 | *.tif filter=lfs diff=lfs merge=lfs -text 28 | 29 | #Audio 30 | *.mp3 filter=lfs diff=lfs merge=lfs -text 31 | *.wav filter=lfs diff=lfs merge=lfs -text 32 | *.ogg filter=lfs diff=lfs merge=lfs -text 33 | 34 | #Video 35 | *.mp4 filter=lfs diff=lfs merge=lfs -text 36 | *.mov filter=lfs diff=lfs merge=lfs -text 37 | 38 | #3D Object 39 | *.FBX filter=lfs diff=lfs merge=lfs -text 40 | *.fbx filter=lfs diff=lfs merge=lfs -text 41 | *.blend filter=lfs diff=lfs merge=lfs -text 42 | *.obj filter=lfs diff=lfs merge=lfs -text 43 | 44 | #ETC 45 | *.a filter=lfs diff=lfs merge=lfs -text 46 | *.exr filter=lfs diff=lfs merge=lfs -text 47 | *.tga filter=lfs diff=lfs merge=lfs -text 48 | *.pdf filter=lfs diff=lfs merge=lfs -text 49 | *.zip filter=lfs diff=lfs merge=lfs -text 50 | *.dll filter=lfs diff=lfs merge=lfs -text 51 | *.unitypackage filter=lfs diff=lfs merge=lfs -text 52 | *.aif filter=lfs diff=lfs merge=lfs -text 53 | *.ttf filter=lfs diff=lfs merge=lfs -text 54 | *.rns filter=lfs diff=lfs merge=lfs -text 55 | *.reason filter=lfs diff=lfs merge=lfs -text 56 | *.lxo filter=lfs diff=lfs merge=lfs -text 57 | *.bc filter=lfs diff=lfs merge=lfs -text --------------------------------------------------------------------------------