Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }