using BPASmartClient.MorkMOC; //using CommunityToolkit.Mvvm.Input; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; namespace BPASmartClient.MilkWithTea.ViewModel { partial class LocalConfigureViewModel : NotifyBase { #region 本地奶茶配方 /// /// 本地奶茶配方列表 /// public ObservableCollection localMaterialRecipes { get; set; } = Json.Data.localRecipes; /// /// 删除配方奶茶 /// //[BPARelayCommand] private void DeleteRecipe(object o) { if (o == null) return; if (o is string id) { var res = localMaterialRecipes.FirstOrDefault(p => p.RecipeID == id); if (res != null) { localMaterialRecipes.Remove(res); Json.Save(); } } } #endregion #region 物料位置名称 /// /// 物料位置名称集合 /// public ObservableCollection localMaterails { get; set; } = Json.Data.localMaterails; /// /// 更新物料位置 /// //[BPARelayCommand] private void UpdateMaterialPosion() { Json.Save(); } #endregion public LocalConfigureViewModel() { } } }