public ActionResult Register(UsersListModel register) { if (register.Password != register.ConfirmPassword) { @TempData["FirstName"] = register.FirstName; @TempData["LastName"] = register.LastName; @TempData["Email"] = register.Email; @TempData["PhoneNumber"] = register.PhoneNumber; @TempData["REGISTER"] = "REGISTER"; @TempData["message"] = "Passwords dont match"; return(RedirectToAction("Register")); } var mes = UsersSQL.AddUser(register); if (mes.Status == "success") { return(RedirectToAction("../Home/Index")); } else { @TempData["FirstName"] = register.FirstName; @TempData["LastName"] = register.LastName; @TempData["Email"] = register.Email; @TempData["PhoneNumber"] = register.PhoneNumber; @TempData["REGISTER"] = "REGISTER"; @TempData["message"] = "Failed! Check details and then retry"; return(RedirectToAction("Register")); } }
public JsonResult EditUser([FromBody] User user) { return(Json(UsersSQL.EditUser(user), JsonRequestBehavior.AllowGet)); }
public JsonResult AssignGroup([FromBody] UserGroup user) { string AddedBy = Constant.GetUserID(); return(Json(UsersSQL.AssignGroup(user, AddedBy), JsonRequestBehavior.AllowGet)); }
public JsonResult GetNewUsers() { return(Json(UsersSQL.GetNewUsers())); }
public JsonResult GetUsers() { return(Json(UsersSQL.GetUsers(), JsonRequestBehavior.AllowGet)); }