/// <summary> /// Build a list of distinct physicans to run report against, or use logged in user (default) /// </summary> private void BuildPhysiciansDropDown() { UserController uc = new UserController(); string phLastName = uc.GetLoggedInUserLastName(); // If user has permission to edit security/admin, then they should be // able to select physician to run report against if (PermissionManager.HasPermission(PermissionManager.EditSecurity)) { // Retrieve a list of distinct urology physicians string serviceName = "Urology"; string[] procNames = new string[] { "RP", "CP", "LP", "RALP", "PP", "LP_CONV", "SalvCP", "SalvLP", "SalvRP" }; PhysicianDa da = new PhysicianDa(); DataTable distinctPhysicians = da.GetDistinctProcSurgeonsByServiceAndProc(serviceName, procNames); PhysiciansSelect.DataSource = distinctPhysicians; PhysiciansSelect.DataBind(); if (distinctPhysicians.Select("ProcSurgeon = '" + phLastName.Replace("'", "''") + "'").Length > 0) { PhysiciansSelect.SelectedValue = phLastName; } } // Otherwise logged in user will be shown and select disabled else { ListItem singlePhysician = new ListItem(phLastName, phLastName); PhysiciansSelect.Items.Add(singlePhysician); PhysiciansSelect.Enabled = false; } }
/// <summary> /// Build a list of distinct physicans to run report /// </summary> private void BuildPhysiciansDropDown() { PhysicianDa da = new PhysicianDa(); DataTable distinctPhysicians = da.GetDistinctApptPhysicians(); PhysiciansSelect.DataSource = distinctPhysicians.DefaultView;; PhysiciansSelect.DataBind(); }