private void LocationPicker_SelectionChanged(object sender, SelectionChangedEventArgs e) { Location = LocationPicker.SelectedIndex + 1; ZP_Inventory.InvAtLoc.Clear(); ZP_Inventory.InvAtLoc = SQL_Calls.Select_Inventory(Location); Inventory.ItemsSource = null; Inventory.ItemsSource = ZP_Inventory.InvAtLoc; }
public OrderWindow(int Location) { InitializeComponent(); Loc = Location; //populate the cust select CustomerSelect.ItemsSource = null; ZP_Customers.CustList = null; ZP_Customers.CustList = SQL_Calls.Select_Customers(); CustomerSelect.ItemsSource = ZP_Customers.CustList; //populate inventory by branch/loc ZP_Inventory.InvAtLoc = null; ZP_Inventory.InvAtLoc = SQL_Calls.Select_Inventory(Loc); LocInventory.ItemsSource = null; LocInventory.ItemsSource = ZP_Inventory.InvAtLoc; //get new orderID and set to SQL_Calls class for calling the number later SQL_Calls.MaxOrderID(); }