Beispiel #1
0
 void TrySaveData(EmployeePage sender, EmployeeDataEventArgs e)
 {
     try
     {
         presenter.SaveData(e.Id, e.Name, e.HireDate, e.Group, e.BaseSalary, e.HasChief, e.ChiefId);
         sender.ShowDataSavedMessage();
     }
     catch (Exception ex)
     {
         sender.ShowErrorMessage(ex.Message);
     }
 }
Beispiel #2
0
 public void OpenEmployeePage(EmployeePage page)
 {
     OpenPage(page);
     page.EmployeeDataSaving += new EventHandler(
         (sender, e) => TrySaveData((EmployeePage)sender, (EmployeeDataEventArgs)e));
 }