public void AddError(ErrorItem errorItem) { if (errorItem == null) { return; } m_errorList.Add(errorItem); }
public ItemWeightDTO ConvertKGtoPCS(NZString MasterNo, NZString ProcessNo, NZDecimal QtyKG, NZInt processCount) { ItemWeightDTO weightDTO = new ItemWeightDTO(); NZDecimal decQtyPCS = null; //ถ้า convert จาก KG เป็น PCS จะ ใช้น้ำหนักตาม Process ItemProcessDAO dao = new ItemProcessDAO(); ItemProcessDTO itemProcess = new ItemProcessDTO(); itemProcess.ITEM_CD = MasterNo; itemProcess.PROCESS_CD = ProcessNo; itemProcess = dao.LoadWeightByItemProcessCount(CommonLib.Common.CurrentDatabase, itemProcess, new NZInt(null, (processCount.NVL(0) <= 1 ? 1 : processCount.Value))); if (itemProcess != null) { weightDTO.ItemCD = MasterNo; weightDTO.ProcessCD = ProcessNo; weightDTO.QtyKG = QtyKG; decimal decQtyKG = QtyKG.NVL(0); if (itemProcess.WEIGHT.NVL(0) == 0) { decQtyPCS = null; } else { decQtyPCS = new NZDecimal(null, Math.Round(QtyKG / itemProcess.WEIGHT * 1000, MidpointRounding.AwayFromZero)); } if (decQtyPCS != null && decQtyPCS.NVL(0) > 10000000) { EVOFramework.ErrorItem errorItem = null; errorItem = new EVOFramework.ErrorItem(QtyKG.Owner, Rubik.TKPMessages.eValidate.VLM0184.ToString()); EVOFramework.ValidateException.ThrowErrorItem(errorItem); } weightDTO.QtyPCS = decQtyPCS; } return(weightDTO); }
public void AddError(IControlIdentify controlIdentify, string messageCode, string messageDescription) { ErrorItem errorItem = new ErrorItem(controlIdentify, messageCode, messageDescription); m_errorList.Add(errorItem); }
public BusinessException(ErrorItem error, string message, Exception innerException) : base(message, innerException) { m_error = error; }
public BusinessException(ErrorItem error, Exception innerException) : this(error, string.Empty, innerException) { this.m_error = error; }
public BusinessException(ErrorItem error) : this(error, null) { }