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

48 regels
1.9 KiB

  1. using BPASmartClient.CustomResource.Pages.Model;
  2. using BPASmartClient.FoodStationTest.Model;
  3. using BPASmartClient.FoodStationTest.View;
  4. using BPA.Helper;
  5. using BPA.Helper;
  6. using System.Collections.ObjectModel;
  7. using System.Linq;
  8. namespace BPASmartClient.FoodStationTest.ViewModel
  9. {
  10. public class SiemensRecipeReceiveViewModel : NotifyBase
  11. {
  12. //ObservableCollection<RemoteRecipeRawMaterial> RawMaterials { get; set; } = new ObservableCollection<RemoteRecipeRawMaterial>();
  13. public SiemensRecipeReceiveViewModel()
  14. {
  15. Recipes = Json<RemoteRecipeDataColl>.Data.Recipes;
  16. DetailsCommand = new BPARelayCommand<object>((o) =>
  17. {
  18. if (o != null && o is string cnt)
  19. {
  20. ActionManage.GetInstance.Send("CloseRecipeInfosView");
  21. RecipeInfosView nrv = new RecipeInfosView();
  22. var res = Json<RemoteRecipeDataColl>.Data.Recipes.FirstOrDefault(p => p.RecipeCode == cnt);
  23. if (res != null)
  24. {
  25. ActionManage.GetInstance.Send("RecipeInfo", res);
  26. nrv.Show();
  27. MessageNotify.GetInstance.ShowUserLog($"查看配方——{res.RecipeName}");
  28. }
  29. }
  30. });
  31. ClearAllRecipe = new BPARelayCommand(() =>
  32. {
  33. if (MessageNotify.GetInstance.ShowDialog($"请确认,是否删除所有配方订单?"))
  34. {
  35. Json<RemoteRecipeDataColl>.Data.Recipes.Clear();
  36. MessageNotify.GetInstance.ShowUserLog($"手动清除所有配方。");
  37. }
  38. });
  39. }
  40. public BPARelayCommand<object> DetailsCommand { get; set; }
  41. public BPARelayCommand ClearAllRecipe { get; set; }
  42. public ObservableCollection<RemoteRecipeData> Recipes { get; set; }
  43. }
  44. }