public async Task <ActionResult> Index()
        {
            ViewBag.FilterText = Request.Query["filterText"];
            ViewBag.Sorting    = Request.Query["sorting"];
            ViewBag.SubscriptionEndDateStart = Request.Query["subscriptionEndDateStart"];
            ViewBag.SubscriptionEndDateEnd   = Request.Query["subscriptionEndDateEnd"];
            ViewBag.CreationDateStart        = Request.Query["creationDateStart"];
            ViewBag.CreationDateEnd          = Request.Query["creationDateEnd"];
            ViewBag.EditionId = Request.Query.ContainsKey("editionId") ? Convert.ToInt32(Request.Query["editionId"]) : (int?)null;

            return(View(new TenantIndexViewModel
            {
                EditionItems = await _editionAppService.GetEditionComboboxItems(selectedEditionId: ViewBag.EditionId, addAllItem: true)
            }));
        }
        public async Task <PartialViewResult> CreateModal(int?id)
        {
            var output = await _editionAppService.GetEditionForEdit(new NullableIdDto { Id = id });

            var editionItems = await _editionAppService.GetEditionComboboxItems();

            var freeEditionItems = await _editionAppService.GetEditionComboboxItems(output.Edition.ExpiringEditionId, false, true);

            var viewModel = ObjectMapper.Map <CreateEditionModalViewModel>(output);

            viewModel.EditionItems     = editionItems;
            viewModel.FreeEditionItems = freeEditionItems;

            return(PartialView("_CreateModal", viewModel));
        }
Exemple #3
0
        public async Task <ActionResult> Index()
        {
            ViewBag.FilterText = Request.Query["filterText"];
            ViewBag.Sorting    = Request.Query["sorting"];
            ViewBag.SubscriptionEndDateStart = Request.Query["subscriptionEndDateStart"];
            ViewBag.SubscriptionEndDateEnd   = Request.Query["subscriptionEndDateEnd"];
            ViewBag.CreationDateStart        = Request.Query["creationDateStart"];
            ViewBag.CreationDateEnd          = Request.Query["creationDateEnd"];
            ViewBag.EditionId = Request.Query["editionId"];

            return(View(new TenantIndexViewModel
            {
                EditionItems = await _editionAppService.GetEditionComboboxItems(null, true)
            }));
        }
Exemple #4
0
        public async Task <PartialViewResult> CreateModal()
        {
            var editionItems = await _editionAppService.GetEditionComboboxItems();

            var defaultEditionName = _commonLookupAppService.GetDefaultEditionName();
            var defaultEditionItem = editionItems.FirstOrDefault(e => e.DisplayText == defaultEditionName);

            if (defaultEditionItem != null)
            {
                defaultEditionItem.IsSelected = true;
            }

            var viewModel = new CreateTenantViewModel(editionItems);

            return(PartialView("_CreateModal", viewModel));
        }
        public async Task <ActionResult> Index()
        {
            var hostSettings = await _hostSettingsAppService.GetAllSettings();

            var editionItems =
                await _editionAppService.GetEditionComboboxItems(hostSettings.TenantManagement.DefaultEditionId);

            var timezoneItems = await _timingAppService.GetTimezoneComboboxItems(new GetTimezoneComboboxItemsInput
            {
                DefaultTimezoneScope = SettingScopes.Application,
            });

            var user = await _userManager.GetUserAsync(AbpSession.ToUserIdentifier());

            ViewBag.CurrentUserEmail = user.EmailAddress;

            var model = new HostSettingsViewModel
            {
                Settings      = hostSettings,
                EditionItems  = editionItems,
                TimezoneItems = timezoneItems
            };

            AddEnabledSocialLogins(model);

            return(View(model));
        }
        public async Task <ActionResult> Index()
        {
            var hostSettings = await _hostSettingsAppService.GetAllSettings();

            var editionItems = await _editionAppService.GetEditionComboboxItems(hostSettings.TenantManagement.DefaultEditionId);

            ViewBag.CurrentUserEmail = await _userManager.GetEmailAsync(AbpSession.GetUserId());

            var model = new HostSettingsViewModel
            {
                Settings     = hostSettings,
                EditionItems = editionItems
            };

            return(View(model));
        }
        public async Task <ActionResult> Index()
        {
            var hostSettings = await _hostSettingsAppService.GetAllSettings();

            var editionItems = await _editionAppService.GetEditionComboboxItems(hostSettings.TenantManagement.DefaultEditionId);

            var timezoneItems = await _timingAppService.GetTimezoneComboboxItems(new GetTimezoneComboboxItemsInput
            {
                DefaultTimezoneScope = SettingScopes.Application,
                SelectedTimezoneId   = await SettingManager.GetSettingValueForApplicationAsync(TimingSettingNames.TimeZone)
            });

            ViewBag.CurrentUserEmail = await _userManager.GetEmailAsync(AbpSession.GetUserId());

            var model = new HostSettingsViewModel
            {
                Settings      = hostSettings,
                EditionItems  = editionItems,
                TimezoneItems = timezoneItems
            };

            return(View(model));
        }