Exemplo n.º 1
0
 /// <summary>
 ///     Add new trainee
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void AddTraineeClick(object sender, RoutedEventArgs e)
 {
     try
     {
         //open window
         var win = new AddTrainee();
         win.ShowDialog();
         RefreshData();
     }
     catch (Exception ex)
     {
         ExceptionMessage.Show(ex.Message, ex.ToString());
     }
 }
Exemplo n.º 2
0
 /// <summary>
 ///     Update selected Trainee in a new window
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void UpdateTraineeClick(object sender, EventArgs e)
 {
     try
     {
         //open window
         var win = new AddTrainee(((Trainee)TraineeGrid.SelectedItem).Id);
         win.ShowDialog();
         RefreshData();
     }
     catch (Exception ex)
     {
         if (ex.Message != "Object reference not set to an instance of an object.")
         {
             ExceptionMessage.Show(ex.Message, ex.ToString());
         }
     }
 }