private void LoadData() { SystemHelper.BindComboxToSupply(cbSupply); SystemHelper.BindComboxToTool(cbTool); if (CurrentOrder == null) CurrentOrder = new PurchaseOrder(); txtCode.Text = CurrentOrder.Code; dtPurchaseDate.Value = CurrentOrder.PurchaseDate; txtQuantity.Text = CurrentOrder.Quantity.ToString(); txtUnitPrice.Text = CurrentOrder.UnitPrice.ToString(); txtComment.Text = CurrentOrder.Comment; cbSupply.SelectedItem = CurrentOrder.Supply; cbTool.SelectedItem = CurrentOrder.Tool; }
/// <summary> /// Deprecated Method for adding a new object to the PurchaseOrders EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToPurchaseOrders(PurchaseOrder purchaseOrder) { base.AddObject("PurchaseOrders", purchaseOrder); }
/// <summary> /// Create a new PurchaseOrder object. /// </summary> /// <param name="purchaseOrderID">Initial value of the PurchaseOrderID property.</param> /// <param name="code">Initial value of the Code property.</param> /// <param name="supplyID">Initial value of the SupplyID property.</param> /// <param name="toolID">Initial value of the ToolID property.</param> /// <param name="unitPrice">Initial value of the UnitPrice property.</param> /// <param name="quantity">Initial value of the Quantity property.</param> /// <param name="purchaseDate">Initial value of the PurchaseDate property.</param> /// <param name="lastUpdatedBy">Initial value of the LastUpdatedBy property.</param> /// <param name="lastUpdateTime">Initial value of the LastUpdateTime property.</param> public static PurchaseOrder CreatePurchaseOrder(global::System.Int32 purchaseOrderID, global::System.String code, global::System.Int32 supplyID, global::System.Int32 toolID, global::System.Decimal unitPrice, global::System.Decimal quantity, global::System.DateTime purchaseDate, global::System.Int32 lastUpdatedBy, global::System.DateTime lastUpdateTime) { PurchaseOrder purchaseOrder = new PurchaseOrder(); purchaseOrder.PurchaseOrderID = purchaseOrderID; purchaseOrder.Code = code; purchaseOrder.SupplyID = supplyID; purchaseOrder.ToolID = toolID; purchaseOrder.UnitPrice = unitPrice; purchaseOrder.Quantity = quantity; purchaseOrder.PurchaseDate = purchaseDate; purchaseOrder.LastUpdatedBy = lastUpdatedBy; purchaseOrder.LastUpdateTime = lastUpdateTime; return purchaseOrder; }