protected void Button1_Click(object sender, EventArgs e) { objp.inserted_by = Session["emp_code"].ToString(); objp.pateint_code = Session["pateint_code"].ToString(); objp.category = TextBox21.Text; objp.drug_name = TextBox22.Text; objp.dose = TextBox14.Text; objp.route = TextBox23.Text; objp.frequency = TextBox24.Text; if (TextBox25.Text == null) { objp.timea = "0"; } else { objp.timea = TextBox25.Text; } if (TextBox26.Text == null) { objp.timeb = "0"; } else { objp.timeb = TextBox26.Text; } if (TextBox27.Text == null) { objp.timec = "0"; } else { objp.timec = TextBox27.Text; } if (TextBox27.Text == null) { objp.timed = "0"; } else { objp.timed = TextBox28.Text; } objp.opd_code = Session["opd_code"].ToString(); objb.add_opd_medication(objp); BindData(); }