예제 #1
0
 public ProductListPriceHistoryData(ProductListPriceHistoryData data)
 {
     StartDate    = data.StartDate;
     EndDate      = data.EndDate;
     ListPrice    = data.ListPrice;
     Product      = data.Product;
     ModifiedDate = data.ModifiedDate;
     Uid          = data.Uid;
 }
예제 #2
0
 protected override void LazySet()
 {
     base.LazySet();
     if (PersistenceState == PersistenceState.NewAndChanged || PersistenceState == PersistenceState.LoadedAndChanged)
     {
         if ((object)InnerData == (object)OriginalData)
         {
             OriginalData = new ProductListPriceHistoryData(InnerData);
         }
     }
 }
        public bool RemoveProductListPriceHistory(ProductListPriceHistory productlistpricehistory)
        {
            ProductListPriceHistoryData data = new ProductListPriceHistoryData();
            bool ret = false;

            try
            {
                ret = data.DeleteProductListPriceHistory(productlistpricehistory);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "RemoveProductListPriceHistory");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(ret);
        }
        public int AddProductListPriceHistory(ProductListPriceHistory productlistpricehistory)
        {
            ProductListPriceHistoryData data = new ProductListPriceHistoryData();
            int id = 0;

            try
            {
                id = data.AddProductListPriceHistory(productlistpricehistory);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "AddProductListPriceHistory");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(id);
        }
        public ProductListPriceHistoryCollection GetProductListPriceHistoryCollection(string whereExpression, string orderByExpression)
        {
            ProductListPriceHistoryData       data = new ProductListPriceHistoryData();
            ProductListPriceHistoryCollection col  = new ProductListPriceHistoryCollection();

            try
            {
                col = data.GetAllProductListPriceHistorysDynamicCollection(whereExpression, orderByExpression);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetProductListPriceHistoryCollection");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(col);
        }
        public DataSet GetProductListPriceHistoryDataSet(string whereExpression, string orderByExpression)
        {
            ProductListPriceHistoryData data = new ProductListPriceHistoryData();
            DataSet ds = new DataSet();

            try
            {
                ds = data.GetProductListPriceHistoryDynamicDataSet(whereExpression, orderByExpression);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetProductListPriceHistoryDataSet");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(ds);
        }
        public ProductListPriceHistoryCollection GetAllProductListPriceHistoryCollection()
        {
            ProductListPriceHistoryData       data = new ProductListPriceHistoryData();
            ProductListPriceHistoryCollection col  = new ProductListPriceHistoryCollection();

            try
            {
                col = data.GetAllProductListPriceHistoryCollection();
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetAllProductListPriceHistoryCollection");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(col);
        }
        public DataSet GetAllProductListPriceHistoryDataSet()
        {
            ProductListPriceHistoryData data = new ProductListPriceHistoryData();
            DataSet ds = new DataSet();

            try
            {
                ds = data.GetAllProductListPriceHistoryDataSet();
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetAllProductListPriceHistory");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(ds);
        }
        public ProductListPriceHistory GetProductListPriceHistory(int id)
        {
            ProductListPriceHistoryData data = new ProductListPriceHistoryData();
            ProductListPriceHistory     plph = new ProductListPriceHistory();

            try
            {
                plph = data.GetProductListPriceHistory(id);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetProductListPriceHistory");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(plph);
        }