protected override void LazySet()
 {
     base.LazySet();
     if (PersistenceState == PersistenceState.NewAndChanged || PersistenceState == PersistenceState.LoadedAndChanged)
     {
         if ((object)InnerData == (object)OriginalData)
         {
             OriginalData = new PurchaseOrderHeaderData(InnerData);
         }
     }
 }
 public PurchaseOrderHeaderData(PurchaseOrderHeaderData data)
 {
     RevisionNumber = data.RevisionNumber;
     Status         = data.Status;
     OrderDate      = data.OrderDate;
     ShipDate       = data.ShipDate;
     SubTotal       = data.SubTotal;
     TaxAmt         = data.TaxAmt;
     Freight        = data.Freight;
     TotalDue       = data.TotalDue;
     Vendor         = data.Vendor;
     ShipMethod     = data.ShipMethod;
     ModifiedDate   = data.ModifiedDate;
     Uid            = data.Uid;
 }
Example #3
0
        public PurchaseOrderHeaderCollection GetPurchaseOrderHeaderCollection(string where, string orderBy)
        {
            PurchaseOrderHeaderData       data = new PurchaseOrderHeaderData();
            PurchaseOrderHeaderCollection col  = new PurchaseOrderHeaderCollection();

            try
            {
                col = data.GetAllPurchaseOrderHeaderDynamicCollection(where, orderBy);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetPurchaseOrderHeaderCollection");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(col);
        }
Example #4
0
        public DataSet GetPurchaseOderHeaderDataSet(string where, string orderby)
        {
            PurchaseOrderHeaderData data = new PurchaseOrderHeaderData();
            DataSet ds = new DataSet();

            try
            {
                ds = data.GetPurchaseOrderHeaderDynamicDataSet(where, orderby);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetPurchaseOderHeaderDataSet");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(ds);
        }
Example #5
0
        public DataSet GetAllPurchasOrderHeadersDataSet()
        {
            PurchaseOrderHeaderData data = new PurchaseOrderHeaderData();
            DataSet ds = new DataSet();

            try
            {
                ds = data.GetAllPurchaseOrderHeaderDataSet();
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetAllPurchasOrderHeadersDataSet");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(ds);
        }
Example #6
0
        public PurchaseOrderHeader GetPurchaseOrderHeader(int purchaseOrderID)
        {
            PurchaseOrderHeaderData data = new PurchaseOrderHeaderData();
            PurchaseOrderHeader     poh  = new PurchaseOrderHeader();

            try
            {
                poh = data.GetPurchaseOrderHeader(purchaseOrderID);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "GetPurchaseOrderHeaders");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(poh);
        }
Example #7
0
        public bool UpdatePurchaseOrderHeader(PurchaseOrderHeader purchaseorderheader)
        {
            PurchaseOrderHeaderData data = new PurchaseOrderHeaderData();
            bool ret = false;

            try
            {
                ret = data.UpdatePurchaseOrderHeader(purchaseorderheader);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "UpdatePurchaseOrderHeader");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(ret);
        }
Example #8
0
        public int AddPurchaseOrderHeader(PurchaseOrderHeader purchaseorderheader)
        {
            PurchaseOrderHeaderData data = new PurchaseOrderHeaderData();
            int ret = 0;

            try
            {
                ret = data.AddPurchaseOrderHeader(purchaseorderheader);
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "AddPurchaseOrderHeader");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(ret);
        }