public ActionResult CMS490_UpdateCreditNote(string DocNo) { ObjectResultData res = new ObjectResultData(); res.MessageType = MessageModel.MESSAGE_TYPE.WARNING; ValidatorUtil validator = new ValidatorUtil(); CMS490_ValidateData(validator, DocNo, "CreditNote"); ValidatorUtil.BuildErrorMessage(res, validator, null); if (res.IsError) { return(Json(res)); } IDocumentHandler handler = ServiceContainer.GetService <IDocumentHandler>() as IDocumentHandler; string UpdateBy = CommonUtil.dsTransData.dtUserData.EmpNo; string message = handler.GetReIssueCreditNote(DocNo, UpdateBy); if (message == "Invalid Document no." || DocNo == "") { res.MessageType = MessageModel.MESSAGE_TYPE.INFORMATION; res.AddErrorMessage(MessageUtil.MODULE_COMMON, MessageUtil.MessageList.MSG0162, new string[] { DocNo }, new string[] { DocNo }); res.ResultData = false; } else if (message == "This Document no. has been canceled") { res.AddErrorMessage(MessageUtil.MODULE_COMMON, MessageUtil.MessageList.MSG0163, new string[] { DocNo }, new string[] { DocNo }); res.ResultData = false; } else if (message == "Please check BillingTargetCode") { res.AddErrorMessage(MessageUtil.MODULE_COMMON, MessageUtil.MessageList.MSG0164); res.ResultData = false; } else if (message == "Print") { res.ResultData = true; } return(Json(res)); }