Пример #1
0
        public async Task <IActionResult> Impage()
        {
            if (!_env.IsDevelopment())
            {
                return(NotFound());
            }

            var vm = new AssessmentOrgsImportResponse {
                Status = "Press to run"
            };

            return(View(vm));
        }
Пример #2
0
        public async Task <IActionResult> Impage(string choice)
        {
            if (!_env.IsDevelopment())
            {
                return(NotFound());
            }

            var vm = new AssessmentOrgsImportResponse {
                Status = "Running"
            };

            if (choice == "DoIt")
            {
                var importResults = await _apiClient.ImportOrganisations();

                vm.Status = importResults;
            }
            return(View(vm));
        }