Example #1
0
 /// <summary>
 /// Adding department to the employee if selected
 /// </summary>
 public void AddDepartmentToEMP()
 {
     if (view.ListViewEmp.SelectedIndex != -1 && view.ComboBoxDepList.SelectedIndex != -1)
     {
         model.AddDepToEmp(view.ListViewEmp.SelectedIndex, view.ComboBoxDepList.SelectedIndex);
         RefreshDepartmentsListOnEMP();
     }
     else
     {
         MessageBox.Show("Have to be selected Employee from list and Deparment from combo box at the bottom");
     }
 }