public bool UpdatePurchaseOrderDetail(PurchaseOrderDetail purchaseorderdetail)
        {
            PurchaseOrderDetailData data = new PurchaseOrderDetailData();
            bool ret = false;

            try
            {
                ret = data.UpdatePurchaseOrderDetail(purchaseorderdetail);
                PurchaseOrderHeader poh = new PurchaseOrderHeader();
                poh = poh.GetPurchaseOrderHeader(this.PurchaseOrderID);
                if (poh.Status == (byte)OrderStatus.Received)
                {
                    UpdateInventory(this);
                }
            }
            catch (Exception ex)
            {
                log.Write(ex.Message, "UpdatePurchaseOrderDetail");
                throw (ex);
            }
            finally
            {
                data = null;
            }
            return(ret);
        }
示例#2
0
 public PurchaseInvoiceHeader(PurchaseOrderHeader poh)
 {
     this._EmployeeID      = poh.EmployeeID;
     this._Freight         = poh.Freight;
     this._InvoiceDate     = poh.OrderDate;
     this._InvoiceNumber   = orderNumber.GetNextNumber(OrderType.PurchaseInvoice);
     this._ModifiedDate    = DateTime.Now;
     this._PurchaseOrderID = poh.PurchaseOrderID;
     this._Status          = poh.Status;
     this._SubTotal        = poh.SubTotal;
     this._TaxAmt          = poh.TaxAmt;
     this._TotalDue        = poh.TotalDue;
     this._VendorID        = poh.VendorID;
 }
示例#3
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);
        }
示例#4
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);
        }
示例#5
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);
        }
示例#6
0
 public bool Contains(PurchaseOrderHeader purchaseOrderHeader)
 {
     return(this.List.Contains(purchaseOrderHeader));
 }
示例#7
0
 public void Remove(PurchaseOrderHeader purchaseOrderHeader)
 {
     this.List.Remove(purchaseOrderHeader);
 }
示例#8
0
 public void Insert(int index, PurchaseOrderHeader purchaseOrderHeader)
 {
     this.List.Insert(index, purchaseOrderHeader);
 }
示例#9
0
 public int IndexOf(PurchaseOrderHeader purchaseOrderHeader)
 {
     return(this.List.IndexOf(purchaseOrderHeader));
 }
示例#10
0
 public int Add(PurchaseOrderHeader purchaseOrderHeader)
 {
     return(this.List.Add(purchaseOrderHeader));
 }