Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     webconfig = Loneu.BLL.Config.WebSiteConfig.Info();
     using (SiteBLL bll = new SiteBLL())
     {
         //友情链接
         this.rpt_list_link.DataSource = bll.GetList<EmptyTable>("select * from Com_FrendLink where YN_State=0 order by YN_FlSortNumber desc,YN_id desc");
         this.rpt_list_link.DataBind();
     }
 }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        webconfig = Loneu.BLL.Config.WebSiteConfig.Info();

        string sql = string.Empty;
        string ids = string.Empty;
        List<EmptyTable> ls = null;

        using (SiteBLL bll = new SiteBLL())
        {
            #region 今日发布
            sql = @" select top 10 CategoryID,title, ArticleID,CateCallIndex,CL_Name,Addtime,Zhaiyao from SYS_Article,SYS_Category,SYS_channel
                where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID
                and Islock<>1 and title<>''
                order by Addtime desc,Sortid desc,ArticleID desc
            ";
            ls = bll.GetList<EmptyTable>(sql);
            if (ls != null && ls.Count > 0)
            {
                topNews = ls[0];
                ls.Remove(topNews);
            }
            this.rpt_New_9NewsList.DataSource = ls;
            #endregion

            #region 热点排行
            sql = @" select top 10 CategoryID,title, ArticleID,CateCallIndex,CL_Name,Addtime,Zhaiyao,Imgurl from SYS_Article,SYS_Category,SYS_channel
                where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID
                and Islock<>1 and title<>'' and Imgurl<>'' and  Isred=1
                order by Sortid desc,ArticleID desc
            ";
            ls = new List<EmptyTable>();
            ls = bll.GetList<EmptyTable>(sql);
            if (ls != null && ls.Count > 0)
            {
                hotNews = ls[0];
                ls.Remove(hotNews);
            }
            this.rpt_Hits_NewsList.DataSource = ls;
            #endregion

            #region 图文精华

            sql = @" select top 10 CategoryID,title, ArticleID,CateCallIndex,CL_Name,Addtime,Zhaiyao,Imgurl from SYS_Article,SYS_Category,SYS_channel
                where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID
                and Islock<>1 and title<>'' and Imgurl<>'' and Zhaiyao<>''
                order by Addtime desc,ArticleID desc
            ";
            this.rpt_List_PhotoNews.DataSource = bll.GetList<EmptyTable>(sql);

            #endregion

            //夷木百科及纵览
            sql = @" select top 10 CategoryID,title, ArticleID,CateCallIndex,CL_Name,Imgurl from SYS_Article,SYS_Category,SYS_channel
                where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID
                and sys_article.ChannelID=45  and Islock<>1
                order by Istop desc,Sortid desc,ArticleID desc";
            this.rpt_list_yimu.DataSource = bll.GetList<EmptyTable>(sql);

            //数据发布纵横
            sql = @" select top 8 CategoryID,title, ArticleID,CateCallIndex,CL_Name,Imgurl from SYS_Article,SYS_Category,SYS_channel
                where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID
                and sys_article.ChannelID=39 and Imgurl<>'' and Islock<>1
                order by Istop desc,Sortid desc,ArticleID desc";

            rpt_list_PostData.DataSource = bll.GetList<EmptyTable>(sql);


            //空气净化器纵览

            sql = @" select top 2 CategoryID,title, ArticleID,CateCallIndex,CL_Name,Imgurl from SYS_Article,SYS_Category,SYS_channel
                where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID
                and sys_article.ChannelID=51 and Imgurl<>'' and Islock<>1
                order  by ArticleID desc
            ";
            ls = bll.GetList<EmptyTable>(sql);
            ids = string.Empty;
            if (ls != null && ls.Count > 0)
            {
                foreach (EmptyTable et in ls)
                {
                    ids += et.Get<string>("ArticleID") + ",";
                }
            }
            this.rpt_List_Photo_kongqi.DataSource = ls;

            sql = @" select top 5 CategoryID,title, ArticleID,CateCallIndex,CL_Name from SYS_Article,SYS_Category,SYS_channel
                where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID
                and sys_article.ChannelID=51 {0} and Islock<>1
                order by ArticleID desc
            ";

            if (!string.IsNullOrEmpty(ids))
            {
                ids = ids.TrimEnd(',');
                ids = " and ArticleID not in(" + ids + ")";
            }
            sql = string.Format(sql, ids);


            this.rpt_List_News_kongqi.DataSource = bll.GetList<EmptyTable>(sql);


            //甲醛清除纵览
            sql = @" select top 10 CategoryID,title, ArticleID,CateCallIndex,CL_Name from SYS_Article,SYS_Category,SYS_channel
                where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID
                and sys_article.ChannelID=56  and Islock<>1
                order by Istop desc,Sortid desc,ArticleID desc";

            this.rpt_List_jiaquan.DataSource = bll.GetList<EmptyTable>(sql);

            #region 社区生活纵览

            sql = @" select top 2 CategoryID,title, ArticleID,CateCallIndex,CL_Name,Imgurl from SYS_Article,SYS_Category,SYS_channel
                where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID
                and sys_article.ChannelID=2 and Imgurl<>'' and Islock<>1
                order by Istop desc,Sortid desc,ArticleID desc";
            ls = bll.GetList<EmptyTable>(sql);
            this.rpt_list_shenghuo_Photo.DataSource = ls;

            ids = string.Empty;
            if (ls != null && ls.Count > 0)
            {
                foreach (EmptyTable et in ls)
                {
                    ids += et.Get<string>("ArticleID") + ",";
                }
            }

            sql = @" select top 5 CategoryID,title, ArticleID,CateCallIndex,CL_Name from SYS_Article,SYS_Category,SYS_channel
                where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID
                and sys_article.ChannelID=2 {0} and Islock<>1
                order by Istop desc,Sortid desc,ArticleID desc
            ";
            if (!string.IsNullOrEmpty(ids))
            {
                ids = ids.TrimEnd(',');
                ids = " and ArticleID not in(" + ids + ")";
            }
            sql = string.Format(sql, ids);
            this.rpt_List_shenghuo_news.DataSource = bll.GetList<EmptyTable>(sql);


            #endregion

            //热点纵览
            sql = @" select top 10 CategoryID,title, ArticleID,CateCallIndex,CL_Name from SYS_Article,SYS_Category,SYS_channel
                where SYS_Article.CategoryID=SYS_Category.CateID and sys_article.ChannelID=SYS_channel.CL_ID
                and sys_article.ChannelID=63  and Islock<>1
                order by Istop desc,Sortid desc,ArticleID desc";

            rpt_list_Hot.DataSource = bll.GetList<EmptyTable>(sql);
        }
        this.Page.DataBind();
    }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     webconfig = Loneu.BLL.Config.WebSiteConfig.Info();
     bll = new SiteBLL();
 
 }
Ejemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     webconfig = Loneu.BLL.Config.WebSiteConfig.Info();
     bll = new SiteBLL();
     if (!Loneu.BLL.User.UserDal.CheckUserIsLogin()) Web9long.Web.Clew.Alert("您还没有登录,请登录", "Userlogin.aspx");
 }
Ejemplo n.º 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        webconfig = Loneu.BLL.Config.WebSiteConfig.Info();
        username = Web9long.Web.Util.Query("username");

    }