Esempio n. 1
0
 private void Button_Click_Delete(object sender, RoutedEventArgs e)
 {
     if (fbpresenter == null)
     {
         MessageBox.Show("Не подключена база данных", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
     }
     else
     {
         SetCurrentlySelectedObject();
         if (ObjectForOperation != null)
         {
             DataBaseResultRequest?.Invoke(((Button)sender).Content.ToString());
         }
     }
 }
Esempio n. 2
0
 private void Button_Click_Save(object sender, RoutedEventArgs e)
 {
     if (fbpresenter == null)
     {
         MessageBox.Show("Не подключена база данных", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
     }
     else
     {
         SaveFileDialog saveFileDialog = new SaveFileDialog()
         {
             Filter = "Database file (*.mbf)|*.mdf"
         };
         //var result = saveFileDialog.ShowDialog();
         //string path = result.Value();
         if (saveFileDialog.ShowDialog() == true)
         {
             pathForDB = saveFileDialog.FileName;
             DataBaseResultRequest?.Invoke(((Button)sender).Content.ToString());
         }
     }
     fbpresenter = null;
 }
Esempio n. 3
0
 public void CallEventDB(string mode)
 {
     DataBaseResultRequest?.Invoke(mode);
 }