private void UpdatePage(clsInventory prInventory) { _Inventory = prInventory; lblDescription.Text = _Inventory.description; txtPrice.Text = _Inventory.pricePerItem.ToString(); txtStockQuantity.Text = _Inventory.quantity.ToString(); lblCategory.Text = _Inventory.category; (ctcInventoryDetails.Content as IInventoryControl).UpdateControl(prInventory); }
public void DispatchInventoryForm(clsInventory prInventory) { Dictionary <string, Delegate> _InventoryForm = new Dictionary <string, Delegate> { { "Clothing", new LoadInventoryControlDelegate(RunClothing) }, { "Furniture", new LoadInventoryControlDelegate(RunFurniture) } }; _InventoryForm[prInventory.category].DynamicInvoke(prInventory); UpdatePage(prInventory); }
//public void PushData(clsInventory prInventory) //{ // throw new NotImplementedException(); //} public void UpdateControl(clsInventory prInventory) { txtFurnitureWeight.Text = prInventory.furnitureWeight.ToString(); txtFurnitureNumParts.Text = prInventory.furnitureNumParts.ToString(); }
internal static async Task <string> UpdateInventoryAsync(clsInventory prInventory) { return(await InsertOrUpdateAsync(prInventory, "http://localhost:60064/api/bshop/PutInventory", "PUT")); }
public void UpdateControl(clsInventory prInventory) { txtClothingSize.Text = prInventory.clothingSize.ToString(); txtClothingGender.Text = prInventory.clothingGender; }
private void RunFurniture(clsInventory prInventory) { ctcInventoryDetails.Content = new ucFurniture(); }
private void RunClothing(clsInventory prInventory) { ctcInventoryDetails.Content = new ucClothing(); }