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 team"); } }
private void SearchButton_Click(object sender, EventArgs e) { { int customerId = SqlUpdater.FindCustomer(SearchBar.Text); if (customerId != 0) { cForm = SqlUpdater.GetCustomerDetails(customerId); TeamNameBox.Text = cForm["customerName"]; TeamPhoneBox.Text = cForm["phone"]; TeamCityBox.Text = cForm["city"]; TeamAddressBox.Text = cForm["address"]; TeamZipBox.Text = cForm["zip"]; TeamCountryBox.Text = cForm["country"]; } else { MessageBox.Show("Unable to find Team"); } } }