예제 #1
0
        public ActionResult FileFields(int parentId, int id, FormCollection collection)
        {
            var model = new ImportViewModel();

            TryUpdateModel(model);

            model.SetCorrespondingFieldName(collection);
            var settings = model.GetImportSettingsObject(parentId, id);

            return(Json(MultistepActionHelper.GetFileFields(settings, new FileReader(settings))));
        }
예제 #2
0
        public JsonCamelCaseResult <JSendResponse> SetupWithParams(int parentId, int id, FormCollection collection)
        {
            var model = new ImportViewModel();

            TryUpdateModel(model);

            model.SetCorrespondingFieldName(collection);
            IMultistepActionParams settings = model.GetImportSettingsObject(parentId, id);

            _service.SetupWithParams(parentId, id, settings);
            return(new JSendResponse {
                Status = JSendStatus.Success
            });
        }
예제 #3
0
        public async Task <ActionResult> SetupWithParams(int parentId, int id, IFormCollection collection)
        {
            var model = new ImportViewModel()
            {
                ContentId = id
            };

            await TryUpdateModelAsync(model);

            model.SetCorrespondingFieldName(collection);
            IMultistepActionParams settings = model.GetImportSettingsObject(parentId, id);

            _service.SetupWithParams(parentId, id, settings);
            return(JsonCamelCase(new JSendResponse {
                Status = JSendStatus.Success
            }));
        }