/// <summary>
 /// 新增修改查看
 /// </summary>
 /// <param name="sysUserId">用户ID</param>
 /// <param name="pageState">窗口状态</param>
 /// <param name="departmentId">部门ID</param>
 public ActionResult Create(ModelSysUserManageCreate model, Guid? departmentId)
 {
     model.DepartmentId = departmentId;
     ViewBag.PageState = model.PageState;
     model.RetriveData();
     return View(model);
 }
 public ActionResult Create(ModelSysUserManageCreate model)
 {
     try
     {
         model.Save();
         var option = DialogOption.GetDefaultInstance();
         option.IsRefreshParentAsynchronous = false;
         return Content(WebTools.ScriptCloseDialog(option));
     }
     catch
     {
         Error = OASys.Resources.Properties.Resources.M00002E;
         model.RetriveData();
         return View(model);
     }
 }
 /// <summary>
 /// TODO: 验证用户名是否已经存在
 /// </summary>
 public ActionResult RemoteCheckUserName(ModelSysUserManageCreate model)
 {
     if (model.SysUserEntity.ID != null)
         return bizSysUser.CountBy(x => x.ID != model.SysUserEntity.ID && x.UserAccount == model.SysUserEntity.UserAccount) > 0 ? Json(false, JsonRequestBehavior.AllowGet) : Json(true, JsonRequestBehavior.AllowGet);
     else
         return bizSysUser.CountBy(x => x.UserAccount == model.SysUserEntity.UserAccount) > 0 ? Json(false, JsonRequestBehavior.AllowGet) : Json(true, JsonRequestBehavior.AllowGet);
 }