protected void ButtonAdd_Click(object sender, EventArgs e)
        {
            PurchaseOrderDAO poDAO = new PurchaseOrderDAO();
            PurchaseOrder po = new PurchaseOrder();
            DateTime t1 = new DateTime(2010, 12, 12);
            DateTime t2 = new DateTime(2010, 12, 20);
            po.SupplierID = 2;
            po.PONumber = "90000";
            po.DateOfOrder = t1;
            po.DateToSupply = t2;
            po.AttentionTo = 2;
            po.CreatedBy = 2;
            po.DateReceived = t2;
            po.IsDelivered = false;

            PurchaseOrderItem poitem1 = new PurchaseOrderItem();

            po.PurchaseOrderItems.Add(poitem1);

            PurchaseOrder savedPO = poDAO.CreatePurchaseOrder(po);
            //savedPO.PurchaseOrderID
            List<PurchaseOrderItem> poitems = savedPO.PurchaseOrderItems.ToList<PurchaseOrderItem>();
            //poitems[0].PurchaseOrderItemID
        }
 public PurchaseOrderManager()
 {
     purchaseOrderDAO = new PurchaseOrderDAO();
 }