Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
|
- 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.JXJFoodSmallStation.Model;
- using BPASmartClient.CustomResource.Pages.Model;
-
- namespace BPASmartClient.JXJFoodSmallStation.ViewModel
- {
- public class RecipeInfosViewModel : ObservableObject
- {
- public RecipeInfosViewModel()
- {
- ActionManage.GetInstance.Register(new Action<object>((o) =>
- {
- if (o != null && o is RemoteRecipeData rm)
- {
- RecipeName = rm.RecipeName;
- RecipeCode = rm.RecipeCode;
- TrayCode = rm.TrayCode;
- //RawMaterialsInfo = rm.RawMaterial;
- //var rest = RawMaterialsInfo.GetHashCode();
-
- 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>();
- }
- }
|