private void SearchButton_Click(object sender, EventArgs e) { int customerId = SqlUpdater.FindCustomer(SearchBar.Text); if (customerId != 0) { customerDetails = SqlUpdater.GetCustomerDetails(customerId); nameLabel.Text = customerDetails["customerName"]; phoneLabel.Text = customerDetails["phone"]; addressLabel.Text = customerDetails["address"]; cityLabel.Text = customerDetails["city"]; zipLabel.Text = customerDetails["zip"]; countryLabel.Text = customerDetails["country"]; } else { MessageBox.Show("Unable to find customer"); } }
private void SearchButton_Click_1(object sender, EventArgs e) { { int customerId = SqlUpdater.FindCustomer(SearchBar.Text); if (customerId != 0) { cForm = SqlUpdater.GetCustomerDetails(customerId); CustomerNameBox.Text = cForm["customerName"]; CustomerPhoneBox.Text = cForm["phone"]; CustomerCityBox.Text = cForm["city"]; CustomerAddressBox.Text = cForm["address"]; CustomerZipBox.Text = cForm["zip"]; CustomerCountryBox.Text = cForm["country"]; } else { MessageBox.Show("Unable to find customer"); } } }