private void button1_Click(object sender, RoutedEventArgs e) { if (choose.Text == "Mobile_Number") { Edit_MobileNumberEmployee ee = new Edit_MobileNumberEmployee(); ee.Show(); } else if (choose.Text == "Salary") { Edit_DepartmentSalaryBonus z = new Edit_DepartmentSalaryBonus(); z.Show(); } else if (choose.Text == "Bonus") { Edit_DepartmentSalaryBonus z = new Edit_DepartmentSalaryBonus(); z.Show(); } else if (choose.Text == "Department") { Edit_DepartmentSalaryBonus z = new Edit_DepartmentSalaryBonus(); z.Show(); } else if (choose.Text == "Avaliable") { Edit_Avaliable g = new Edit_Avaliable(); g.Show(); } }
private void button1_Click(object sender, RoutedEventArgs e) { if (choose.Text == "") { MessageBox.Show("Please choose an option!"); } else { if (choose.Text == "Mobile_Number") { Edit_MobileNumberEmployee ee = new Edit_MobileNumberEmployee(); ee.Show(); this.Close(); } else if (choose.Text == "Salary") { Edit_DepartmentSalaryBonus z = new Edit_DepartmentSalaryBonus(); z.Show(); this.Close(); } else if (choose.Text == "MedicalForm") { Edit_EmployeeMedicalForm nnnn = new Edit_EmployeeMedicalForm(); nnnn.Show(); this.Close(); } else if (choose.Text == "Bonus") { Edit_Bonus eb = new Edit_Bonus(); eb.Show(); this.Close(); } else if (choose.Text == "Department") { Edit_Department z = new Edit_Department(); z.Show(); this.Close(); } else if (choose.Text == "Avaliable") { Edit_Avaliable g = new Edit_Avaliable(); g.Show(); this.Close(); } } }
private void button1_Click(object sender, RoutedEventArgs e) { if (choose.Text == "Mobile_Number") { Edit_MobileNumberEmployee ee = new Edit_MobileNumberEmployee(); ee.Show(); this.Hide(); } else if (choose.Text == "Salary") { Edit_DepartmentSalaryBonus z = new Edit_DepartmentSalaryBonus(); z.Show(); this.Hide(); } else if (choose.Text == "Bonus") { for (int i = 0; i < Containers.Employee_list.Count(); i++) { float bonu = 0; if (Containers.Employee_list[i].getId() == Enter_ID_Employee.employeeeid) { int x = Containers.Employee_list[i].Working_year_calc(); float per = x / 5; if (x > 5) { bonu = (per * Containers.Employee_list[i].getSalary()) / 100; } } Containers.Employee_list[i].setbonus(bonu); } if (File.Exists("Employees.xml")) { File.Delete("Employees.xml"); } for (int i = 0; i < Containers.Employee_list.Count; i++) { Containers.write_Employee(Containers.Employee_list[i]); } MessageBox.Show("Changes Done"); } else if (choose.Text == "Department") { Edit_DepartmentSalaryBonus z = new Edit_DepartmentSalaryBonus(); z.Show(); this.Hide(); } else if (choose.Text == "Avaliable") { Edit_Avaliable g = new Edit_Avaliable(); g.Show(); this.Hide(); } else if (choose.Text == "Password") { Edit_EmployeePassword ee = new Edit_EmployeePassword(); ee.Show(); this.Hide(); } }