protected void BindTreeView() { Dictionary <string, int> selectedIDs = new Dictionary <string, int>(); string employeeID = this.txtUserID.Text.Trim(); if (!string.IsNullOrEmpty(this.PrimaryValue)) { this.ddlRole.SelectedValue = this.PrimaryValue; selectedIDs = SPhone_UserPermissionBLL.GetSelectedIDs(new Guid(this.PrimaryValue)); } this.hdTree.Value = SPhone_UserPermissionBLL.GetTreeValue(employeeID, selectedIDs); }
protected void BindUsers() { Dictionary <string, int> selectedIDs = new Dictionary <string, int>(); string employeeID = this.txtUserID.Text.Trim(); if (!string.IsNullOrEmpty(this.PrimaryValue)) { ddlRole.Enabled = false; this.ddlRole.SelectedValue = this.PrimaryValue; selectedIDs = SPhone_UserPermissionBLL.GetSelectedIDs(new Guid(this.PrimaryValue)); } listUsers.DataSource = ProcBLL.Proc_GetCfgAdmin().Select(x => x.employee_id).ToList(); listUsers.DataBind(); foreach (ListItem item in listUsers.Items) { if (selectedIDs.ContainsKey(item.Value)) { item.Selected = true; } } }