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

73 righe
1.7 KiB

  1. using BPASmartClient.MorkMOC;
  2. //using CommunityToolkit.Mvvm.Input;
  3. using Newtonsoft.Json;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Collections.ObjectModel;
  7. using System.IO;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. using System.Windows;
  12. namespace BPASmartClient.MilkWithTea.ViewModel
  13. {
  14. partial class LocalConfigureViewModel : NotifyBase
  15. {
  16. #region 本地奶茶配方
  17. /// <summary>
  18. /// 本地奶茶配方列表
  19. /// </summary>
  20. public ObservableCollection<LocalRecipe> localMaterialRecipes { get; set; } = Json<JsonLocalRecipes>.Data.localRecipes;
  21. /// <summary>
  22. /// 删除配方奶茶
  23. /// </summary>
  24. //[BPARelayCommand]
  25. private void DeleteRecipe(object o)
  26. {
  27. if (o == null) return;
  28. if (o is string id)
  29. {
  30. var res = localMaterialRecipes.FirstOrDefault(p => p.RecipeID == id);
  31. if (res != null)
  32. {
  33. localMaterialRecipes.Remove(res);
  34. Json<JsonLocalRecipes>.Save();
  35. }
  36. }
  37. }
  38. #endregion
  39. #region 物料位置名称
  40. /// <summary>
  41. /// 物料位置名称集合
  42. /// </summary>
  43. public ObservableCollection<LocalMaterail> localMaterails { get; set; } = Json<JsonLocalRecipes>.Data.localMaterails;
  44. /// <summary>
  45. /// 更新物料位置
  46. /// </summary>
  47. //[BPARelayCommand]
  48. private void UpdateMaterialPosion()
  49. {
  50. Json<JsonLocalRecipes>.Save();
  51. }
  52. #endregion
  53. public LocalConfigureViewModel()
  54. {
  55. }
  56. }
  57. }