protected void btnSubmit_Click(object sender, EventArgs e) { if (txtbxid.Text == "codi___-____") { showalert("Enter sutydy ID"); txtbxid.Focus(); } else if (txtbx1.Text == "") { showalert("Enter Date of withdrawal!"); txtbx1.Focus(); } else if (txtbx2.Text == "") { showalert("Enter Childs initials"); txtbx2.Focus(); } else if (txtbx3.Text == "") { showalert("Enter mothers initials"); txtbx3.Focus(); } else if (txtbx4.Text == "") { showalert("Enter Date of birth"); txtbx4.Focus(); } else if (txtbx5.Text == "") { showalert("Enter Date of last visit"); txtbx5.Focus(); } else if (txtbx6.Text == "") { showalert("Enter name of last visit"); txtbx6.Focus(); } else if (Rdbtn1.SelectedItem == null) { showalert("Select Any option"); Rdbtn1.Focus(); } else if (rdbtn2.SelectedItem == null) { showalert("Select Any option"); rdbtn2.Focus(); } else if (rdbtn2.SelectedIndex == 3 && txtbx8.Text == "") { showalert("Please Specify other"); txtbx8.Focus(); } else { if (FormExist() == false) { insertdata(); } else { showalert("Study ID already exists"); } } }
protected void btnSubmit_Click(object sender, EventArgs e) { if (txtbx1.Text == "") { showalert("Enter Study site"); txtbx1.Focus(); } else if (txtbx2.Text == "codi___-____") { showalert("Enter Participant ID!"); txtbx2.Focus(); } else if (txtbx2cd.Text == "") { showalert("Enter Participant initials!"); txtbx2cd.Focus(); } else if (txtbx3.Text == "") { showalert("Enter Date of protocol deviation!"); txtbx3.Focus(); } else if (txtbx4_1.Text == "") { showalert("Enter description of deviation!"); txtbx4_1.Focus(); } else if (txtbx5_1.Text == "") { showalert("Enter reason for deviation!"); txtbx5_1.Focus(); } else if (Rdbtn1.SelectedItem == null) { showalert("Select Any option"); Rdbtn1.Focus(); } else if (Rdbtn2.SelectedItem == null) { showalert("Select Any option"); Rdbtn2.Focus(); } else if (chkbx.SelectedItem == null) { showalert("Select atleast one option"); Rdbtn2.Focus(); } else if (txtbx6_1.Text == "") { showalert("Enter steps to resolve deviation!"); txtbx6_1.Focus(); } else { if (FormExist() == false) { insertdata(); } else { showalert("Study ID already deviated from protocol"); } } }