Пример #1
0
 private void AddDriver(object sender, RoutedEventArgs e)
 {
     try
     {
         var driverPage = new AddOrUpdateDriver();
         driverPage.CanLoad += Load;
         NavigationService.Navigate(driverPage);
     }
     catch (Exception ex)
     {
         MsgBox.Error(ex.Message);
     }
 }
Пример #2
0
 private void UpdateDriver(object sender, RoutedEventArgs e)
 {
     try
     {
         if (DriverList.SelectedItem is driver driver)
         {
             var driverPage = new AddOrUpdateDriver(driver);
             driverPage.CanLoad += Load;
             NavigationService.Navigate(driverPage);
         }
     }
     catch (Exception ex)
     {
         MsgBox.Error(ex.Message);
     }
 }