private void metroButton2_Click(object sender, EventArgs e) { if (comboBoxAccType.Text != "" && metroTextBoxUsername.Text != "" && metroTextBoxPassword.Text != "" && metroTextBoxFullName.Text != "" && metroTextBoxPhone.Text != "" && metroTextBoxAddress.Text != "") { if (comboBoxAccType.Text == "Admin") { bool m = u.AddAdmin(metroTextBoxUsername.Text, metroTextBoxPassword.Text, metroTextBoxFullName.Text, metroTextBoxPhone.Text, metroTextBoxAddress.Text); if (m == true) { MetroFramework.MetroMessageBox.Show(this, "Admin Account Added Successfully."); } } else if (comboBoxAccType.Text == "Doctor") { bool m = u.AddDoc(metroTextBoxUsername.Text, metroTextBoxPassword.Text, metroTextBoxFullName.Text, metroTextBoxPhone.Text, metroTextBoxAddress.Text); if (m == true) { MetroFramework.MetroMessageBox.Show(this, "Doctor Account Added Successfully."); } } else if (comboBoxAccType.Text == "Receptionist") { bool m = u.AddReceptionist(metroTextBoxUsername.Text, metroTextBoxPassword.Text, metroTextBoxFullName.Text, metroTextBoxPhone.Text, metroTextBoxAddress.Text); if (m == true) { MetroFramework.MetroMessageBox.Show(this, "Receptionist Account Added Successfully."); } } } else { MetroFramework.MetroMessageBox.Show(this, "Please Put All Inputs."); } }