|
|
|
@ -1,4 +1,6 @@
|
|
|
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
|
|
|
using AduSkin.Controls.Metro;
|
|
|
|
|
using AduSkin.Controls;
|
|
|
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
|
|
|
using CommunityToolkit.Mvvm.Input;
|
|
|
|
|
using Prism.Events;
|
|
|
|
|
using SlnMesnac.Model.domain;
|
|
|
|
@ -12,6 +14,7 @@ using System.Collections.ObjectModel;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using static MaterialDesignThemes.Wpf.Theme.ToolBar;
|
|
|
|
|
|
|
|
|
|
namespace SlnMesnac.WPF.ViewModel.ProductDetails
|
|
|
|
@ -149,6 +152,17 @@ namespace SlnMesnac.WPF.ViewModel.ProductDetails
|
|
|
|
|
|
|
|
|
|
[RelayCommand]
|
|
|
|
|
private void SavePrdouctInfo()
|
|
|
|
|
{
|
|
|
|
|
NoticeManager.NotifiactionShow.AddNotifiaction(new NotifiactionModel()
|
|
|
|
|
{
|
|
|
|
|
Title = "通知",
|
|
|
|
|
Content = $"保存产品信息",
|
|
|
|
|
NotifiactionType = EnumPromptType.Success
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
Task.Run(() =>
|
|
|
|
|
{
|
|
|
|
|
var info = ProductInfo;
|
|
|
|
|
|
|
|
|
@ -206,6 +220,41 @@ namespace SlnMesnac.WPF.ViewModel.ProductDetails
|
|
|
|
|
_product_paramServices.Insert(item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
App.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
NoticeManager.NotifiactionShow.AddNotifiaction(new NotifiactionModel()
|
|
|
|
|
{
|
|
|
|
|
Title = "通知",
|
|
|
|
|
Content = $"{info.productName}产品信息更新完成",
|
|
|
|
|
NotifiactionType = EnumPromptType.Success
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
App.Current.Dispatcher.Invoke(() =>
|
|
|
|
|
{
|
|
|
|
|
NoticeManager.NotifiactionShow.AddNotifiaction(new NotifiactionModel()
|
|
|
|
|
{
|
|
|
|
|
Title = "通知",
|
|
|
|
|
Content = $"产品信息保存失败,基本信息为空",
|
|
|
|
|
NotifiactionType = EnumPromptType.Error
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}catch(Exception ex)
|
|
|
|
|
{
|
|
|
|
|
NoticeManager.NotifiactionShow.AddNotifiaction(new NotifiactionModel()
|
|
|
|
|
{
|
|
|
|
|
Title = "通知",
|
|
|
|
|
Content = $"产品信息保存异常:{ex.Message}",
|
|
|
|
|
NotifiactionType = EnumPromptType.Error
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|