添加导出完成提示框和忽略异常确认对话框
在 `MainWindow.xaml.cs` 文件中,`saveFileDialog.ShowDialog()` 方法调用后,添加了一行代码 `FlexMessageBox.Info($"导出完成!");`,用于在导出完成后显示信息提示框。 在 `IgnoreSelectedError_Click` 方法中添加了一段代码,用于在用户点击忽略异常按钮后,弹出一个警告对话框,询问用户是否继续操作。如果用户选择继续,则设置 `isContinue` 为 `true`,并继续执行后续代码。
This commit is contained in:
parent
a10a4371ba
commit
4a06cb018c
|
@ -216,6 +216,7 @@ public partial class MainWindow : Window
|
|||
if (saveFileDialog.ShowDialog() == true)
|
||||
{
|
||||
ExcelHelper.SaveByTemplate(ViewModel.ExportData, Path.Combine(FlexIOBase.GetParentPath(saveFileDialog.FileName), saveFileDialog.FileName));
|
||||
FlexMessageBox.Info($"导出完成!");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -232,6 +233,14 @@ public partial class MainWindow : Window
|
|||
/// <param name="e"></param>
|
||||
private void IgnoreSelectedError_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
bool isContinue = false;
|
||||
if (FlexMessageBox.Warning(FlexMessageBox.Buttons.OK_CANCEL,
|
||||
"Report",
|
||||
"忽略异常后在导出下单报表时,将不会再进行管控,是否继续?", false) == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
isContinue = true;
|
||||
}
|
||||
if (isContinue)
|
||||
if (ModelGenDataGrid.SelectedItems != null)
|
||||
{
|
||||
var selectedRows = ModelGenDataGrid.SelectedItems;
|
||||
|
|
Loading…
Reference in New Issue