private void Button_Click(object sender, RoutedEventArgs e)
        {
            DishBeanUtil a = (DishBeanUtil)this.dataGrid.SelectedItem;

            GivingSelected.OkSelect_Dish(a);
            this.Close();
        }
        public void OkSelect_Dish(DishBeanUtil dish)
        {
            //保存需要添加的菜品
            //DishGivingModel dishGiving = new DishGivingModel();
            DishGivingModel dishGiving = (DishGivingModel)ViewModelDeliver.Get();

            dishGiving.SaveGivingDishDetail(dish);
            //ViewModelDeliver.Set(dishGiving);
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            DishBeanUtil    a = (DishBeanUtil)this.dataGrid.SelectedItem;
            DishGivingModel dishGivingModel = new DishGivingModel();

            dishGivingModel.SaveDishDetail(a);
            ViewModelDeliver.Set(dishGivingModel);
            //BuyGivingDishes.OkSelect_Dish();
            this.Close();
            BuyGivingSetting BuyGivingSettingWin = new BuyGivingSetting();

            BuyGivingSettingWin.ShowDifferentStyleWin(0);//新增操作,不显示上下记录按钮
            BuyGivingSettingWin.ShowDialog();
        }
Пример #4
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            DishBeanUtil       a = (DishBeanUtil)this.dataGrid.SelectedItem;
            ClearEstimateModel clearEstimateModel = new ClearEstimateModel();

            clearEstimateModel.SaveDishDetail(a);
            ViewModelDeliver.Set(clearEstimateModel);
            //BuyGivingDishes.OkSelect_Dish();
            this.Close();
            ClearEstimateSettingWindow clearEstimateSettingWindow = new ClearEstimateSettingWindow();

            clearEstimateSettingWindow.ShowDifferentStyleWin(0);//新增操作,不显示上下记录按钮
            clearEstimateSettingWindow.ShowDialog();
        }
 // 装载 DishBeanUtil
 public void CreateDishBeanUtil(DishBean element)
 {
     if (element.DishPrice != null && element.DishPrice.Count > 0)
     {
         foreach (var elem in element.DishPrice)
         {
             DishBeanUtil Dbu = new DishBeanUtil();
             Dbu.CreateDishBeanUtilByDishBean(elem);
             Dbu.DishName        = element.DishName;
             Dbu.Code            = element.Code;
             Dbu.DishUnitName    = element.DishUnit.Name;
             Dbu.PingYing        = element.PingYing;
             Dbu.AidNumber       = element.PingYing;
             Dbu.DishTypeBigName = element.DishTypeBigName;
             Dbu.DishTypeName    = element.DishTypeName;
             DishesMenusSelected.Add(Dbu);
         }
     }
 }