示例#1
0
        /// <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));
        }
示例#2
0
        /// <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));
        }
示例#3
0
        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));
        }
示例#4
0
        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);
        }
示例#5
0
        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));
        }
示例#6
0
        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));
        }
示例#7
0
        public DataTable LoadSalesUnitPriceList(bool includeOldData, DateTime?priceOnDate)
        {
            SalesUnitPriceDAO dao = new SalesUnitPriceDAO(CommonLib.Common.CurrentDatabase);

            return(dao.LoadSalesUnitPriceList(null, includeOldData, priceOnDate));
        }
示例#8
0
        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));
        }