예제 #1
0
 public ActionResult Edit(Restaurant model)
 {
     if (ModelState.IsValid)
     {
         var modelList = BLLSession.IRestaurantService.Modify(model, "RestaurantName", "SendOutCount", "TakeoutPhone", "Description", "IsEnable");
         return JsonMsgOk("编辑成功", "/Admin/Restaurant");
     }
     // 如果我们进行到这一步时某个地方出错,则重新显示表单
     return JsonMsgNoOk();
 }
예제 #2
0
 public ActionResult Add(Restaurant model)
 {
     if (ModelState.IsValid)
     {
         model.CreateDate = DateTime.Now;
         model.IsDel = false;
         model.Version = 1;
         var modelList = BLLSession.IRestaurantService.Add(model);
         return JsonMsgOk("增加成功", "/Admin/Restaurant");
     }
     // 如果我们进行到这一步时某个地方出错,则重新显示表单
     return JsonMsgNoOk();
 }