//find customer private void btnFind_Click(object sender, RoutedEventArgs e) { //if the Find ID textbox is not empty... if (txtBoxfindID.Text != "") { //check if customer exists if (dataLayerSingleton.findCustomer(Convert.ToInt16(txtBoxfindID.Text)) != null) { //create a new customer object with the ID that was input Customer findCustomer = dataLayerSingleton.findCustomer(Convert.ToInt16(txtBoxfindID.Text)); //display values lblShowName.Content = findCustomer.Name; lblShowAddress.Content = findCustomer.Address; } else { MessageBox.Show("Customer does not exist"); } } else { MessageBox.Show("Write ID to find"); } txtBoxfindID.Clear(); }