桌面端胶料快检实验标准添加
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
using HandyControl.Tools.Extension;
|
||||
using Prism.Commands;
|
||||
using System.Collections.ObjectModel;
|
||||
using YY.Admin.Core.Entity;
|
||||
using YY.Admin.ViewModels;
|
||||
|
||||
namespace YY.Admin.ViewModels.RubberQuickTestStd;
|
||||
|
||||
public class RubberQuickTestStdDetailDialogViewModel : BaseViewModel, IDialogResultable<bool>
|
||||
{
|
||||
private MesXslRubberQuickTestStd? _std;
|
||||
public MesXslRubberQuickTestStd? Std
|
||||
{
|
||||
get => _std;
|
||||
private set => SetProperty(ref _std, value);
|
||||
}
|
||||
|
||||
public ObservableCollection<MesXslRubberQuickTestStdLine> Lines { get; } = new();
|
||||
|
||||
private bool _result;
|
||||
public bool Result { get => _result; set => SetProperty(ref _result, value); }
|
||||
public Action? CloseAction { get; set; }
|
||||
|
||||
public RubberQuickTestStdDetailDialogViewModel(
|
||||
IContainerExtension container,
|
||||
IRegionManager regionManager) : base(container, regionManager)
|
||||
{
|
||||
CloseCommand = new DelegateCommand(() => CloseAction?.Invoke());
|
||||
}
|
||||
|
||||
public DelegateCommand CloseCommand { get; }
|
||||
|
||||
public void Initialize(MesXslRubberQuickTestStd std)
|
||||
{
|
||||
Std = std;
|
||||
Lines.Clear();
|
||||
foreach (var line in std.LineList ?? [])
|
||||
Lines.Add(line);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user