コード例 #1
0
ファイル: User_List.aspx.cs プロジェクト: summer-breeze/Oodso
    void BindDataList()
    {
        Web9long.DB.SqlCreate strsql = new Web9long.DB.MSSQL().GetSqlCreate();
        strsql.Table = "US_UserInfo left join US_GroupInfo on US_UserInfo.UI_GroupID=US_GroupInfo.RI_ID";
        strsql.Fild = "RI_ID,RI_Name,UI_UserID,UI_UserName,UI_TrueName,UI_Avatar,UI_reg_time,UI_Email,UI_Amount,UI_Point,UI_is_lock";
        strsql.Order = "order by UI_UserID desc";

        if (this.group_id != 0)
        {
            strsql.AddAndWhere("RI_ID="+this.group_id);
            ddlGroupId.SelectedValue = this.group_id.ToString();
        }

        if (!string.IsNullOrEmpty(this.keywords))
        {
            strsql.AddAndWhere(string.Format("UI_UserName like '%{0}%'",Web9long.DB.SQLUtility.Replace(keywords)));
            this.txtKeywords.Text = keywords;
        }

        if (AsGet1.Count == 0)
            AsGet1.Count = bll.GetCount(AsGet1.MakeCountSql(strsql.Table, strsql.Where));
        AsGet1.Compute();
        this.rptList.DataSource = bll.GetList<EmptyTable>(AsGet1.MakeSql(strsql.Fild, strsql.Table, strsql.Where, "UI_UserID", strsql.Order));
        this.rptList.DataBind();
    }
コード例 #2
0
ファイル: list.aspx.cs プロジェクト: summer-breeze/Oodso
 void BindDataList(int chid)
 {
     Web9long.DB.SqlCreate strsql = new Web9long.DB.MSSQL().GetSqlCreate();
     strsql.Table = "SYS_Category";
     strsql.Fild = "*";
     strsql.Order = "order by CateSortID desc,CateID desc";
     strsql.AddAndWhere(" ChannelID=" + chid);
     if (AsGet1.Count == 0)
         AsGet1.Count = bll.GetCount(AsGet1.MakeCountSql(strsql.Table, strsql.Where));
     AsGet1.Compute();
     this.rptList.DataSource = bll.GetList<EmptyTable>(AsGet1.MakeSql(strsql.Fild, strsql.Table, strsql.Where, "CateID", strsql.Order));
     this.rptList.DataBind();
 }
コード例 #3
0
ファイル: list.aspx.cs プロジェクト: summer-breeze/Oodso
    void BindDataList()
    {
        Web9long.DB.SqlCreate strsql = new Web9long.DB.MSSQL().GetSqlCreate();
        strsql.Table = "SYS_Article";
        strsql.Fild = "ArticleID,ChannelID,CategoryID,title,Sortid,Addtime,Ismsg,Istop,Isred,Ishot,Isslide";
        strsql.Order = "order by Istop desc,Sortid desc,Addtime desc";
        strsql.AddAndWhere("ChannelID=" + this.channelid);

        if (!string.IsNullOrEmpty(this.keywords))
        {
            strsql.AddAndWhere(string.Format("title like'%{0}%'", Web9long.DB.SQLUtility.Replace(keywords)));
            txtKeywords.Text = keywords;
        }

        if (this.categoryid > 0)
        {
            strsql.AddAndWhere(string.Format("( CategoryID ={0} or CategoryID in( select CategoryID from SYS_Category where CateParentID={0}))", this.categoryid));
            this.ddlCategoryId.SelectedValue = this.categoryid.ToString();
        }

        if (!string.IsNullOrEmpty(this.property))
        {
            switch (property)
            {
                case "isMsg":
                    strsql.AddAndWhere("  Ismsg=1");
                    break;
                case "isTop":
                    strsql.AddAndWhere("  Istop=1");
                    break;
                case "isRed":
                    strsql.AddAndWhere("  Isred=1");
                    break;
                case "isHot":
                    strsql.AddAndWhere("  Ishot=1");
                    break;
                case "isSlide":
                    strsql.AddAndWhere("  Isslide=1");
                    break;
            }
            this.ddlProperty.SelectedValue = this.property;
        }

        if (AsGet1.Count == 0)
            AsGet1.Count = bll.GetCount(AsGet1.MakeCountSql(strsql.Table, strsql.Where));
        AsGet1.Compute();
        this.rptList.DataSource = bll.GetList<EmptyTable>(AsGet1.MakeSql(strsql.Fild, strsql.Table, strsql.Where, "ArticleID", strsql.Order));
        this.rptList.DataBind();

    }
コード例 #4
0
    void BindDataList()
    {
        Web9long.DB.SqlCreate strsql = new Web9long.DB.MSSQL().GetSqlCreate();
        strsql.Table = "Sys_Managelog";
        strsql.Fild = "[id],[user_id],[user_name],[action_type],[note],[login_ip],[login_time]";
        strsql.Order = "order by id desc,login_time desc";
        string tmpstr = Web9long.Web.Util.Query("key");
        if (!string.IsNullOrEmpty(tmpstr))
        {
            strsql.AddAndWhere(string.Format("user_name like '%{0}%'", Web9long.DB.SQLUtility.Replace(tmpstr)));
            this.txtKeywords.Text = tmpstr;
        }

        if (AsGet1.Count == 0)
            AsGet1.Count = bll.GetCount(AsGet1.MakeCountSql(strsql.Table, strsql.Where));
        AsGet1.Compute();
        this.rptList.DataSource = bll.GetList<EmptyTable>(AsGet1.MakeSql(strsql.Fild, strsql.Table, strsql.Where, "id", strsql.Order));
        this.rptList.DataBind();

    }
コード例 #5
0
    void BindDataList()
    {
        Web9long.DB.SqlCreate strsql = new Web9long.DB.MSSQL().GetSqlCreate();
        strsql.Table = "SYS_channel";
        strsql.Fild = "*";
        strsql.Order = "order by CL_Sort desc,CL_ID desc";

        string tmp = Web9long.Web.Util.Query("keywords");
        if (tmp != "")
        {
            strsql.AddAndWhere(string.Format("CL_Name like'%{0}%'", Web9long.DB.SQLUtility.Replace(tmp)));
            txtKeywords.Text = tmp;
        }

        if (AsGet1.Count == 0)
            AsGet1.Count = bll.GetCount(AsGet1.MakeCountSql(strsql.Table, strsql.Where));
        AsGet1.Compute();
        this.rptList.DataSource = bll.GetList<EmptyTable>(AsGet1.MakeSql(strsql.Fild, strsql.Table, strsql.Where, "CL_ID", strsql.Order));
        this.rptList.DataBind();

    }
コード例 #6
0
ファイル: NewsList.aspx.cs プロジェクト: summer-breeze/Oodso
    protected void Page_Load(object sender, EventArgs e)
    {
        using (SiteBLL bll = new SiteBLL())
        {
            if (!int.TryParse(Web9long.Web.Util.Query("channelid"), out channelid)) Web9long.Web.Clew.AlertBack("参数错误");
            if (!int.TryParse(Web9long.Web.Util.Query("classid"), out categoryid)) categoryid = 0;

            //绑定频道下的类别
            List<EmptyTable> ls = bll.GetList<EmptyTable>("select CateID,CateCallIndex,Catetitle,Cateseotitle,Cateseokeywords,Cateseodescription from SYS_Category where ChannelID=" + this.channelid + " order by CateSortID desc,CateID desc");

            if (ls != null && ls.Count > 0)
            {
                foreach (EmptyTable et in ls)
                {
                    if (et.Get<int>("CateID") == categoryid)
                        etyClass = et;
                    break;
                }
            }
            etyChannel = bll.GetOnlyRow<EmptyTable>("select * from SYS_channel where CL_ID=" + channelid);
            seotitle = etyChannel.Get<string>("CL_SeoTitle");
            seokeywords = etyChannel.Get<string>("CL_Keywords");
            seodes = etyChannel.Get<string>("CL_Description");

            if (categoryid > 0)
            {
                etyClass = bll.GetOnlyRow<EmptyTable>("select * from SYS_Category where CateID=" + categoryid);
                seotitle = etyClass.Get<string>("Cateseotitle");
                seokeywords = etyClass.Get<string>("Cateseokeywords");
                seodes = etyClass.Get<string>("Cateseodescription");
            }

            Com_Config webconfig = Loneu.BLL.Config.WebSiteConfig.Info();

            this.rpt_class.DataSource = ls;
            this.rpt_class.DataBind();

            //内容列表

            HtmlPageUrl1.Pagesize = 15;
            HtmlPageUrl1.Nowpage = int.Parse(Web9long.Web.Util.Query("AsPage"));
            HtmlPageUrl1.Allcount = int.Parse(Web9long.Web.Util.Query("AsCount"));
            if (categoryid > 0)
            {
                HtmlPageUrl1.Pagename = "List_" + categoryid.ToString();
            }
            else
            {
                HtmlPageUrl1.Pagename = "List_" + channelid.ToString();
            }

            Web9long.DB.SqlCreate strsql = new Web9long.DB.MSSQL().GetSqlCreate();
            strsql.Table = "(select ArticleID,SYS_Article.ChannelID,CategoryID,title,Sortid,Addtime,Ismsg,Istop,Isred,Ishot,Isslide,Catetitle,CateCallIndex,Zhaiyao from  SYS_Article,SYS_Category where  CategoryID=CateID ) t";
            strsql.Fild = "ArticleID,ChannelID,CategoryID,title,Sortid,Addtime,Ismsg,Istop,Isred,Ishot,Isslide,Catetitle,CateCallIndex,Zhaiyao";
            strsql.Order = "order by Istop desc,Sortid desc,ArticleID desc";
            strsql.AddAndWhere(" ChannelID=" + this.channelid);
            if (this.categoryid > 0)
                strsql.AddAndWhere("CategoryID=" + this.categoryid);

            if (AsGet2.Count == 0)
                AsGet2.Count = bll.GetCount(AsGet2.MakeCountSql(strsql.Table, strsql.Where));
            AsGet2.Compute();
            this.rpt_ContentList.DataSource = bll.GetList<EmptyTable>(AsGet2.MakeSql(strsql.Fild, strsql.Table, strsql.Where, "ArticleID", strsql.Order));
            this.rpt_ContentList.DataBind();


            string sql = @" select top 10 CategoryID,Catetitle, 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 {0} 
                order by ClickHits desc,Sortid desc,ArticleID desc
            ";
            if (this.categoryid > 0)
            {
                sql = string.Format(sql, " and sys_article.ChannelID=" + this.channelid + " and SYS_Article.CategoryID=" + this.categoryid);
            }
            else
            {
                sql = string.Format(sql, " and sys_article.ChannelID=" + this.channelid);
            }

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

            sql = @" select top 11 CategoryID,title, ArticleID,CateCallIndex,CL_Name,Addtime,Zhaiyao,Catetitle 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 Isred=1
                order by Addtime desc,Sortid desc,ArticleID desc
            ";
            ls = bll.GetList<EmptyTable>(sql);
            if (ls != null && ls.Count > 0)
            {
                topety = ls[0];
                ls.Remove(topety);
            }
            this.rpt_list_tuijian.DataSource = ls;
            this.Page.DataBind();
        }
    }