public ViewResult EditBatchClaimSet(TitleClaimSetModel setModel, HttpPostedFileBase file) { TitleClaimSetModel refreshedModel = null; if (file == null || string.IsNullOrEmpty(file.FileName) || file.InputStream == null) { refreshedModel = _titleClaimSetService.Get(new TitleClaimSetRequest { LocalEducationAgencyId = setModel.LocalEducationAgencyId }); refreshedModel.CurrentOperation = "EditBatchClaimSet"; refreshedModel.IsPost = true; refreshedModel.IsSuccess = false; refreshedModel.Messages = new List<string> { "The file selected is null." }; return View("Get", refreshedModel); } setModel.FileName = file.FileName; setModel.FileInputStream = file.InputStream; var postResultsModel = _titleClaimSetService.PostBatch(setModel); refreshedModel = _titleClaimSetService.Get(new TitleClaimSetRequest { LocalEducationAgencyId = setModel.LocalEducationAgencyId }); refreshedModel.CurrentOperation = "EditBatchClaimSet"; refreshedModel.IsPost = true; refreshedModel.IsSuccess = postResultsModel.IsSuccess; refreshedModel.Messages = postResultsModel.Messages; return View("Get", refreshedModel); }
public ViewResult EditSingleClaimSet(TitleClaimSetModel setModel) { _titleClaimSetService.Post(setModel); var refreshedModel = _titleClaimSetService.Get(new TitleClaimSetRequest { LocalEducationAgencyId = setModel.LocalEducationAgencyId }); refreshedModel.CurrentOperation = "EditSingleClaimSet"; refreshedModel.IsPost = true; refreshedModel.IsSuccess = true; refreshedModel.Messages = new List<string> { string.Format("Position Title {0} was updated successfully", setModel.PositionTitle) }; return View("Get", refreshedModel); }