Beispiel #1
0
        public override bool Equals(object obj)
        {
            PermissionGroup another = obj as PermissionGroup;

            if (another == null)
            {
                return(false);
            }
            else
            {
                return(this.Id == another.Id);
            }
        }
        public ActionResult _Edit(PermissionGroup pgroup)
        {
            if (ModelState.IsValid)
            {
                this.genericMgr.UpdateWithTrim(pgroup);
                SaveSuccessMessage(Resources.ACC.PermissionGroup.PermissionGroup_Updated);
            }

            return PartialView(pgroup);
        }
 public ActionResult New(PermissionGroup pgroup)
 {
     if (ModelState.IsValid)
     {
         ////判断权限名不能重复
         if (this.genericMgr.FindAll<long>(userNameDuiplicateVerifyStatement, new object[] { pgroup.Code })[0] > 0)
         {
             SaveErrorMessage(Resources.ACC.PermissionGroup.Errors_Existing_PermissionGroup, pgroup.Code.ToString());
         }
         else
         {
             this.genericMgr.CreateWithTrim(pgroup);
             SaveSuccessMessage(Resources.ACC.PermissionGroup.PermissionGroup_Added);
             return RedirectToAction("List");
         }
     }
     return View(pgroup);
 }