protected void LoadRoleList() { IList <EyouSoft.Model.CompanyStructure.CompanyUserRoles> userRoleList = roleBll.GetList(SiteUserInfo.CompanyID, pageSize, pageIndex, ref recordCount); if (userRoleList != null && userRoleList.Count > 0) { pm_rpt_RoleList.DataSource = userRoleList; pm_rpt_RoleList.DataBind(); } else { pm_noData.Style.Remove("display"); } }
protected void BindDepartAndRole() { int recordCount = 0; EyouSoft.IBLL.CompanyStructure.ICompanyDepartment departBll = EyouSoft.BLL.CompanyStructure.CompanyDepartment.CreateInstance(); IList <EyouSoft.Model.CompanyStructure.CompanyDepartment> departList = departBll.GetList(SiteUserInfo.CompanyID, 1000, 1, ref recordCount); sus_selDepart.DataTextField = "DepartName"; sus_selDepart.DataValueField = "ID"; sus_selDepart.DataSource = departList; sus_selDepart.DataBind(); ListItem item1 = new ListItem("请选择部门", ""); sus_selDepart.Items.Insert(0, item1); recordCount = 0; EyouSoft.IBLL.CompanyStructure.ICompanyUserRoles roleBll = EyouSoft.BLL.CompanyStructure.CompanyUserRoles.CreateInstance(); IList <EyouSoft.Model.CompanyStructure.CompanyUserRoles> roleList = roleBll.GetList(SiteUserInfo.CompanyID, 1000, 1, ref recordCount); sus_selRole.DataTextField = "RoleName"; sus_selRole.DataValueField = "ID"; sus_selRole.DataSource = roleList; sus_selRole.DataBind(); ListItem item2 = new ListItem("请选择角色", ""); sus_selRole.Items.Insert(0, item2); departList = null; roleList = null; }