更新202612
This commit is contained in:
@@ -43,6 +43,66 @@ namespace TabletTester2025
|
||||
LoadData();
|
||||
}
|
||||
|
||||
private void DeleteHardness_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (HardnessGrid.SelectedItem is not TestBatch batch)
|
||||
{
|
||||
MessageBox.Show("请先选择一条记录", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
return;
|
||||
}
|
||||
var result = MessageBox.Show($"确定要删除该记录吗?\n检测时间:{batch.TestTime:yyyy-MM-dd HH:mm:ss}",
|
||||
"确认删除", MessageBoxButton.YesNo, MessageBoxImage.Warning);
|
||||
if (result != MessageBoxResult.Yes)
|
||||
return;
|
||||
_dbService.DeleteBatch(batch.Id);
|
||||
LoadData();
|
||||
}
|
||||
|
||||
private void DeleteFriability_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (FriabilityGrid.SelectedItem is not TestBatch batch)
|
||||
{
|
||||
MessageBox.Show("请先选择一条记录", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
return;
|
||||
}
|
||||
var result = MessageBox.Show($"确定要删除该记录吗?\n检测时间:{batch.TestTime:yyyy-MM-dd HH:mm:ss}",
|
||||
"确认删除", MessageBoxButton.YesNo, MessageBoxImage.Warning);
|
||||
if (result != MessageBoxResult.Yes)
|
||||
return;
|
||||
_dbService.DeleteBatch(batch.Id);
|
||||
LoadData();
|
||||
}
|
||||
|
||||
private void DeleteDisintegration_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (DisintegrationGrid.SelectedItem is not TestBatch batch)
|
||||
{
|
||||
MessageBox.Show("请先选择一条记录", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
return;
|
||||
}
|
||||
var result = MessageBox.Show($"确定要删除该记录吗?\n检测时间:{batch.TestTime:yyyy-MM-dd HH:mm:ss}",
|
||||
"确认删除", MessageBoxButton.YesNo, MessageBoxImage.Warning);
|
||||
if (result != MessageBoxResult.Yes)
|
||||
return;
|
||||
_dbService.DeleteBatch(batch.Id);
|
||||
LoadData();
|
||||
}
|
||||
|
||||
private void DeleteDissolution_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (DissolutionGrid.SelectedItem is not TestBatch batch)
|
||||
{
|
||||
MessageBox.Show("请先选择一条记录", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
|
||||
return;
|
||||
}
|
||||
var result = MessageBox.Show($"确定要删除该记录吗?\n检测时间:{batch.TestTime:yyyy-MM-dd HH:mm:ss}",
|
||||
"确认删除", MessageBoxButton.YesNo, MessageBoxImage.Warning);
|
||||
if (result != MessageBoxResult.Yes)
|
||||
return;
|
||||
_dbService.DeleteBatch(batch.Id);
|
||||
LoadData();
|
||||
}
|
||||
|
||||
private void ExportHardness_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var data = HardnessGrid.ItemsSource as IEnumerable<TestBatch>;
|
||||
|
||||
Reference in New Issue
Block a user