public EditCustomerForm(Customer customer, CustomersForm customersForm) { InitializeComponent(); this.customersForm = customersForm; this.customer = customer; if (customer.firstName != null) { firstNameTextBox.Text = customer.firstName; } if (customer.lastName != null) { lastNameTextBox.Text = customer.lastName; } if (customer.streetAddress != null) { addressTextBox.Text = customer.streetAddress; } if (customer.state != null) { stateTextBox.Text = customer.state; } if (customer.zipcode != null) { zipcodeTextBox.Text = customer.zipcode; } if (customer.phoneNumber != null) { phoneNumTextBox.Text = customer.phoneNumber; } }
//load the customers form private void customersButton_Click(object sender, EventArgs e) { CustomersForm customersForm = new CustomersForm(); customersForm.Show(); }