Exemplo n.º 1
0
        public ActionResult AdminSignUp(SignUpModel model)
        {
            Users user = new Users();
            if (model != null)
            {
                user.FirstName = model.FirstName;
                user.LastName = model.LastName;
                user.MiddleName = model.MiddleName;
                user.Email = model.Email;
                user.PhoneNumber = model.PhoneNumber;
                user.location = model.location;

                var userService = EngineContext.Resolve<IUserService>();
                string msg = userService.RegisterUsers(user, SystemEnums.Roles.Admin, model.Active, model.password);

                if (model.password == model.ConfirmPassword && !string.IsNullOrEmpty(model.password) && !string.IsNullOrEmpty(model.ConfirmPassword))
                {
                    if (string.IsNullOrEmpty(msg))
                    {

                        TempData["Success"] = "You are signup successfully please click the link sent to your mail to continue";
                        return View(model);
                    }
                    else
                    {
                        TempData["duplicate"] = msg;
                    }
                }
                else
                {

                    TempData["error"] = ("*Please Password field must match the Confirm Password field");
                }

            }
            return View(model);
        }
Exemplo n.º 2
0
        public ActionResult AdminSignUp()
        {
            var model = new SignUpModel();

            return View(model);
        }
Exemplo n.º 3
0
        public ActionResult SignUpPage()
        {
            var model = new SignUpModel();

            return View(model);
        }