/// <summary>
 /// 新增或修改角色
 /// </summary>
 /// <returns></returns>
 public ActionResult Create(Guid? id, EnumPageState? pageState)
 {
     ModelSysRoleManageCreate model = new ModelSysRoleManageCreate();
     model.sysRoleID = id;
     model.pageState = pageState;
     model.RetriveData();
     return View(model);
 }
 public ActionResult Create(ModelSysRoleManageCreate model)
 {
     try
     {
         model.Save();
         var option = DialogOption.GetDefaultInstance();
         option.IsRefreshParentAsynchronous = false;
         return Content(WebTools.ScriptCloseDialog(option));
     }
     catch
     {
         Error = Resources.Properties.Resources.M00002E;
         model.RetriveData();
         return View(model);
     }
 }
 /// <summary>
 /// 验证角色名称是否已经存在
 /// </summary>
 public ActionResult RemoteCheckRoleName(ModelSysRoleManageCreate model)
 {
     if (model.SysRole.ID != null)
         return bizSysRole.CountBy(x => x.ID != model.SysRole.ID && x.RoleName == model.SysRole.RoleName) > 0 ? Json(false, JsonRequestBehavior.AllowGet) : Json(true, JsonRequestBehavior.AllowGet);
     else
         return bizSysRole.CountBy(x => x.RoleName == model.SysRole.RoleName) > 0 ? Json(false, JsonRequestBehavior.AllowGet) : Json(true, JsonRequestBehavior.AllowGet);
 }