private void button3_Click(object sender, EventArgs e) { TMSEntityLayer.Employee emp = new TMSEntityLayer.Employee(); emp.Name = textBox1.Text; emp.DOB = dateTimePicker1.Value; emp.DOJ = dateTimePicker2.Value; TMSEntityLayer.Department dept = comboBox1.SelectedItem as TMSEntityLayer.Department; emp.DepartmentID = dept.DepartmentID; //collect roleid TMSEntityLayer.Role role = comboBox2.SelectedItem as TMSEntityLayer.Role; emp.RoleID = role.RoleID; //collect mrgid TMSEntityLayer.Employee manager = comboBox3.SelectedItem as TMSEntityLayer.Employee; emp.MgrID = manager.EmployeeID; emp.LoginName = textBox2.Text; emp.Password = textBox3.Text; //TMSBL.add() --> TMSDAL.Add() //manageEmp = new TMSBL.ManageEmployee(); //manageEmp.AddEmployee(emp); disconnectedEmp.Update(emp); MessageBox.Show("Details Changed"); this.Close(); }
public void Update(TMSEntityLayer.Employee emp) { repo.Update(emp); }
public void Add(TMSEntityLayer.Employee emp) { repo.Add(emp); }