Exemple #1
0
        public async Task <PartialViewResult> CreateOrEditModal(long?id)
        {
            int                    num;
            IUserAppService        userAppService  = this._userAppService;
            NullableIdInput <long> nullableIdInput = new NullableIdInput <long>()
            {
                Id = id
            };
            CreateOrEditUserModalViewModel createOrEditUserModalViewModel = new CreateOrEditUserModalViewModel(await userAppService.GetUserForEdit(nullableIdInput));
            List <SelectListItem>          selectListItems = new List <SelectListItem>();

            num = (this.AbpSession.TenantId.HasValue ? this.AbpSession.TenantId.Value : 0);
            foreach (Lookup lookupItem in (new LookupFill("PostLoginViewTypes", num)).LookupItems)
            {
                SelectListItem selectListItem = new SelectListItem()
                {
                    Text     = lookupItem.Text,
                    Value    = lookupItem.Value,
                    Disabled = lookupItem.Disabled,
                    Selected = lookupItem.Selected
                };
                selectListItems.Add(selectListItem);
            }
            this.ViewData["PostLoginViewTypes"] = selectListItems;
            return(this.PartialView("_CreateOrEditModal", createOrEditUserModalViewModel));
        }
Exemple #2
0
        public async Task <PartialViewResult> CreateOrEditModal(long?id)
        {
            var output = await _userAppService.GetUserForEdit(new NullableIdDto <long>(id));

            var viewModel = new CreateOrEditUserModalViewModel(output);

            return(PartialView("_CreateOrEditModal", viewModel));
        }
Exemple #3
0
        public async Task <ActionResult> CreateOrEditUserModal(Guid?id)
        {
            var input = new NullableIdDto <Guid> {
                Id = id
            };

            var output = await _userAppService.GetUserForEditAsync(input);

            var viewModel = new CreateOrEditUserModalViewModel(output);

            return(View("_CreateOrEditUserModal", viewModel));
        }
        public async Task <PartialViewResult> CreateOrEditModal(long?id)
        {
            var output = await _userAppService.GetUserForEdit(new NullableIdDto <long> {
                Id = id
            });

            var viewModel = new CreateOrEditUserModalViewModel(output)
            {
                PasswordComplexitySetting = await _passwordComplexitySettingStore.GetSettingsAsync()
            };

            return(PartialView("_CreateOrEditModal", viewModel));
        }