예제 #1
0
        public async Task <ActionResult> ManageUsage()
        {
            var customers = new List <string>
            {
                null
            };

            var regions = new List <string>
            {
                "US",
                "Europe"
            };

            customers.AddRange(await SQLTemplateStorageManager.GetCustomersListAsync(regions[0]));

            var customerModel = new BaseDropDownModel(customers, "customers", isPascal: true);

            var model = new ManageUsageModel
            {
                Customers     = customerModel,
                FormCustomers = customerModel,
                SiteCustomers = customerModel,
                Regions       = new BaseDropDownModel(regions, "fvregions", isPascal: true)
            };

            return(View(model));
        }
예제 #2
0
        public async Task <ActionResult> GetSiteForms(string customer, string site, string region)
        {
            if (String.IsNullOrWhiteSpace(site))
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            var customerSites = new List <string>
            {
                null
            };

            customerSites.AddRange(await SQLTemplateStorageManager.GetFormsBySiteAsync(customer, site, region));

            var model = new BaseDropDownModel
            {
                DataList     = customerSites,
                Item         = null,
                ControlClass = "forms"
            };

            return(PartialView("_DropDownDataSource", model));
        }
예제 #3
0
        public async Task <ActionResult> GetCustomers(string region)
        {
            if (String.IsNullOrWhiteSpace(region))
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            var customers = new List <string>
            {
                null
            };

            customers.AddRange(await SQLTemplateStorageManager.GetCustomersListAsync(region));

            var model = new BaseDropDownModel
            {
                DataList     = customers,
                Item         = null,
                ControlClass = "customers",
                IsPascalCase = true
            };

            return(PartialView("_DropDownDataSource", model));
        }