Exemple #1
0
 public void SaveRole(ERole role)
 {
     _rep.Save(role, p => p.Id == role.Id);
 }
 /// <summary>
 /// 编辑
 /// </summary>
 /// <returns></returns>
 public ActionResult EditRole(ERole role)
 {
     if (role.Id == 0)
     {
         CheckIsHaveMBPermission(72);
         _userService.AddRole(role);
         return JsonResult(role, "添加成功!");
     }
     else
     {
         CheckIsHaveMBPermission(73);
         _userService.SaveRole(role);
         return JsonResult(role, "保存成功!");
     }
 }
Exemple #3
0
 public void AddRole(ERole role)
 {
     _rep.Add(role);
 }