|
|
@ -76,6 +76,9 @@ namespace SunlightCentralizedControlManagement_SCCM_.View |
|
|
private void Delete_Click(object sender, RoutedEventArgs e) |
|
|
private void Delete_Click(object sender, RoutedEventArgs e) |
|
|
{ |
|
|
{ |
|
|
if (!string.IsNullOrEmpty(comboBoxMachine.Text)) |
|
|
if (!string.IsNullOrEmpty(comboBoxMachine.Text)) |
|
|
|
|
|
{ |
|
|
|
|
|
MessageBoxResult vr = System.Windows.MessageBox.Show(Properties.Resources.Delete + comboBoxMachine.Text, "SCCM", MessageBoxButton.OKCancel, MessageBoxImage.Question); |
|
|
|
|
|
if (vr == MessageBoxResult.OK) // 如果是确定,就执行下面代码,记得换上自己的代码喔
|
|
|
{ |
|
|
{ |
|
|
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
|
|
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
|
|
SQLiteHelpers.Open(); //打开数据库
|
|
|
SQLiteHelpers.Open(); //打开数据库
|
|
|
@ -85,6 +88,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View |
|
|
Griddata.ItemsSource = MainWindowViewModel.Machines.DefaultView; |
|
|
Griddata.ItemsSource = MainWindowViewModel.Machines.DefaultView; |
|
|
comboBoxMachine.Text = null; |
|
|
comboBoxMachine.Text = null; |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
textlog.Text = "Invalid"; |
|
|
textlog.Text = "Invalid"; |
|
|
|