예제 #1
0
 private void TopNewThemes()
 {
     string type = "安全公文";
     if (Request["type"] != null)
     {
         type = Request["type"].ToString();
     }
     CommonDao<SafeNews> newmgr = new CommonDao<SafeNews>();
     RepeaterDianJi.DataSource = newmgr.FindByIDdesc("10", " NewsInfoType = '安全信息' and  newstype ='" + type + "'");
     RepeaterDianJi.DataBind();
 }
예제 #2
0
        private void TopNewThemes()
        {
            CommonDao<SafeNews> newmgr = new CommonDao<SafeNews>();
            //RpNewReplay.DataSource = newmgr.FindByIDdesc("10", " NewsInfoType = '安全新闻' ");
            //RpNewReplay.DataBind();

            this.RepeaterBenYue.DataSource = newmgr.FindBydesc("10", " NewsInfoType = '安全新闻' ", "newskits");
            RepeaterBenYue.DataBind();

            this.RepeaterDianJi.DataSource = newmgr.FindBydesc("10", " NewsInfoType = '安全新闻' ", "newskits");
            RepeaterDianJi.DataBind();

            this.RepeaterPicNews.DataSource = newmgr.FindByIDdesc("10", " NewsInfoType = '安全新闻' and  newstype = '图片新闻'");
            RepeaterPicNews.DataBind();
        }
예제 #3
0
        private void GetInfoImgs()
        {
            CommonDao<SafeNews> newmgr = new CommonDao<SafeNews>();
            IList<SafeNews> list = newmgr.FindByIDdesc("5", " NewsInfoType = '安全新闻' and  newstype = '图片新闻'");

            foreach (SafeNews sn in list)
            {

                string img = GetFirstImg(sn.newspics);
                if (img != "")
                {
                    pics += img + "|";
                    links += "Details.aspx?fid=" + sn.fid.ToString() + "|";
                    texts += (sn.newstitle.Length > 16 ? sn.newstitle.Substring(0, 16) + "..." : sn.newstitle) + "|";
                }
            }
            pics = pics.TrimEnd('|') + "'";
            links = links.TrimEnd('|') + "'";
            texts = texts.TrimEnd('|') + "'";
        }
예제 #4
0
        private void GetSafeSug()
        {

            CommonDao<SafeSuggestion> sugmgr = new CommonDao<SafeSuggestion>();
            RepeaterSafeSug.DataSource = sugmgr.FindByIDdesc("5", " ");
            RepeaterSafeSug.DataBind();
        }
예제 #5
0
        private void GetNewsInfo()
        {
            CommonDao<SafeNews> newmgr = new CommonDao<SafeNews>();
            RpNewReplay.DataSource = newmgr.FindByIDdesc("10", " NewsInfoType = '安全新闻' ");
            RpNewReplay.DataBind();

            RepeaterSafeWork.DataSource = newmgr.FindByIDdesc("9", " NewsInfoType = '安全工作' ");
            RepeaterSafeWork.DataBind();

            RepeaterSafeGG.DataSource = newmgr.FindByIDdesc("10", " NewsInfoType = '安全信息' and  newstype in('安全公文','安全公告') ");
            RepeaterSafeGG.DataBind();

            RepeaterSafeZD.DataSource = newmgr.FindByIDdesc("10", " NewsInfoType = '安全信息' and  newstype in('规章制度') ");
            RepeaterSafeZD.DataBind();

            RepeaterSafeJY.DataSource = newmgr.FindByIDdesc("10", " NewsInfoType = '安全信息' and  newstype in('会议纪要') ");
            RepeaterSafeJY.DataBind();

            RepeaterSafeZS.DataSource = newmgr.FindByIDdesc("10", " NewsInfoType = '安全信息' and  newstype in('安全知识') ");
            RepeaterSafeZS.DataBind();


            RepeaterBook.DataSource = newmgr.FindByIDdesc("10", " NewsInfoType = '安全书籍' ");
            RepeaterBook.DataBind();



        }
예제 #6
0
        private void GetSafeBook()
        {
            CommonDao<SafeBook> sugmgr = new CommonDao<SafeBook>();
            RepeaterBook.DataSource = sugmgr.FindByIDdesc("5", " ");
            RepeaterBook.DataBind();

        }