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)))); }
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 }); }
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 })); }