public ActionResult UploadImportFile() { var model = new UploadImportFileViewModel(); var view = RenderView("UploadImportFile", model); return ComboWireJson(true, view, model, JsonRequestBehavior.AllowGet); }
public ActionResult UploadImportFile(HttpPostedFileBase uploadFile, UploadImportFileViewModel model) { WireJson result; if (ModelState.IsValid && uploadFile != null) { model.FileStream = uploadFile.InputStream; var response = GetCommand<UploadBlogsImportFileCommand>().ExecuteCommand(model); result = new WireJson(response != null, response); } else { result = new WireJson(false); } if (result.Success) { result.Messages = Messages.Success.ToArray(); } else { result.Messages = Messages.Error.ToArray(); } return new WrappedJsonResult { Data = result }; }
public ActionResult UploadImportFile(HttpPostedFileBase uploadFile, UploadImportFileViewModel model) { if (ModelState.IsValid && uploadFile != null) { model.FileStream = uploadFile.InputStream; var response = GetCommand<UploadBlogsImportFileCommand>().ExecuteCommand(model); return WireJson(response != null, response); } return WireJson(false); }