Exemple #1
0
        public ActionResult Add(UsersAddModel model)
        {
            var request = new AddUserRequest
            {
                Customer   = Customer.OriginalCustomer,
                CustomerId = Customer.CustomerId,
                Model      = model
            };

            AddUserResponse response = _userService.Add(request);

            return(RedirectToAction("update", new { id = response.UserID })
                   .AndAlert(AlertType.Success, "Success.", "System user added successfully."));
        }
Exemple #2
0
        public UsersAddModel AddUserModel(Guid customerId, UserType userType)
        {
            var securityQuestions = GetSecurityQuestions(customerId);

            var model = new UsersAddModel
            {
                Roles             = GetRolesSelectList(userType, customerId),
                SecurityQuestions = new SelectList(securityQuestions),
                SecurityQuestion1 = securityQuestions[0],
                SecurityQuestion2 = securityQuestions[1],
                SecurityQuestion3 = securityQuestions[2]
            };

            return(model);
        }
Exemple #3
0
        public ActionResult Add()
        {
            UsersAddModel model = _userService.AddUserModel(Customer.CustomerId, UserType.SystemUser);

            return(View(model));
        }