|
|
@@ -1,9 +1,4 @@
|
|
|
-using Device;
|
|
|
-using Mapster;
|
|
|
-using ServiceBase;
|
|
|
-using System.Threading.Tasks;
|
|
|
-
|
|
|
-namespace DeviceManagement.ViewModels.Dialog;
|
|
|
+namespace DeviceManagement.ViewModels.Dialog;
|
|
|
|
|
|
internal partial class EditDeviceViewModel(DeviceCollection deviceCollection, IUICaller uICaller) : ObservableObject, IDialogAware
|
|
|
{
|
|
|
@@ -37,7 +32,7 @@ internal partial class EditDeviceViewModel(DeviceCollection deviceCollection, IU
|
|
|
}
|
|
|
|
|
|
[RelayCommand]
|
|
|
- private async Task SaveDevice()
|
|
|
+ private void SaveDevice()
|
|
|
{
|
|
|
if (this.TempDevice is null || this.TempDevice.Guid is null)
|
|
|
{
|
|
|
@@ -57,11 +52,11 @@ internal partial class EditDeviceViewModel(DeviceCollection deviceCollection, IU
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
this.TempDevice.Adapt(device);
|
|
|
|
|
|
MessageBox.Show("设备信息修改成功!", "设备信息", MessageBoxButton.OK, MessageBoxImage.Information);
|
|
|
this.RequestClose.Invoke();
|
|
|
-
|
|
|
}
|
|
|
|
|
|
[RelayCommand]
|