private void administratorToolStripMenuItem_Click(object sender, EventArgs e) { if (manageEmployees == null || manageEmployees.IsDisposed) { manageEmployees = new ManageEmployees(); manageEmployees.MdiParent = this; } manageEmployees.Show(); }
public EditEmployee(int index, ManageEmployees me) { InitializeComponent(); manageEmployees = me; employeeID = manageEmployees.employees.EmployeeTable.Rows[index]["employeeID"].ToString(); Dictionary<String, String> r = manageEmployees.employees.getEmployee(employeeID); txtUser.Text = r["userName"]; txtFirst.Text = r["firstName"]; txtLast.Text = r["lastName"]; for (int i = 0; i < cmbGender.Items.Count; i++) { if (object.Equals(cmbGender.Items[i].ToString(), r["gender"])) { cmbGender.SelectedIndex = i; } } cmbRole.SelectedIndex = int.Parse(r["role"]); }
public EditEmployee(int index, ManageEmployees me) { InitializeComponent(); manageEmployees = me; employeeID = manageEmployees.employees.EmployeeTable.Rows[index]["employeeID"].ToString(); Dictionary <String, String> r = manageEmployees.employees.getEmployee(employeeID); txtUser.Text = r["userName"]; txtFirst.Text = r["firstName"]; txtLast.Text = r["lastName"]; for (int i = 0; i < cmbGender.Items.Count; i++) { if (object.Equals(cmbGender.Items[i].ToString(), r["gender"])) { cmbGender.SelectedIndex = i; } } cmbRole.SelectedIndex = int.Parse(r["role"]); }
public AddEmployee(ManageEmployees me) { InitializeComponent(); manageEmployees = me; }