コード例 #1
0
 public JsonResult Update(T_Button model)
 {
     bool Success = false;
     string Message = "修改失败请联系管理员!";
     if ( IButton.Edit(model) > 0 )
     {
         Success = true;
         Message = "成功";
     }
     return Json(new { Success = Success, Message = Message }, JsonRequestBehavior.AllowGet);
 }
コード例 #2
0
 public JsonResult Add(T_Button model)
 {
     bool Success = false;
     string Message = "添加失败请联系管理员!";
     int State = IButton.Add(model);
     if ( State > 0 )
     {
         Success = true;
         Message = "成功";
     }
     else if ( (CRUDState)State == CRUDState.UniqueErro )
     {
         Message = "权限代码已存在,不能重复添加!";
     }
     
     return Json(new { Success = Success, Message = Message }, JsonRequestBehavior.AllowGet);
 }