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

33 line
1.2 KiB

  1. using BPA.Helper;
  2. using BPASmartClient.Model;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Collections.ObjectModel;
  6. using System.Linq;
  7. using System.Printing;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. namespace BPASmartClient.ViewModel
  11. {
  12. public class EditRecipeViewModel:NotifyBase
  13. {
  14. public BPARelayCommand<object> EditOrder { get; set; }
  15. public BPARelayCommand<object> DeleteOrder { get; set; }
  16. public BPARelayCommand SaveOrder { get; set; }
  17. public EditRecipeViewModel()
  18. {
  19. NoodOrderCtrl.GetInstance.editRecipeAction = s =>
  20. {
  21. LocalOrder = s;
  22. };
  23. SaveOrder = new BPARelayCommand(() => { NoodOrderCtrl.GetInstance.SaveRecipe(LocalOrder); });
  24. EditOrder = new BPARelayCommand<object>(NoodOrderCtrl.GetInstance.EditOrder);
  25. DeleteOrder = new BPARelayCommand<object>(NoodOrderCtrl.GetInstance.DeleteRecipe);
  26. }
  27. public FoodMenuModel LocalOrder { get { return _localOrder; } set { _localOrder = value; OnPropertyChanged(); } }
  28. private FoodMenuModel _localOrder = new FoodMenuModel();
  29. public ObservableCollection<FoodMenuModel> FoodMenus { get; set; } = FoodMenuViewModel.FoodMenus;
  30. }
  31. }