private void loadFactories() { List <string> factoryNames = new List <string>(); //SQL retrieve to get all the factories to be loaded -> into 'factoryNames' factoryNames = DBWIDGET.RetrieveFactoryNames("SELECT flocation FROM Factory"); //Put the factories into the combobox comboBoxSelectFactory.Items.Clear(); comboBoxSelectFactory.Items.AddRange(factoryNames.ToArray()); }
private void loadProducts() { List <string> productNames = new List <string>(); //SQL retrieve to get all the factories to be loaded -> into 'factoryNames' productNames = DBWIDGET.RetrieveFactoryNames("SELECT flavour FROM ice_cream"); //Put the factories into the combobox listBoxListOfProducts.Items.Clear(); listBoxListOfProducts.Items.AddRange(productNames.ToArray()); }