示例#1
0
        public ActionResult AddUser(UserModel objumdl)
        {
            if (ModelState.IsValid)
            {
                objumdl.Adduser(objumdl);
                if (objumdl.error != null)
                {
                    return(View("AddUser", objumdl));
                }
            }
            ModelState.AddModelError(string.Empty, "Failed To add user. Please Try Again");

            return(View("AddUser", objumdl));
        }