refactor:完成重构设备的添加,删除,更新。

This commit is contained in:
2025-10-22 14:06:16 +08:00
parent e995ec7207
commit 54d040b45f
76 changed files with 1028 additions and 1161 deletions

View File

@@ -9,10 +9,11 @@ using DMS.Core.Models;
using DMS.WPF.Interfaces;
using DMS.WPF.Services;
using DMS.WPF.ItemViewModel;
using System.Threading.Tasks;
namespace DMS.WPF.ViewModels.Dialogs;
public partial class ImportExcelDialogViewModel : DialogViewModelBase<List<Variable>>
public partial class ImportExcelDialogViewModel : DialogViewModelBase<List<VariableItem>>
{
private readonly IMapper _mapper;
private readonly IExcelService _excelService;
@@ -57,21 +58,21 @@ public partial class ImportExcelDialogViewModel : DialogViewModelBase<List<Varia
}
[RelayCommand]
private void ImportAll()
private async Task ImportAll()
{
Close(Variables);
await Close(VariableItemViewModels.ToList());
}
[RelayCommand]
private void ImportSelected()
private async Task ImportSelected()
{
var selected = SelectedVariables.Cast<VariableItem>().ToList();
Close(_mapper.Map<List<Variable>>(selected));
await Close(selected);
}
[RelayCommand]
private void CancleButton()
private async Task CancleButton()
{
Close(null);
await Close(null);
}
}