public ActionResult CMS490_UpdateReceipt(string DocNo) { ObjectResultData res = new ObjectResultData(); res.MessageType = MessageModel.MESSAGE_TYPE.WARNING; ValidatorUtil validator = new ValidatorUtil(); CMS490_ValidateData(validator, DocNo, "Receipt"); 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.GetReIssueReceipt(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)); }