/// <summary> /// /// </summary> /// <param name="data"></param> /// <returns></returns> /// <exception cref="EVOFramework.ValidateException"><c>ValidateException</c>.</exception> /// <exception cref="EVOFramework.BusinessException"><c>BusinessException</c>.</exception> public int SaveNew(SalesUnitPriceDTO data) { SalesUnitPriceValidator validator = new SalesUnitPriceValidator(); validator.ValidateBeforeSaveNew(data); SalesUnitPriceDAO dao = new SalesUnitPriceDAO(CommonLib.Common.CurrentDatabase); return(dao.AddNew(null, data)); }
/// <summary> /// /// </summary> /// <param name="data"></param> /// <returns></returns> /// <exception cref="EVOFramework.ValidateException"><c>ValidateException</c>.</exception> /// <exception cref="EVOFramework.BusinessException"><c>BusinessException</c>.</exception> public int SaveUpdate(SalesUnitPriceDTO data) { SalesUnitPriceValidator validator = new SalesUnitPriceValidator(); validator.ValidateBeforeSaveUpdate(data); SalesUnitPriceDAO dao = new SalesUnitPriceDAO(CommonLib.Common.CurrentDatabase); return(dao.UpdateWithoutPK(null, data)); }
public List <SalesUnitPriceDTO> LoadAllSalesUnitPrice(bool LimitRow) { SalesUnitPriceDAO dao = new SalesUnitPriceDAO(CommonLib.Common.CurrentDatabase); if (LimitRow) { return(dao.LoadAllWithLimit(null, true)); } return(dao.LoadAll(null, true)); }
public BusinessException CheckSalesUnitPriceExist(NZString ItemCD, NZDateTime StartEffectiveDate, NZString Currency) { SalesUnitPriceDAO dao = new SalesUnitPriceDAO(CommonLib.Common.CurrentDatabase); if (dao.Exist(null, ItemCD, StartEffectiveDate, Currency)) { ErrorItem errorItem = new ErrorItem(ItemCD.Owner, TKPMessages.eValidate.VLM0165.ToString()); return(new BusinessException(errorItem)); } return(null); }
public int DeleteSalesUnitPrice(NZString ITEM_CD, NZDateTime START_EFFECTIVE_DATE, NZString CURRENCY) { SalesUnitPriceDAO dao = new SalesUnitPriceDAO(CommonLib.Common.CurrentDatabase); return(dao.Delete(null, ITEM_CD, START_EFFECTIVE_DATE, CURRENCY)); }
public SalesUnitPriceDTO getSalesUnitPriceByEffectiveDate(NZString ITEM_CD, NZString CURRENCY, NZDateTime START_EFFECTIVE_DATE) { SalesUnitPriceDAO dao = new SalesUnitPriceDAO(CommonLib.Common.CurrentDatabase); return(dao.getSalesUnitPriceByEffectiveDate(null, ITEM_CD, CURRENCY, START_EFFECTIVE_DATE)); }
public DataTable LoadSalesUnitPriceList(bool includeOldData, DateTime?priceOnDate) { SalesUnitPriceDAO dao = new SalesUnitPriceDAO(CommonLib.Common.CurrentDatabase); return(dao.LoadSalesUnitPriceList(null, includeOldData, priceOnDate)); }
public SalesUnitPriceDTO LoadSalesUnitPrice(NZString ITEM_CD, NZDateTime START_EFFECTIVE_DATE, NZString CURRENCY) { SalesUnitPriceDAO dao = new SalesUnitPriceDAO(CommonLib.Common.CurrentDatabase); return(dao.LoadByPK(null, new NZInt(null, ITEM_CD.StrongValue), START_EFFECTIVE_DATE, CURRENCY)); }