public EditDetailForm(int FoodID, List <Models.v_category_items> list) { InitializeComponent(); this.FoodID = FoodID; this.list = list; list_itemcategory = BIZFood.GetFoodFL(); if (FoodID != -1) { v_Category_Items = list.Where(o => o.itemkey.Equals(FoodID)).FirstOrDefault(); } MyControl.FoodManagement.EditDetail editDetail = new MyControl.FoodManagement.EditDetail(list_itemcategory, v_Category_Items); this.editDetail1 = editDetail; editDetail.Dock = DockStyle.Fill; editDetail.MyEvent += CloseEvent; this.Controls.Add(editDetail); if (FoodID != -1) { IniData(); } else { editDetail1.gridView1.SetRowCellValue(rowHandl("商品编码:"), "Value", BIZFood.FindMax_itemCode()); foreach (var a in list_itemcategory) { editDetail1.repositoryItemComboBox1.Items.Add(a.name); } } }
public EditDetail(List <Models.item_category> list_itemcategory, Models.v_category_items v_Category_Items) { // this.FoodID = FoodID; this.v_Category_Items = v_Category_Items; this.list_itemcategory = list_itemcategory; InitializeComponent(); gridView1.OptionsMenu.ShowAutoFilterRowItem = false; IniData(); }
private void SetRowCellValue(Models.v_category_items a) { editDetail1.gridView1.SetRowCellValue(rowHandl("折扣价格:"), "Value", a.discountPrice); editDetail1.gridView1.SetRowCellValue(rowHandl("菜品起点数:"), "Value", a.minnum); editDetail1.gridView1.SetRowCellValue(rowHandl("商品名称:"), "Value", a.itemName); editDetail1.gridView1.SetRowCellValue(rowHandl("商品编码:"), "Value", a.itemCode); editDetail1.gridView1.SetRowCellValue(rowHandl("商品价格:"), "Value", a.price); editDetail1.gridView1.SetRowCellValue(rowHandl("商品单位:"), "Value", a.unit); editDetail1.gridView1.SetRowCellValue(rowHandl("商家推荐:"), "Value", a.instructions); editDetail1.gridView1.SetRowCellValue(rowHandl("菜品图片:"), "Value", Utils.utils.GetBitmap(a.itemImgs)); // editDetail1.gridView1.SetRowCellValue(rowHandl("是否为必选菜:"), "Value", (a.ismust == 1) ? true : false); editDetail1.gridView1.SetRowCellValue(rowHandl("是否是套餐:"), "Value", (a.isSet == 1) ? true : false); if (a.isSet == 1) { editDetail1.taocanan_yes(); string str = ""; foreach (var b in MyModels.selected_category_items.list) { str += b.itemName; str += ","; } if (str.Length > 0) { str = str.Substring(0, str.Length - 1); } editDetail1.gridView1.SetRowCellValue(rowHandl("套餐内菜品:"), "Value", str); editDetail1.gridView1.SetRowCellValue(rowHandl("是否打印套餐详情:"), "Value", a.isprintset); } editDetail1.gridView1.SetRowCellValue(rowHandl("是否打印:"), "Value", (a.isprint == 1) ? true : false); editDetail1.gridView1.SetRowCellValue(rowHandl("是否不参与结算打折:"), "Value", (a.ispayagio == 1) ? true : false); editDetail1.gridView1.SetRowCellValue(rowHandl("是否分规格:"), "Value", (a.isStandard == 1) ? true : false); if (a.isStandard == 1) { editDetail1.guige_yes(); } editDetail1.gridView1.SetRowCellValue(rowHandl("是否称重:"), "Value", (a.selebyunit == 1) ? true : false); if (a.selebyunit == 1) { editDetail1.chengzhong_yes(); } }