Beispiel #1
0
 private void LoadDoctors()
 {
     DropDownListDoctor.DataSource     = Db.LoadDoctors();
     DropDownListDoctor.DataTextField  = "DoctorName";
     DropDownListDoctor.DataValueField = "DoctorId";
     DropDownListDoctor.DataBind();
 }
Beispiel #2
0
        protected void BindPage()
        {
            if (Session["LabId"] != null)
            {
                DataSet dsbindpage = new DataSet();
                dsbindpage = operation.BindNewOrderPage(Session["LabId"].ToString());

                if (dsbindpage != null)
                {
                    DropDownListPatient.DataSource     = dsbindpage.Tables[0];
                    DropDownListPatient.DataTextField  = "PatientName";
                    DropDownListPatient.DataValueField = "PatientID";
                    DropDownListPatient.DataBind();
                    DropDownListPatient.Items.Insert(0, new ListItem("Select Patient", "0"));

                    DropDownListDoctor.DataSource     = dsbindpage.Tables[1];
                    DropDownListDoctor.DataTextField  = "NAME";
                    DropDownListDoctor.DataValueField = "NAME";
                    DropDownListDoctor.DataBind();
                    DropDownListDoctor.Items.Insert(0, new ListItem("Self", "Self"));

                    RepeaterTest.DataSource = dsbindpage.Tables[2];
                    RepeaterTest.DataBind();

                    DropDownListTestCenter.DataSource     = dsbindpage.Tables[3];
                    DropDownListTestCenter.DataTextField  = "NAME";
                    DropDownListTestCenter.DataValueField = "NAME";
                    DropDownListTestCenter.DataBind();
                    DropDownListTestCenter.Items.Insert(0, new ListItem("Reffered To", ""));
                }
            }
        }