更新原材料录入视图模型,替换成功提示框为非模态轻提示,提升用户体验。新增 HandyControl.Data 命名空间引用以支持 Growl 提示功能。
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using HandyControl.Controls;
|
||||
using HandyControl.Data;
|
||||
using HandyControl.Tools.Extension;
|
||||
using System.Collections.Specialized;
|
||||
using System.ComponentModel;
|
||||
@@ -409,7 +410,13 @@ public class RawMaterialEntryEditDialogViewModel : BaseViewModel, IDialogResulta
|
||||
|
||||
if (IsAddMode)
|
||||
{
|
||||
HandyControl.Controls.MessageBox.Success("新增成功!");
|
||||
// 非模态轻提示,约 1 秒后自动消失(与独立页「保存并打印」时的体验一致)
|
||||
Growl.Success(new GrowlInfo
|
||||
{
|
||||
Message = "保存成功",
|
||||
ShowDateTime = false,
|
||||
WaitTime = 1
|
||||
});
|
||||
if (CloseAction == null)
|
||||
{
|
||||
// 独立新增页面:保存成功后自动清空表单,便于连续录入
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
using HandyControl.Controls;
|
||||
using HandyControl.Data;
|
||||
using Prism.Commands;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
@@ -378,10 +380,12 @@ public class RawMaterialEntryOperationViewModel : RawMaterialEntryEditDialogView
|
||||
}
|
||||
}
|
||||
|
||||
if (wasEdit)
|
||||
HandyControl.Controls.MessageBox.Success("编辑成功!");
|
||||
else
|
||||
HandyControl.Controls.MessageBox.Success("新增成功!");
|
||||
Growl.Success(new GrowlInfo
|
||||
{
|
||||
Message = "保存成功",
|
||||
ShowDateTime = false,
|
||||
WaitTime = 1
|
||||
});
|
||||
|
||||
Result = true;
|
||||
RaisePropertyChanged(nameof(CanGenerateCards));
|
||||
@@ -553,7 +557,12 @@ public class RawMaterialEntryOperationViewModel : RawMaterialEntryEditDialogView
|
||||
|
||||
if (wasEdit)
|
||||
{
|
||||
HandyControl.Controls.MessageBox.Success("编辑成功!");
|
||||
Growl.Success(new GrowlInfo
|
||||
{
|
||||
Message = "保存成功",
|
||||
ShowDateTime = false,
|
||||
WaitTime = 1
|
||||
});
|
||||
InitializeForAdd();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user