Ejemplo n.º 1
0
 public Edit_ItemWindow()
 {
     InitializeComponent();
     itemIndex                 = Global.GetIndex();
     tempInventoryItem         = new InventoryItem(inventoryList[itemIndex].ItemName, inventoryList[itemIndex].CurrentStock, inventoryList[itemIndex].IdealStock);
     EditItemPanel.DataContext = tempInventoryItem;
 }
 public Window2()
 {
     InitializeComponent();
     itemIndex                = Global.GetIndex();
     tempInventoryItem        = new InventoryItem("Insert Item Name", 0, 0);
     AddItemPanel.DataContext = tempInventoryItem;
 }
Ejemplo n.º 3
0
 // Edit Item Window Constructor
 public EditItem()
 {
     // Starts up the window
     InitializeComponent();
     // gets the index of the row in the inventory list that we wish to edit
     itemIndex = Global.GetIndex();
     // creates a temp inventory item to hold the values from the main window that we wish to edit
     tempInventoryItem = new InventoryItem(inventoryList[itemIndex].ItemName, inventoryList[itemIndex].CurrentStock, inventoryList[itemIndex].IdealStock);
     // populates the edit item window with the data from the selected row
     window_panel.DataContext = tempInventoryItem;
 }
 // Add Item Window Constructor
 public AddItem()
 {
     // Opens the add item window
     InitializeComponent();
     // grabs the index of the row from global; never used
     itemIndex = Global.GetIndex();
     // Creates temporary data to populate the add item interface
     tempInventoryItem = new InventoryItem("", 0, 0);
     // Populates the add item interface
     window_panel.DataContext = tempInventoryItem;
 }
 // Iterative Update Window Constructor
 public Iterative_Update_Window()
 {
     // Initialize the component
     InitializeComponent();
     // Gets the index from global which should be set to 0 from Main_Window.cs
     itemIndex = Global.GetIndex();
     // Sets inventory item to the data from the first row
     tempInventoryItem = new InventoryItem(inventoryList[itemIndex].ItemName, inventoryList[itemIndex].CurrentStock, inventoryList[itemIndex].IdealStock);
     // Populates the interface with the inventory item
     window_panel.DataContext = tempInventoryItem;
 }