예제 #1
0
 private void ViewEmployeesSubMenu_Click(object sender, EventArgs e)
 {
     try
     {
         EmployeeRecordsForm viewForm = new EmployeeRecordsForm();
         viewForm.MdiParent = this;
         viewForm.Show();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
예제 #2
0
 private void Reload(IEnumerable <Form> forms)
 {
     try
     {
         var formList = forms.Where(f => f.Name == nameof(EmployeeRecordsForm));
         if (formList != null && formList.Count() > 0)
         {
             EmployeeRecordsForm recordsForm = formList.First() as EmployeeRecordsForm;
             recordsForm.Visible = true;
             recordsForm.LoadEmployees();
         }
         else
         {
             EmployeeRecordsForm form = new EmployeeRecordsForm();
             form.Show();
         }
         this.Close();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }