Example #1
0
        private void PopulatePhysiciansDropDown()
        {
            PhysicianDa phDa = new PhysicianDa();
            DataSet     phDs = phDa.GetDistinctPhysicians();

            if (phDs.Tables.Count > 0)
            {
                FollowingPhysicianId.DataSource     = phDs.Tables[0].DefaultView;
                FollowingPhysicianId.DataTextField  = "PhName";
                FollowingPhysicianId.DataValueField = Physician.PhysicianId;
                FollowingPhysicianId.DataBind();
            }
        }
Example #2
0
    private void PopulatePhysicianDropDown(bool resetToBlank)
    {
        // populate drop down; need to reset after saving since doc name may have changed
        PhysicianDa da = new PhysicianDa();
        DataSet     ds = da.GetDistinctPhysicians();

        PhysiciansDropDown.DataSource     = ds.Tables[0].DefaultView;
        PhysiciansDropDown.DataValueField = "PhysicianId";
        PhysiciansDropDown.DataTextField  = "PhName";
        PhysiciansDropDown.DataBind();
        PhysiciansDropDown.Items.Insert(0, new ListItem(""));
        PhysiciansDropDown.Items.Insert(1, new ListItem(_dropDownNewValue));

        if (IsPostBack && resetToBlank == false)
        {
            PhysiciansDropDown.SelectedValue = _selectedPhysician;
        }
    }