コード例 #1
0
 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);
     }
 }
コード例 #2
0
        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());
        }
コード例 #3
0
        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();
            }
        }
コード例 #4
0
        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);
            }
        }