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); }
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; }
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); }
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); }
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); }
public bool Contains(PurchaseOrderHeader purchaseOrderHeader) { return(this.List.Contains(purchaseOrderHeader)); }
public void Remove(PurchaseOrderHeader purchaseOrderHeader) { this.List.Remove(purchaseOrderHeader); }
public void Insert(int index, PurchaseOrderHeader purchaseOrderHeader) { this.List.Insert(index, purchaseOrderHeader); }
public int IndexOf(PurchaseOrderHeader purchaseOrderHeader) { return(this.List.IndexOf(purchaseOrderHeader)); }
public int Add(PurchaseOrderHeader purchaseOrderHeader) { return(this.List.Add(purchaseOrderHeader)); }