private List <Customer> customers = null; // create class variable list for customer private void frmCustomers_Load(object sender, EventArgs e) { customers = CustomerDB.GetCustomers(); // get list of customers FillCustomerListBox(); // call method to fill customer list box }
public void Save() { CustomerDB.SaveCustomers(this); }
public void Save() { CustomerDB.SaveCustomers(customers); }
public void Fill() { customers = CustomerDB.GetCustomers(); }
private void frmCustomers_Load(object sender, System.EventArgs e) { customers = CustomerDB.GetCustomers(); FillCustomerListBox(); }
private void frmCustomers_Load(object sender, EventArgs e) // When the form loads... { customers = CustomerDB.GetCustomers(); // Grab the customers out of the database FillCustomerListBox(); // Then fill the list box with them }
private void frmCustomers_Load(object sender, EventArgs e) { // TODO: Add a statement that gets the customers here customers = CustomerDB.GetCustomers(); FillCustomerListBox(); }