Пример #1
0
 public ProductCostHistoryData(ProductCostHistoryData data)
 {
     StartDate    = data.StartDate;
     EndDate      = data.EndDate;
     StandardCost = data.StandardCost;
     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 ProductCostHistoryData(InnerData);
         }
     }
 }
Пример #3
0
        public int AddProductCostHistory(ProductCostHistory productcosthistory)
        {
            int id = 0;

            try
            {
                id = data.AddProductCostHistory(productcosthistory);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "AddProductCostHistory");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(id);
        }
Пример #4
0
        public bool RemoveProductCostHistory(ProductCostHistory productcosthistory)
        {
            bool ret = false;

            try
            {
                ret = data.DeleteProductCostHistory(productcosthistory);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "RemoveProductCostHistory");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(ret);
        }
Пример #5
0
        public ProductCostHistoryCollection GetProductCostHistoryCollection(string whereExpression, string orderByExpression)
        {
            ProductCostHistoryCollection col = new ProductCostHistoryCollection();

            try
            {
                col = data.GetAllProductCostHistorysDynamicCollection(whereExpression, orderByExpression);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetProductCostHistoryCollection");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(col);
        }
Пример #6
0
        public DataSet GetProductCostHistoryDataSet(string whereExpression, string orderByExpression)
        {
            DataSet ds = new DataSet();

            try
            {
                ds = data.GetProductCostHistoryDynamicDataSet(whereExpression, orderByExpression);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetProductCostHistoryDataSet");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(ds);
        }
Пример #7
0
        public ProductCostHistoryCollection GetAllProductCostHistoryCollection()
        {
            ProductCostHistoryCollection col = new ProductCostHistoryCollection();

            try
            {
                col = data.GetAllProductCostHistorysCollection();
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetAllProductCostHistoryCollection");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(col);
        }
Пример #8
0
        public DataSet GetAllProductCostHistoryDataSet()
        {
            DataSet ds = new DataSet();

            try
            {
                ds = data.GetAllProductCostHistoryDataSet();
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetAllProductCostHistoryDataSet");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(ds);
        }
Пример #9
0
        public ProductCostHistory GetProductCostHistory(int productCodeHistoryID)
        {
            ProductCostHistory productCostHistory = new ProductCostHistory();

            try
            {
                productCostHistory = data.GetProductCostHistory(productCodeHistoryID);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetProductCostHistory");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(productCostHistory);
        }