public void MedicalTestRegistration(string patientId, string medicalTestId, string testDate, string testTime) { Common_AddOPDMedicalTestRegistrationBL objCommon_AddOPDMedicalTestRegistrationBL = new Common_AddOPDMedicalTestRegistrationBL(); objCommon_AddOPDMedicalTestRegistrationBL.Common_AddOPDMedicalTestRegistration(Convert.ToInt32(patientId), Convert.ToInt32(medicalTestId), DateTime.ParseExact(testDate, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString(), testTime); }
protected void Button2_Click(object sender, EventArgs e) { testDate = DateTime.ParseExact(TextBox2.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString(); testTime = TextBox3.Text; int patientId = Convert.ToInt32(Label3.Text); int medicalTestId = -1; Common_AddOPDMedicalTestRegistrationBL objAddOPDMedicalTestRegistrationBL = new Common_AddOPDMedicalTestRegistrationBL(); if (RadioButton1.Checked) { medicalTestList.Add(ds1.Tables[0].Rows[0]["MEDICAL_TEST"].ToString()); medicalTestId = Convert.ToInt32(ds1.Tables[0].Rows[0]["ID"].ToString()); opdMedicalTestRegistrationId = objAddOPDMedicalTestRegistrationBL.Common_AddOPDMedicalTestRegistration(patientId, medicalTestId, testDate, testTime); } else if (RadioButton2.Checked) { medicalTestList.Add(ds1.Tables[0].Rows[1]["MEDICAL_TEST"].ToString()); medicalTestId = Convert.ToInt32(ds1.Tables[0].Rows[1]["ID"].ToString()); opdMedicalTestRegistrationId = objAddOPDMedicalTestRegistrationBL.Common_AddOPDMedicalTestRegistration(patientId, medicalTestId, testDate, testTime); } else if (RadioButton3.Checked) { medicalTestList.Add(ds1.Tables[0].Rows[2]["MEDICAL_TEST"].ToString()); medicalTestId = Convert.ToInt32(ds1.Tables[0].Rows[2]["ID"].ToString()); opdMedicalTestRegistrationId = objAddOPDMedicalTestRegistrationBL.Common_AddOPDMedicalTestRegistration(patientId, medicalTestId, testDate, testTime); } else if (RadioButton4.Checked) { medicalTestList.Add(ds1.Tables[0].Rows[3]["MEDICAL_TEST"].ToString()); medicalTestId = Convert.ToInt32(ds1.Tables[0].Rows[3]["ID"].ToString()); opdMedicalTestRegistrationId = objAddOPDMedicalTestRegistrationBL.Common_AddOPDMedicalTestRegistration(patientId, medicalTestId, testDate, testTime); } else if (RadioButton5.Checked) { medicalTestList.Add(ds1.Tables[0].Rows[4]["MEDICAL_TEST"].ToString()); medicalTestId = Convert.ToInt32(ds1.Tables[0].Rows[4]["ID"].ToString()); opdMedicalTestRegistrationId = objAddOPDMedicalTestRegistrationBL.Common_AddOPDMedicalTestRegistration(patientId, medicalTestId, testDate, testTime); } else if (RadioButton6.Checked) { medicalTestList.Add(ds1.Tables[0].Rows[5]["MEDICAL_TEST"].ToString()); medicalTestId = Convert.ToInt32(ds1.Tables[0].Rows[5]["ID"].ToString()); opdMedicalTestRegistrationId = objAddOPDMedicalTestRegistrationBL.Common_AddOPDMedicalTestRegistration(patientId, medicalTestId, testDate, testTime); } List <CheckBox> checkBoxList = new List <CheckBox>(); checkBoxList.Add(CheckBox1); checkBoxList.Add(CheckBox2); checkBoxList.Add(CheckBox3); checkBoxList.Add(CheckBox4); checkBoxList.Add(CheckBox5); checkBoxList.Add(CheckBox6); checkBoxList.Add(CheckBox7); checkBoxList.Add(CheckBox8); checkBoxList.Add(CheckBox9); checkBoxList.Add(CheckBox10); checkBoxList.Add(CheckBox11); checkBoxList.Add(CheckBox12); checkBoxList.Add(CheckBox13); checkBoxList.Add(CheckBox14); checkBoxList.Add(CheckBox15); checkBoxList.Add(CheckBox16); checkBoxList.Add(CheckBox17); checkBoxList.Add(CheckBox18); checkBoxList.Add(CheckBox19); checkBoxList.Add(CheckBox20); checkBoxList.Add(CheckBox21); foreach (CheckBox cb in checkBoxList) { if (cb.Checked) { medicalTestId = Convert.ToInt32(cb.Attributes["Value"]); GetMedicalTestByIdBL objGetMedicalTestByIdBL = new GetMedicalTestByIdBL(); medicalTestList.Add(objGetMedicalTestByIdBL.GetMedicalTestById(medicalTestId)); opdMedicalTestRegistrationId = objAddOPDMedicalTestRegistrationBL.Common_AddOPDMedicalTestRegistration(patientId, medicalTestId, testDate, testTime); } } Label1.Text = "OPD Medical Test Registered"; Panel2.Visible = true; Label1.Visible = true; Label1.BackColor = System.Drawing.Color.Yellow; Panel1.Visible = false; TextBox2.Text = ""; TextBox3.Text = ""; GridView1.DataSource = null; GridView1.DataBind(); }
protected void Button2_Click(object sender, EventArgs e) { testDate = DateTime.ParseExact(TextBox2.Text, "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture).ToString(); testTime = TextBox3.Text; int patientId = Convert.ToInt32(Label3.Text); int medicalTestId = -1; Common_AddOPDMedicalTestRegistrationBL objAddOPDMedicalTestRegistrationBL = new Common_AddOPDMedicalTestRegistrationBL(); if (RadioButton1.Checked) { medicalTestList.Add(ds1.Tables[0].Rows[0]["MEDICAL_TEST"].ToString()); medicalTestId = Convert.ToInt32(ds1.Tables[0].Rows[0]["ID"].ToString()); opdMedicalTestRegistrationId = objAddOPDMedicalTestRegistrationBL.Common_AddOPDMedicalTestRegistration(patientId, medicalTestId, testDate, testTime); } else if (RadioButton2.Checked) { medicalTestList.Add(ds1.Tables[0].Rows[1]["MEDICAL_TEST"].ToString()); medicalTestId = Convert.ToInt32(ds1.Tables[0].Rows[1]["ID"].ToString()); opdMedicalTestRegistrationId = objAddOPDMedicalTestRegistrationBL.Common_AddOPDMedicalTestRegistration(patientId, medicalTestId, testDate, testTime); } else if (RadioButton3.Checked) { medicalTestList.Add(ds1.Tables[0].Rows[2]["MEDICAL_TEST"].ToString()); medicalTestId = Convert.ToInt32(ds1.Tables[0].Rows[2]["ID"].ToString()); opdMedicalTestRegistrationId = objAddOPDMedicalTestRegistrationBL.Common_AddOPDMedicalTestRegistration(patientId, medicalTestId, testDate, testTime); } else if (RadioButton4.Checked) { medicalTestList.Add(ds1.Tables[0].Rows[3]["MEDICAL_TEST"].ToString()); medicalTestId = Convert.ToInt32(ds1.Tables[0].Rows[3]["ID"].ToString()); opdMedicalTestRegistrationId = objAddOPDMedicalTestRegistrationBL.Common_AddOPDMedicalTestRegistration(patientId, medicalTestId, testDate, testTime); } else if (RadioButton5.Checked) { medicalTestList.Add(ds1.Tables[0].Rows[4]["MEDICAL_TEST"].ToString()); medicalTestId = Convert.ToInt32(ds1.Tables[0].Rows[4]["ID"].ToString()); opdMedicalTestRegistrationId = objAddOPDMedicalTestRegistrationBL.Common_AddOPDMedicalTestRegistration(patientId, medicalTestId, testDate, testTime); } else if (RadioButton6.Checked) { medicalTestList.Add(ds1.Tables[0].Rows[5]["MEDICAL_TEST"].ToString()); medicalTestId = Convert.ToInt32(ds1.Tables[0].Rows[5]["ID"].ToString()); opdMedicalTestRegistrationId = objAddOPDMedicalTestRegistrationBL.Common_AddOPDMedicalTestRegistration(patientId, medicalTestId, testDate, testTime); } List<CheckBox> checkBoxList = new List<CheckBox>(); checkBoxList.Add(CheckBox1); checkBoxList.Add(CheckBox2); checkBoxList.Add(CheckBox3); checkBoxList.Add(CheckBox4); checkBoxList.Add(CheckBox5); checkBoxList.Add(CheckBox6); checkBoxList.Add(CheckBox7); checkBoxList.Add(CheckBox8); checkBoxList.Add(CheckBox9); checkBoxList.Add(CheckBox10); checkBoxList.Add(CheckBox11); checkBoxList.Add(CheckBox12); checkBoxList.Add(CheckBox13); checkBoxList.Add(CheckBox14); checkBoxList.Add(CheckBox15); checkBoxList.Add(CheckBox16); checkBoxList.Add(CheckBox17); checkBoxList.Add(CheckBox18); checkBoxList.Add(CheckBox19); checkBoxList.Add(CheckBox20); checkBoxList.Add(CheckBox21); foreach (CheckBox cb in checkBoxList) { if (cb.Checked) { medicalTestId = Convert.ToInt32(cb.Attributes["Value"]); GetMedicalTestByIdBL objGetMedicalTestByIdBL = new GetMedicalTestByIdBL(); medicalTestList.Add(objGetMedicalTestByIdBL.GetMedicalTestById(medicalTestId)); opdMedicalTestRegistrationId = objAddOPDMedicalTestRegistrationBL.Common_AddOPDMedicalTestRegistration(patientId, medicalTestId, testDate, testTime); } } Label1.Text = "OPD Medical Test Registered"; Panel2.Visible = true; Label1.Visible = true; Label1.BackColor = System.Drawing.Color.Yellow; Panel1.Visible = false; TextBox2.Text = ""; TextBox3.Text = ""; GridView1.DataSource = null; GridView1.DataBind(); }