示例#1
0
        private void buttonAddEmployee_Click(object sender, EventArgs e)
        {
            EmployeeDesigner formAddEmployee = new EmployeeDesigner();

            AddOwnedForm(formAddEmployee);
            formAddEmployee.ComboBoxBeforeTeam     = comboBoxBeforeTeam;
            formAddEmployee.ObjectListViewEmployee = objectListViewEmployee;
            formAddEmployee.Show();
        }
示例#2
0
 private void buttonEditEmployee_Click(object sender, EventArgs e)
 {
     if (objectListViewEmployee.SelectedObjects.Count > 0)
     {
         foreach (var Employee in objectListViewEmployee.SelectedObjects)
         {
             EmployeeDesigner formEditEmployee = new EmployeeDesigner();
             AddOwnedForm(formEditEmployee);
             formEditEmployee.EditMode               = true;
             formEditEmployee.ComboBoxBeforeTeam     = comboBoxBeforeTeam;
             formEditEmployee.ComboBoxAfterTeam      = comboBoxAfterTeam;
             formEditEmployee.ObjectListViewTicket   = ObjectListViewTicket;
             formEditEmployee.ObjectListViewEmployee = objectListViewEmployee;
             formEditEmployee.EditedEmployee         = (Employee)Employee;
             formEditEmployee.Show();
         }
     }
     else
     {
         MessageBox.Show("You haven't selected any employee(s).");
     }
 }