public void BindGrid() { try { var channelInfo = DataProvider.GovInteractChannelDao.GetChannelInfo(PublishmentSystemId, _nodeId); rptCategory.DataSource = GovInteractManager.GetFirstDepartmentIdList(channelInfo); rptCategory.ItemDataBound += rptCategory_ItemDataBound; rptCategory.DataBind(); } catch (Exception ex) { PageUtils.RedirectToErrorPage(ex.Message); } }
private string GetDepartmentTreeHtml(GovInteractChannelInfo channelInfo) { var htmlBuilder = new StringBuilder(); var departmentIdList = GovInteractManager.GetFirstDepartmentIdList(channelInfo); var treeDirectoryUrl = SiteServerAssets.GetIconUrl("tree"); var theDepartmentIdArrayList = DepartmentManager.GetDepartmentIdList(); var isLastNodeArray = new bool[theDepartmentIdArrayList.Count]; foreach (var theDepartmentId in theDepartmentIdArrayList) { var departmentInfo = DepartmentManager.GetDepartmentInfo(theDepartmentId); htmlBuilder.Append(GetTitle(departmentInfo, treeDirectoryUrl, isLastNodeArray, departmentIdList)); htmlBuilder.Append("<br/>"); } return(htmlBuilder.ToString()); }
public void Page_Load(object sender, EventArgs e) { _nodeId = TranslateUtils.ToInt(Request.QueryString["NodeID"]); if (!IsPostBack) { BreadCrumb(AppManager.Wcm.LeftMenu.IdGovInteract, AppManager.Wcm.LeftMenu.GovInteract.IdGovInteractConfiguration, "负责人员设置", AppManager.Wcm.Permission.WebSite.GovInteractConfiguration); var channelInfo = DataProvider.GovInteractChannelDao.GetChannelInfo(PublishmentSystemId, _nodeId); var departmentIdList = GovInteractManager.GetFirstDepartmentIdList(channelInfo); var userNameArrayList = new ArrayList(); foreach (var departmentId in departmentIdList) { userNameArrayList.AddRange(BaiRongDataProvider.AdministratorDao.GetUserNameArrayList(departmentId, true)); } dgContents.DataSource = userNameArrayList; dgContents.ItemDataBound += dgContents_ItemDataBound; dgContents.DataBind(); } }
public void BindGrid() { try { _nodeId = TranslateUtils.ToInt(ddlNodeID.SelectedValue); var departmentIdList = new List <int>(); if (_nodeId > 0) { var channelInfo = DataProvider.GovInteractChannelDao.GetChannelInfo(PublishmentSystemId, _nodeId); departmentIdList = BaiRongDataProvider.DepartmentDao.GetDepartmentIdListByFirstDepartmentIdList(GovInteractManager.GetFirstDepartmentIdList(channelInfo)); } if (departmentIdList.Count == 0) { departmentIdList = DepartmentManager.GetDepartmentIdList(); } rptContents.DataSource = departmentIdList; rptContents.ItemDataBound += rptContents_ItemDataBound; rptContents.DataBind(); } catch (Exception ex) { PageUtils.RedirectToErrorPage(ex.Message); } }