public ActionResult Edit(FoodMenu model) { if (ModelState.IsValid) { var modelList = BLLSession.IFoodMenuService.Modify(model, "FoodMenuCategoryID", "MenuName", "IsSale", "Price"); return JsonMsgOk("编辑成功", "/Admin/FoodMenu"); } // 如果我们进行到这一步时某个地方出错,则重新显示表单 return JsonMsgNoOk(); }
public ActionResult Add(FoodMenu model) { if (ModelState.IsValid) { model.CreateDate = DateTime.Now; model.IsDel = false; model.Version = 1; var modelList = BLLSession.IFoodMenuService.Add(model); return JsonMsgOk("增加菜单成功", "/Admin/FoodMenu"); } // 如果我们进行到这一步时某个地方出错,则重新显示表单 return JsonMsgNoOk(); }