Beispiel #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());
     }
 }
 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();
             this.Close();
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }