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(); }