private void Button_Click_1(object sender, RoutedEventArgs e) { FolderBrowserDialog folderBrowser = new FolderBrowserDialog(); DialogResult result = folderBrowser.ShowDialog(); if (!string.IsNullOrWhiteSpace(folderBrowser.SelectedPath)) { var dir = new System.IO.DirectoryInfo(folderBrowser.SelectedPath); string pp = folderBrowser.SelectedPath + @"\BD_Data.db"; DataAccesBDData.Path = folderBrowser.SelectedPath + @"\BD_Data.db"; Path.Text = folderBrowser.SelectedPath; DataAccesBDData.CreateDB(); DataAccesBDData.InitializeDatabase(); RanGrid.ItemsSource = DataAccesBDData.GetDataRun(); } }
private void Button_Click(object sender, RoutedEventArgs e) { OpenFileDialog myDialog = new OpenFileDialog { Filter = "База данных(*.MDB;*.MDB;*.accdb; *.db; *.db3)|*.MDB;*.MDB;*.ACCDB;*DB; *DB3;" + "|Все файлы (*.*)|*.* ", CheckFileExists = true, Multiselect = true }; if (myDialog.ShowDialog() == DialogResult.OK) { Path.Text = myDialog.FileName; DataAccesBDData.Path = myDialog.FileName; RanGrid.ItemsSource = DataAccesBDData.GetDataRun(); SobGrid1.ItemsSource = DataAccesBDData.GetDataSob(); } }
private void UpdateButton_Click(object sender, RoutedEventArgs e) { DataAccesBDData.AddDataTablRun(new ViewTaiblBDData.ClassTablRun() { НомерRun = "18.12.2019 14:18:14:597", ВремяЗапуска = "18.12.2019 14:18:52:818", ЗначениеТаймер = "18 14:18:30:0", ОбщийПорог = 1, Порог = 10, Синхронизация = 0, Триггер = 2 }); // DataAccesBDData.updateTimeZapuskDataTablRun("18.12.2019 14:18:52:818", "18.12.2019 14:18:14:597"); // DataAccesBDData.updateTimeStopDataTablRun("18.12.2019 14:18:52:818", "18.12.2019 14:18:14:597"); RanGrid.ItemsSource = DataAccesBDData.GetDataRun(); // DataAccesBDData.AddDataTablФайлы("1_19.12.2019 00.10.23_N", "У6", "19.12.2019 00.10.23", "18.12.2019 14:18:14:597"); // DataAccesBDData.updateTimeStopDataTablФайл("19.12.2019 00.10.23", "18.12.2019 14:18:14:597"); int[] amp = new int[12]; double[] sig = new double[12]; DataAccesBDData.AddDataTablSob("1_19.12.2019 00.10.23_N", "Y4", "18.12.2019 14:18:14:597", amp, "1", amp, amp, sig, 1); DataAccesBDData.AddDataTablSobNeutron("1_19.12.2019 00.10.23_N", 1, 10, 5, 9, "18.12.2019 14:18:14:597", 7, 4, 8, 1); }