示例#1
0
 public JsonResult Add(T_Role model)
 {
     bool Success = false;
     string Message = "添加失败请联系管理员!";
     if (iRole.Add(model) > 0)
     {
         Success = true;
         Message = "成功";
     }
     return Json(new { Success = Success, Message = Message }, JsonRequestBehavior.AllowGet);
 }
示例#2
0
 public JsonResult Update(T_Role model)
 {
     bool Success = false;
     string Message = "修改失败请联系管理员!";
     if (model.IsDefault.ToString().Equals("on"))
     {
         model.IsDefault = 1;
     }
     else
     {
         model.IsDefault = 0;
     }
     int result = iRole.Edit(model);
     if (result > 0)
     {
         Success = true;
         Message = "成功";
     }
     return Json(new { Success = Success, Message = Message }, JsonRequestBehavior.AllowGet);
 }