终端一体化运控平台
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.
 
 
 

44 righe
1.5 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Microsoft.Toolkit.Mvvm.ComponentModel;
  7. using System.Collections.ObjectModel;
  8. using Microsoft.Toolkit.Mvvm.Input;
  9. using BPASmartClient.Helper;
  10. using BPASmartClient.JXJFoodBigStation.Model;
  11. using BPASmartClient.CustomResource.Pages.Model;
  12. namespace BPASmartClient.JXJFoodBigStation.ViewModel
  13. {
  14. public class RecipeInfosViewModel : ObservableObject
  15. {
  16. public RecipeInfosViewModel()
  17. {
  18. ActionManage.GetInstance.Register(new Action<object>((o) =>
  19. {
  20. if (o != null && o is RemoteRecipeData rm)
  21. {
  22. RecipeName = rm.RecipeName;
  23. RecipeCode = rm.RecipeCode;
  24. RawMaterials = rm.RawMaterial;
  25. }
  26. }), "RecipeInfo");
  27. ReturnPage = new RelayCommand(() =>
  28. {
  29. ActionManage.GetInstance.Send("CloseRecipeInfosView");
  30. });
  31. }
  32. public string RecipeName { get { return _mRecipeName; } set { _mRecipeName = value; OnPropertyChanged(); } }
  33. private string _mRecipeName;
  34. public long RecipeCode { get { return _mRecipeCode; } set { _mRecipeCode = value; OnPropertyChanged(); } }
  35. private long _mRecipeCode;
  36. public RelayCommand ReturnPage { get; set; }
  37. public ObservableCollection<RemoteRecipeRawMaterial> RawMaterials { get; set; } = new ObservableCollection<RemoteRecipeRawMaterial>();
  38. }
  39. }