You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Microsoft.Toolkit.Mvvm.ComponentModel;
- using System.Collections.ObjectModel;
- using Microsoft.Toolkit.Mvvm.Input;
- using BPASmartClient.Helper;
- using BPASmartClient.DosingHKProject.Model;
- using BPASmartClient.CustomResource.Pages.Model;
-
- namespace BPASmartClient.DosingHKProject.ViewModel
- {
- public class RecipeInfosViewModel : ObservableObject
- {
- public RecipeInfosViewModel()
- {
-
- ActionManage.GetInstance.CancelRegister("RecipeInfo");
- ActionManage.GetInstance.Register(new Action<object>((o) =>
- {
- if (o != null && o is RemoteRecipeData rm)
- {
- RecipeName = rm.RecipeName;
- RecipeCode = rm.RecipeCode;
- //TrayCode = rm.TrayCode;
- foreach (var item in rm.RawMaterial)
- {
- RawMaterialsInfo.Add(item);
- }
- }
- }), "RecipeInfo");
-
- ReturnPage = new RelayCommand(() =>
- {
- ActionManage.GetInstance.Send("CloseRecipeInfosView");
- });
- }
-
- public string RecipeName { get { return _mRecipeName; } set { _mRecipeName = value; OnPropertyChanged(); } }
- private string _mRecipeName;
-
- public string RecipeCode { get { return _mRecipeCode; } set { _mRecipeCode = value; OnPropertyChanged(); } }
- private string _mRecipeCode;
-
- public int TrayCode { get { return _mTrayCode; } set { _mTrayCode = value; OnPropertyChanged(); } }
- private int _mTrayCode;
-
- public RelayCommand ReturnPage { get; set; }
-
- public ObservableCollection<RemoteRecipeRawMaterial> RawMaterialsInfo { get; set; } = new ObservableCollection<RemoteRecipeRawMaterial>();
- }
- }
|