public ActionResult RefreshReview(int id)
        {
            ImportService importService = new ImportService(User.Identity.Name);
            BulkUploadViewModel response = importService.PrepareImport(id);

            IEnumerable<TenantViewModel> listOfTenants = GetTenants();
            response.BatchId = id.ToString();
            response.Tenants = listOfTenants;

            Utilities.JsonCamelCaseResult result =
                new Utilities.JsonCamelCaseResult(response, JsonRequestBehavior.AllowGet);
            return result;
        }
Exemple #2
0
        public ActionResult RefreshReview(int id)
        {
            ImportService       importService = new ImportService(User.Identity.Name);
            BulkUploadViewModel response      = importService.PrepareImport(id);

            IEnumerable <TenantViewModel> listOfTenants = GetTenants();

            response.BatchId = id.ToString();
            response.Tenants = listOfTenants;

            Utilities.JsonCamelCaseResult result =
                new Utilities.JsonCamelCaseResult(response, JsonRequestBehavior.AllowGet);
            return(result);
        }
Exemple #3
0
        public ActionResult ConfirmImport(BulkUploadViewModel batch)
        {
            ImportService importService      = new ImportService(User.Identity.Name);
            int           countOfAssetsAdded = importService.ProcessCommit(batch.BatchId, batch.SelectedTenant);

            Utilities.JsonCamelCaseResult result =
                new Utilities.JsonCamelCaseResult(
                    new BulkUploadViewModel
            {
                Success = true,
                Message = string.Format("{0} assets imported", countOfAssetsAdded)
            },
                    JsonRequestBehavior.AllowGet);
            return(result);
        }
Exemple #4
0
        public ActionResult Upload(HttpPostedFileBase FileUpload)
        {
            ImportService       importService = new ImportService(User.Identity.Name);
            BulkUploadViewModel response      = importService.PrepareImport(FileUpload);
            string batchId = importService.BatchId;

            IEnumerable <TenantViewModel> listOfTenants = GetTenants();

            response.BatchId = batchId;
            response.Tenants = listOfTenants;

            Utilities.JsonCamelCaseResult result =
                new Utilities.JsonCamelCaseResult(response, JsonRequestBehavior.AllowGet);
            return(result);
        }
        public ActionResult ConfirmImport(BulkUploadViewModel batch)
        {
            ImportService importService = new ImportService(User.Identity.Name);
            int countOfAssetsAdded = importService.ProcessCommit(batch.BatchId, batch.SelectedTenant);

            Utilities.JsonCamelCaseResult result =
                new Utilities.JsonCamelCaseResult(
                    new BulkUploadViewModel
                    {
                        Success = true,
                        Message = string.Format("{0} assets imported", countOfAssetsAdded)
                    },
                    JsonRequestBehavior.AllowGet);
            return result;
        }
        public ActionResult Upload(HttpPostedFileBase FileUpload)
        {
            ImportService importService = new ImportService(User.Identity.Name);
            BulkUploadViewModel response = importService.PrepareImport(FileUpload);
            string batchId = importService.BatchId;

            IEnumerable<TenantViewModel> listOfTenants = GetTenants();
            response.BatchId = batchId;
            response.Tenants = listOfTenants;

            Utilities.JsonCamelCaseResult result =
                new Utilities.JsonCamelCaseResult(response, JsonRequestBehavior.AllowGet);
            return result;
        }