public void getdata() { Testresultsql testresultssql = new Testresultsql(); DataSet ds = testresultssql.Getalldata(); ddlpatient.DataSource = ds.Tables[0]; ddlpatient.DataValueField = "vid"; ddlpatient.DataTextField = "ID"; ddlpatient.DataBind(); ddlpatient.Items.Insert(0, new ListItem { Value = "", Text = "--select--" }); ddldoctor.DataSource = ds.Tables[1]; ddldoctor.DataValueField = "vid"; ddldoctor.DataTextField = "ID"; ddldoctor.DataBind(); ddldoctor.Items.Insert(0, new ListItem { Value = "", Text = "--select--" }); ddlmedicareservices.DataSource = ds.Tables[2]; ddlmedicareservices.DataValueField = "vid"; ddlmedicareservices.DataTextField = "ID"; ddlmedicareservices.DataBind(); ddlmedicareservices.Items.Insert(0, new ListItem { Value = "", Text = "--select--" }); ddlagent.DataSource = ds.Tables[3]; ddlagent.DataValueField = "vid"; ddlagent.DataTextField = "ID"; ddlagent.DataBind(); ddlagent.Items.Insert(0, new ListItem { Value = "", Text = "--select--" }); }
public void GetTestResults() { try { Testresultsql testresultssql = new Testresultsql(); DataTable dt = testresultssql.gettestdetails(int.Parse(Session["Patientid"].ToString())); if (dt.Rows.Count > 0) { gdvTestresultspatient.DataSource = dt; gdvTestresultspatient.DataBind(); } } catch { } }