private void can_Submit_MouseDown(object sender, MouseButtonEventArgs e) { connect = new CTUConnection(); try { if (string.IsNullOrEmpty(txt_Manufacturer.Text)) { MessageBox.Show("Please enter the details of the part"); } else if (string.IsNullOrEmpty(txt_Details.Text)) { MessageBox.Show("Please enter the name of the manufacturer"); } else if (string.IsNullOrEmpty(txt_Price.Text)) { MessageBox.Show("Please enter the price of the part"); } else { connect.GetParts(txt_Details.Text, txt_Price.Text, txt_Manufacturer.Text, Data2); } } catch (Exception) { } }