public ActionResult CreateUser(string Name, string sAMAccountName, string Organization, string FirstPassword) { if (string.IsNullOrEmpty(sAMAccountName) || string.IsNullOrEmpty(Name) || string.IsNullOrEmpty(Organization) || string.IsNullOrEmpty(FirstPassword)) { throw new ArgumentException("姓名、账户名或者初始密码不能为空"); } try { ADController.CreateUser(Name, sAMAccountName, Organization, FirstPassword); } catch (Exception ex) { throw new ArgumentException(ex.Message); } return(Redirect("/Jurisdiction/Admin/UserList?IsActive=true")); }