Ejemplo n.º 1
0
        public ActionResult Create(CreateRoleGroupViewModel viewModel)
        {
            var request  = viewModel.MapTo <CreateRoleGroupRequest>();
            var response = _roleGroupService.Create(request);

            TempData["IsSuccess"] = response.IsSuccess;
            TempData["Message"]   = response.Message;
            if (response.IsSuccess)
            {
                return(RedirectToAction("Index"));
            }

            return(View("Create", viewModel));
        }
Ejemplo n.º 2
0
        public ActionResult Create(CreateRoleGroupViewModel viewModel)
        {
            var request = viewModel.MapTo <CreateRoleGroupRequest>();

            request.ControllerName = "RoleGroup";
            request.ActionName     = "Create";
            request.UserId         = this.UserProfile().UserId;
            var response = _roleGroupService.Create(request);

            TempData["IsSuccess"] = response.IsSuccess;
            TempData["Message"]   = response.Message;
            if (response.IsSuccess)
            {
                return(RedirectToAction("Index"));
            }

            return(View("Create", viewModel));
        }