public ActionResult EditCorrectionType(EditCorrectionTypeViewModel model)
        {
            var success = false;
            var message = mc_ExceptionMessage_Error;

            try
            {
                var correctionType = _correctionTypeService.GetCorrectionTypeById(model.CorrectionTypeId);

                if (correctionType == null)
                {
                    Response.StatusCode = (int)System.Net.HttpStatusCode.MethodNotAllowed;
                    return(Json(mc_ExceptionMessage_NoAccess, JsonRequestBehavior.AllowGet));
                }

                if (ModelState.IsValid)
                {
                    _correctionTypeService.UpdateCorrectionType(correctionType.BPSR_CorrectionTypeID, correctionType.CorrectionTypeCode, model.CorrectionTypeDescription);
                    success = true;
                    message = "Successfully updated Correction Type.";
                }
            }
            catch (Exception ex)
            {
                _log.Error(FormatException(ex));
                Response.StatusCode = (int)System.Net.HttpStatusCode.InternalServerError;
                return(Json(mc_ExceptionMessage_Error, JsonRequestBehavior.AllowGet));
            }

            ViewBag.DialogResult = BuildDialogResult(success, message);
            return(PartialView("_EditCorrectionType", model));
        }
        public ActionResult EditCorrectionType(int correctionTypeId)
        {
            try
            {
                var correctionType = _correctionTypeService.GetCorrectionTypeById(correctionTypeId);
                if (correctionType == null)
                {
                    Response.StatusCode = (int)System.Net.HttpStatusCode.MethodNotAllowed;
                    return(Json(mc_ExceptionMessage_NoAccess, JsonRequestBehavior.AllowGet));
                }

                var model = new EditCorrectionTypeViewModel()
                {
                    CorrectionTypeId = correctionType.BPSR_CorrectionTypeID, CorrectionTypeCodeId = correctionType.CorrectionTypeCode, CorrectionTypeDescription = correctionType.CorrectionTypeDescription
                };
                return(PartialView("_EditCorrectionType", model));
            }
            catch (Exception ex)
            {
                _log.Error(FormatException(ex));
                Response.StatusCode = (int)System.Net.HttpStatusCode.InternalServerError;
                return(Json(mc_ExceptionMessage_Error, JsonRequestBehavior.AllowGet));
            }
        }