Exemplo n.º 1
0
    /// <summary>
    /// 绑定信息
    /// </summary>
    private void BindInfo()
    {
        //搜索控件
        CardNo.Value   = Request.QueryString["title"];
        Username.Value = Request.QueryString["uid"];
        AreaId.Value   = Request.QueryString["area"];
        WebUtility.BindHtmlSelectByBool(Sold, "--出售状态--", "已出售", "未出售", Request.QueryString["p1"]);
        WebUtility.BindHtmlSelectByBool(Enabled, "--激活状态--", "已激活", "未激活", Request.QueryString["enab"]);

        //组合查询条件
        List <SqlWhere> sqlWhereList = new List <SqlWhere>();

        sqlWhereList.Add(new SqlWhere(MemberCardModel.CARDNO, SqlWhere.Oper.Equal, Request.QueryString["title"]));
        sqlWhereList.Add(new SqlWhere(MemberCardModel.USERNAME, SqlWhere.Oper.Like, Request.QueryString["uid"]));
        sqlWhereList.Add(new SqlWhere(MemberCardModel.SOLD, SqlWhere.Oper.Equal, Request.QueryString["p1"]));
        sqlWhereList.Add(new SqlWhere(MemberCardModel.ENABLED, SqlWhere.Oper.Equal, Request.QueryString["enab"]));
        sqlWhereList.Add(new SqlWhere(MemberCardModel.CITYID, SqlWhere.Oper.In, bll_area.GetIds(Request.QueryString["area"])));

        //读取分页数据
        int iRecordsTotal = bll_memberCard.DoCount(sqlWhereList);

        QianZhu.Utility.Pagination pagination = new QianZhu.Utility.Pagination(Request.QueryString["page"], iRecordsTotal, iPageSize, "?page=$p" + WebUtility.GetUrlParams("&", false), true);
        pagination.HAlign = QianZhu.Utility.Pagination.Align.Right;
        Paging.InnerHtml  = pagination.Show();
        List <MemberCardModel> memberCardList = bll_memberCard.GetList(pagination.PageIndex, iPageSize, sqlWhereList);

        //绑定
        if (memberCardList.Count == 0)
        {
            NoDataRow.Visible = true;
        }
        Repeater1.DataSource = memberCardList;
        Repeater1.DataBind();
    }
Exemplo n.º 2
0
    /// <summary>
    /// 绑定信息
    /// </summary>
    private void BindInfo()
    {
        //搜索控件
        Uname.Value = Request.QueryString["uid"];
        WebUtility.BindHtmlSelectByBool(Enabled, "--状态--", "启用状态", "禁用状态", Request.QueryString["enab"]);

        //组合查询条件
        List <SqlWhere> sqlWhereList = new List <SqlWhere>();

        sqlWhereList.Add(new SqlWhere(AdminModel.USERNAME, SqlWhere.Oper.Equal, Request.QueryString["uid"]));
        sqlWhereList.Add(new SqlWhere(AdminModel.ENABLED, SqlWhere.Oper.Equal, Request.QueryString["enab"]));

        //读取分页数据
        int iRecordsTotal = bll_admin.DoCount(sqlWhereList);

        QianZhu.Utility.Pagination pagination = new QianZhu.Utility.Pagination(Request.QueryString["page"], iRecordsTotal, iPageSize, "?page=$p" + WebUtility.GetUrlParams("&", false), true);
        pagination.HAlign = QianZhu.Utility.Pagination.Align.Right;
        Paging.InnerHtml  = pagination.Show();
        List <AdminModel> adminList = bll_admin.GetList(pagination.PageIndex, iPageSize, sqlWhereList);

        //绑定
        if (adminList.Count == 0)
        {
            NoDataRow.Visible = true;
        }
        Repeater1.DataSource = adminList;
        Repeater1.DataBind();
    }
Exemplo n.º 3
0
    /// <summary>
    /// 绑定信息
    /// </summary>
    private void BindInfo()
    {
        //搜索控件
        Username.Value = Request.QueryString["uid"];

        //组合查询条件
        List <SqlWhere> sqlWhereList = new List <SqlWhere>();

        sqlWhereList.Add(new SqlWhere(ForumUserStateModel.USERID, SqlWhere.Oper.Join, MemberModel.PKID));
        sqlWhereList.Add(new SqlWhere(MemberModel.USERNAME, SqlWhere.Oper.Equal, Request.QueryString["uid"]));
        sqlWhereList.Add(new SqlWhere(ForumUserStateModel.FORUMSTAR, SqlWhere.Oper.Equal, true));

        //组合排序方式
        List <SqlOrder> sqlOrderList = new List <SqlOrder>();

        sqlOrderList.Add(new SqlOrder(ForumUserStateModel.FORUMSTARSORT, true));
        sqlOrderList.Add(new SqlOrder(ForumUserStateModel.PKID, true));

        //读取分页数据
        int iRecordsTotal = bll_forumUserState.DoCount(sqlWhereList);

        QianZhu.Utility.Pagination pagination = new QianZhu.Utility.Pagination(Request.QueryString["page"], iRecordsTotal, iPageSize, "?page=$p" + WebUtility.GetUrlParams("&", false), true);
        pagination.HAlign = QianZhu.Utility.Pagination.Align.Right;
        Paging.InnerHtml  = pagination.Show();
        List <ForumUserStateModel> forumUserStateList = bll_forumUserState.GetList(pagination.PageIndex, iPageSize, null, sqlWhereList, sqlOrderList);

        //绑定
        if (forumUserStateList.Count == 0)
        {
            NoDataRow.Visible = true;
        }
        Repeater1.DataSource = forumUserStateList;
        Repeater1.DataBind();
    }
Exemplo n.º 4
0
    /// <summary>
    /// 绑定信息
    /// </summary>
    private void BindInfo()
    {
        //搜索控件
        MyTitle.Value = Request.QueryString["title"];
        XMLHelper.SetCtrlByXmlData(Mode, "--消息类型--", "MsgTempMode", Request.QueryString["gid"]);
        WebUtility.BindHtmlSelectByBool(Enabled, "--状态--", "上线", "下线", Request.QueryString["enab"]);

        //组合查询条件
        List <SqlWhere> sqlWhereList = new List <SqlWhere>();

        sqlWhereList.Add(new SqlWhere(MsgTempModel.TITLE, SqlWhere.Oper.Like, Request.QueryString["title"]));
        sqlWhereList.Add(new SqlWhere(MsgTempModel.MODE, SqlWhere.Oper.Equal, Request.QueryString["gid"]));
        sqlWhereList.Add(new SqlWhere(MsgTempModel.ENABLED, SqlWhere.Oper.Equal, Request.QueryString["enab"]));

        //读取分页数据
        int iRecordsTotal = bll_msgTemp.DoCount(sqlWhereList);

        QianZhu.Utility.Pagination pagination = new QianZhu.Utility.Pagination(Request.QueryString["page"], iRecordsTotal, iPageSize, "?page=$p" + WebUtility.GetUrlParams("&", false), true);
        pagination.HAlign = QianZhu.Utility.Pagination.Align.Right;
        Paging.InnerHtml  = pagination.Show();
        List <MsgTempModel> messageTemplateList = bll_msgTemp.GetList(pagination.PageIndex, iPageSize, sqlWhereList);

        //绑定
        if (messageTemplateList.Count == 0)
        {
            NoDataRow.Visible = true;
        }
        Repeater1.DataSource = messageTemplateList;
        Repeater1.DataBind();
    }
Exemplo n.º 5
0
    /// <summary>
    /// 绑定信息
    /// </summary>
    private void BindInfo()
    {
        //搜索控件
        //if (!String.IsNullOrEmpty(Request.QueryString["uid"])) Username.Value = Request.QueryString["uid"];
        if (!String.IsNullOrEmpty(Request.QueryString["p1"]))
        {
            Realname.Value = Request.QueryString["p1"];
        }
        //if (!String.IsNullOrEmpty(Request.QueryString["p2"])) Tel.Value = Request.QueryString["p2"];
        //WebUtility.BindHtmlSelectByBool(Enabled, "--状态--", "正常", "封杀", Request.QueryString["enab"]);

        //组合查询条件
        List <SqlWhere> sqlWhereList = new List <SqlWhere>();

        // sqlWhereList.Add(new SqlWhere(MemberModel.USERNAME, SqlWhere.Oper.Equal, Request.QueryString["uid"]));
        sqlWhereList.Add(new SqlWhere(MemberModel.REALNAME, SqlWhere.Oper.Like, Request.QueryString["p1"]));
        //sqlWhereList.Add(new SqlWhere(MemberModel.MOBI, SqlWhere.Oper.Equal, Request.QueryString["p2"]));
        //sqlWhereList.Add(new SqlWhere(MemberModel.ENABLED, SqlWhere.Oper.Equal, Request.QueryString["enab"]));

        //读取分页数据
        int iRecordsTotal = bll_member.DoCount(sqlWhereList);

        QianZhu.Utility.Pagination pagination = new QianZhu.Utility.Pagination(Request.QueryString["page"], iRecordsTotal, iPageSize, "?page=$p" + WebUtility.GetUrlParams("&", false), true);
        pagination.HAlign = QianZhu.Utility.Pagination.Align.Right;
        Paging.InnerHtml  = pagination.Show();
        List <MemberModel> memberList = bll_member.GetList(pagination.PageIndex, iPageSize, sqlWhereList, null);

        //绑定
        if (memberList.Count == 0)
        {
            NoDataRow.Visible = true;
        }
        Repeater1.DataSource = memberList;
        Repeater1.DataBind();
    }
Exemplo n.º 6
0
    /// <summary>
    /// 绑定信息
    /// </summary>
    private void BindInfo()
    {
        //搜索控件
        MyTitle.Value = Request.QueryString["title"];
        WebUtility.BindHtmlSelectByBool(Inbuilt, "--系统内置--", "是", "否", Request.QueryString["stat"]);
        WebUtility.BindHtmlSelectByBool(Enabled, "--状态--", "上线", "下线", Request.QueryString["enab"]);

        //组合查询条件
        List <SqlWhere> sqlWhereList = new List <SqlWhere>();

        sqlWhereList.Add(new SqlWhere(OnePageModel.TITLE, SqlWhere.Oper.Like, Request.QueryString["title"]));
        sqlWhereList.Add(new SqlWhere(OnePageModel.INBUILT, SqlWhere.Oper.Equal, Request.QueryString["stat"]));
        sqlWhereList.Add(new SqlWhere(OnePageModel.ENABLED, SqlWhere.Oper.Equal, Request.QueryString["enab"]));

        //读取分页数据
        int iRecordsTotal = bll_onePage.DoCount(sqlWhereList);

        QianZhu.Utility.Pagination pagination = new QianZhu.Utility.Pagination(Request.QueryString["page"], iRecordsTotal, iPageSize, "?page=$p" + WebUtility.GetUrlParams("&", false), true);
        pagination.HAlign = QianZhu.Utility.Pagination.Align.Right;
        Paging.InnerHtml  = pagination.Show();
        List <OnePageModel> onePageList = bll_onePage.GetList(pagination.PageIndex, iPageSize, sqlWhereList);

        //绑定
        if (onePageList.Count == 0)
        {
            NoDataRow.Visible = true;
        }
        Repeater1.DataSource = onePageList;
        Repeater1.DataBind();
    }
Exemplo n.º 7
0
    /// <summary>
    /// 绑定信息
    /// </summary>
    private void BindInfo()
    {
        //搜索控件
        if (!String.IsNullOrEmpty(Request.QueryString["title"]))
        {
            MyTitle.Value = Request.QueryString["title"];
        }
        if (!String.IsNullOrEmpty(Request.QueryString["uid"]))
        {
            Username.Value = Request.QueryString["uid"];
        }
        if (!String.IsNullOrEmpty(Request.QueryString["date1"]))
        {
            Date1.Value = Request.QueryString["date1"];
        }
        if (!String.IsNullOrEmpty(Request.QueryString["date2"]))
        {
            Date2.Value = Request.QueryString["date2"];
        }
        XMLHelper.SetCtrlByXmlData(Status, "--状态--", "OrderStatus", Request.QueryString["stat"]);

        //组合查询条件
        List <SqlWhere> sqlWhereList = new List <SqlWhere>();

        sqlWhereList.Add(new SqlWhere(OrdersModel.MEMBERID, SqlWhere.Oper.Join, MemberModel.PKID));
        sqlWhereList.Add(new SqlWhere(MemberModel.USERNAME, SqlWhere.Oper.Equal, Request.QueryString["uid"]));
        sqlWhereList.Add(new SqlWhere(OrdersModel.TRACKID, SqlWhere.Oper.Equal, Request.QueryString["title"]));
        sqlWhereList.Add(new SqlWhere(OrdersModel.CREATETIME, SqlWhere.Oper.MoreEqual, Request.QueryString["date1"]));
        sqlWhereList.Add(new SqlWhere(OrdersModel.CREATETIME, SqlWhere.Oper.LessEqual, Request.QueryString["date2"]));
        sqlWhereList.Add(new SqlWhere(OrdersModel.STATUS, SqlWhere.Oper.Equal, Request.QueryString["stat"]));

        //计算总金额
        decimal       total     = 0;
        List <string> fieldList = new List <string>();

        fieldList.Add(OrdersModel.PRICE);
        List <OrdersModel> ordersList = bll_orders.GetList(0, 0, fieldList, sqlWhereList, null);

        foreach (OrdersModel model in ordersList)
        {
            total += model.Price;
        }
        Total.InnerHtml = "总计:<span class='price'>" + total.ToString("C0", nfi) + "</span>";

        //读取分页数据
        int iRecordsTotal = bll_orders.DoCount(sqlWhereList);

        QianZhu.Utility.Pagination pagination = new QianZhu.Utility.Pagination(Request.QueryString["page"], iRecordsTotal, iPageSize, "?page=$p" + WebUtility.GetUrlParams("&", false), true);
        pagination.HAlign = QianZhu.Utility.Pagination.Align.Right;
        Paging.InnerHtml  = pagination.Show();
        ordersList        = bll_orders.GetList(pagination.PageIndex, iPageSize, sqlWhereList, null);

        //绑定
        if (ordersList.Count == 0)
        {
            NoDataRow.Visible = true;
        }
        Repeater1.DataSource = ordersList;
        Repeater1.DataBind();
    }
Exemplo n.º 8
0
    /// <summary>
    /// 绑定信息
    /// </summary>
    private void BindInfo()
    {
        //搜索控件
        MyContent.Value = Request.QueryString["title"];
        WebUtility.BindHtmlSelectByBool(Enabled, "--状态--", "正常", "屏蔽", Request.QueryString["enab"]);

        //组合查询条件
        List <SqlWhere> sqlWhereList = new List <SqlWhere>();

        sqlWhereList.Add(new SqlWhere(CommentModel.CONTENT, SqlWhere.Oper.Like, Request.QueryString["title"]));
        sqlWhereList.Add(new SqlWhere(CommentModel.ENABLED, SqlWhere.Oper.Equal, Request.QueryString["enab"]));

        //读取分页数据
        int iRecordsTotal = bll_comment.DoCount(sqlWhereList);

        QianZhu.Utility.Pagination pagination = new QianZhu.Utility.Pagination(Request.QueryString["page"], iRecordsTotal, iPageSize, "?page=$p" + WebUtility.GetUrlParams("&", false), true);
        pagination.HAlign = QianZhu.Utility.Pagination.Align.Right;
        Paging.InnerHtml  = pagination.Show();
        List <CommentModel> commentList = bll_comment.GetList(pagination.PageIndex, iPageSize, sqlWhereList);

        //绑定
        if (commentList.Count == 0)
        {
            NoDataRow.Visible = true;
        }
        Repeater1.DataSource = commentList;
        Repeater1.DataBind();
    }
Exemplo n.º 9
0
    /// <summary>
    /// 绑定信息
    /// </summary>
    private void BindInfo()
    {
        //搜索控件
        MyTitle.Value = Request.QueryString["title"];
        bll_adGroup.BindDropDownList(GroupId, Request.QueryString["gid"], "--广告组--");
        WebUtility.BindHtmlSelectByBool(Enabled, "--状态--", "上线", "下线", Request.QueryString["enab"]);

        //组合查询条件
        List <SqlWhere> sqlWhereList = new List <SqlWhere>();

        sqlWhereList.Add(new SqlWhere(AdGroupModel.PKID, SqlWhere.Oper.Join, AdFixedModel.GROUPID));
        sqlWhereList.Add(new SqlWhere(AdGroupModel.INBUILT, SqlWhere.Oper.Equal, true));
        sqlWhereList.Add(new SqlWhere(AdFixedModel.GROUPID, SqlWhere.Oper.Equal, Request.QueryString["gid"]));
        sqlWhereList.Add(new SqlWhere(AdFixedModel.TITLE, SqlWhere.Oper.Like, Request.QueryString["title"]));
        sqlWhereList.Add(new SqlWhere(AdFixedModel.ENABLED, SqlWhere.Oper.Equal, Request.QueryString["enab"]));

        //读取分页数据
        int iRecordsTotal = bll_adFixed.DoCount(sqlWhereList);

        QianZhu.Utility.Pagination pagination = new QianZhu.Utility.Pagination(Request.QueryString["page"], iRecordsTotal, iPageSize, "?page=$p" + WebUtility.GetUrlParams("&", false), true);
        pagination.HAlign = QianZhu.Utility.Pagination.Align.Right;
        Paging.InnerHtml  = pagination.Show();
        List <AdFixedModel> adFixedList = bll_adFixed.GetList(pagination.PageIndex, iPageSize, sqlWhereList);

        //绑定
        if (adFixedList.Count == 0)
        {
            NoDataRow.Visible = true;
        }
        Repeater1.DataSource = adFixedList;
        Repeater1.DataBind();
    }
Exemplo n.º 10
0
    /// <summary>
    /// 绑定信息
    /// </summary>
    private void BindInfo()
    {
        //搜索控件
        MyTitle.Value = Request.QueryString["title"];

        //组合查询条件
        List <SqlWhere> sqlWhereList = new List <SqlWhere>();

        sqlWhereList.Add(new SqlWhere(PageSectionModel.TITLE, SqlWhere.Oper.Like, Request.QueryString["title"]));

        //读取分页数据
        int iRecordsTotal = bll_pageSection.DoCount(sqlWhereList);

        QianZhu.Utility.Pagination pagination = new QianZhu.Utility.Pagination(Request.QueryString["page"], iRecordsTotal, iPageSize, "?page=$p" + WebUtility.GetUrlParams("&", false), true);
        pagination.HAlign = QianZhu.Utility.Pagination.Align.Right;
        Paging.InnerHtml  = pagination.Show();
        List <PageSectionModel> pageSectionList = bll_pageSection.GetList(pagination.PageIndex, iPageSize, sqlWhereList);

        //绑定
        if (pageSectionList.Count == 0)
        {
            NoDataRow.Visible = true;
        }
        Repeater1.DataSource = pageSectionList;
        Repeater1.DataBind();
    }
Exemplo n.º 11
0
    /// <summary>
    /// 绑定信息
    /// </summary>
    private void BindInfo()
    {
        bll_config.Load(new string[] { "pageTitle", "keywords", "descn", "video" });
        //Title
        Page.Title = "合作伙伴" + " - " + bll_config["pageTitle"];
        //KeyWord
        WebUtility.CreateMeta(Page, "keywords", bll_config["keywords"]);
        //Description
        WebUtility.CreateMeta(Page, "description", bll_config["descn"]);


        //组合查询字段
        List <string> fieldList = new List <string>();

        fieldList.Add(AdFixedModel.PIC);
        fieldList.Add(AdFixedModel.NOTES);
        fieldList.Add(AdFixedModel.PKID);
        fieldList.Add(AdFixedModel.TITLE);
        fieldList.Add(AdFixedModel.URL);
        fieldList.Add(AdFixedModel.CREATETIME);

        //文章
        List <SqlWhere> sqlWhereList = new List <SqlWhere>();

        sqlWhereList.Add(new SqlWhere(AdFixedModel.ENABLED, SqlWhere.Oper.Equal, true));
        sqlWhereList.Add(new SqlWhere(AdFixedModel.GROUPID, SqlWhere.Oper.Equal, 7));

        //读取分页数据
        int iRecordsTotal = bll_article.DoCount(sqlWhereList);

        QianZhu.Utility.Pagination pagination = new QianZhu.Utility.Pagination(Request.QueryString["page"], iRecordsTotal, iPageSize, "/partner/page/$p/", false);
        //pagination.HomePage = category.Url;
        Paging.InnerHtml = pagination.Show();
        articleList      = bll_article.GetList(pagination.PageIndex, iPageSize, fieldList, sqlWhereList, null);
    }
Exemplo n.º 12
0
    /// <summary>
    /// 绑定信息
    /// </summary>
    private void BindInfo()
    {
        //搜索控件
        MyTitle.Value = Request.QueryString["title"];
        //CategoryId.Value = Request.QueryString["cid"];
        WebUtility.BindHtmlSelectByBool(IsTop, "--置顶--", "已置顶", "未置顶", Request.QueryString["top"]);
        WebUtility.BindHtmlSelectByBool(Enabled, "--状态--", "上线", "下线", Request.QueryString["enab"]);
        //组合查询条件
        List <SqlWhere> sqlWhereList = new List <SqlWhere>();

        sqlWhereList.Add(new SqlWhere(ProductModel.TITLE, SqlWhere.Oper.Like, Request.QueryString["title"]));
        sqlWhereList.Add(new SqlWhere(ProductModel.ISTOP, SqlWhere.Oper.Equal, Request.QueryString["top"]));
        sqlWhereList.Add(new SqlWhere(ProductModel.ENABLED, SqlWhere.Oper.Equal, Request.QueryString["enab"]));
        sqlWhereList.Add(new SqlWhere(ProductModel.CATEGORYID, SqlWhere.Oper.In, bll_category.GetIds(Request.QueryString["cid"])));
        //SystemHelper.PrintEnd(bll_category.GetIds(Request.QueryString["cid"]));
        //读取分页数据
        int iRecordsTotal = bll_product.DoCount();

        QianZhu.Utility.Pagination pagination = new QianZhu.Utility.Pagination(Request.QueryString["page"], iRecordsTotal, iPageSize, "?page=$p" + WebUtility.GetUrlParams("&", false), true);
        pagination.HAlign = QianZhu.Utility.Pagination.Align.Right;
        Paging.InnerHtml  = pagination.Show();
        List <ProductModel> productList = bll_product.GetList(pagination.PageIndex, iPageSize, null, sqlWhereList, null);

        //绑定
        if (productList.Count == 0)
        {
            NoDataRow.Visible = true;
        }
        Repeater1.DataSource = productList;
        Repeater1.DataBind();
    }
Exemplo n.º 13
0
    /// <summary>
    /// 绑定信息
    /// </summary>
    private void BindInfo()
    {
        //搜索控件
        MyTitle.Value    = Request.QueryString["title"];
        CategoryId.Value = Request.QueryString["cid"];
        // AreaId.Value = Request.QueryString["area"];
        //WebUtility.BindHtmlSelectByBool(IsHead, "--头条--", "是", "否", Request.QueryString["p1"]);
        WebUtility.BindHtmlSelectByBool(IsTop, "--置顶--", "已置顶", "未置顶", Request.QueryString["top"]);
        WebUtility.BindHtmlSelectByBool(Enabled, "--状态--", "上线", "下线", Request.QueryString["enab"]);

        //查询字段
        List <string> fieldList = new List <string>();

        fieldList.Add(ArticleModel.PKID);
        fieldList.Add(ArticleModel.TITLE);
        fieldList.Add(ArticleModel.CATEGORYID);
        fieldList.Add(ArticleModel.AREAID);
        fieldList.Add(ArticleModel.PV);
        fieldList.Add(ArticleModel.ISHEAD);
        fieldList.Add(ArticleModel.ISTOP);
        fieldList.Add(ArticleModel.ENABLED);
        fieldList.Add(ArticleModel.CREATETIME);

        //组合查询条件
        List <SqlWhere> sqlWhereList = new List <SqlWhere>();

        sqlWhereList.Add(new SqlWhere(ArticleModel.TITLE, SqlWhere.Oper.Like, Request.QueryString["title"]));
        //sqlWhereList.Add(new SqlWhere(ArticleModel.ISHEAD, SqlWhere.Oper.Equal, Request.QueryString["p1"]));
        sqlWhereList.Add(new SqlWhere(ArticleModel.ISTOP, SqlWhere.Oper.Equal, Request.QueryString["top"]));
        sqlWhereList.Add(new SqlWhere(ArticleModel.ENABLED, SqlWhere.Oper.Equal, Request.QueryString["enab"]));
        sqlWhereList.Add(new SqlWhere(ArticleModel.CATEGORYID, SqlWhere.Oper.In, bll_category.GetIds(Request.QueryString["cid"])));
        //sqlWhereList.Add(new SqlWhere(ArticleModel.AREAID, SqlWhere.Oper.In, bll_area.GetIds(Request.QueryString["area"])));

        //读取分页数据
        int iRecordsTotal = bll_article.DoCount(sqlWhereList);

        QianZhu.Utility.Pagination pagination = new QianZhu.Utility.Pagination(Request.QueryString["page"], iRecordsTotal, iPageSize, "?page=$p" + WebUtility.GetUrlParams("&", false), true);
        pagination.HAlign = QianZhu.Utility.Pagination.Align.Right;
        Paging.InnerHtml  = pagination.Show();
        List <ArticleModel> articleList = bll_article.GetList(pagination.PageIndex, iPageSize, fieldList, sqlWhereList, null);

        //绑定
        if (articleList.Count == 0)
        {
            NoDataRow.Visible = true;
        }
        Repeater1.DataSource = articleList;
        Repeater1.DataBind();
    }
Exemplo n.º 14
0
    /// <summary>
    /// 绑定信息
    /// </summary>
    private void BindInfo()
    {
        //Title
        bll_config.Load(new string[] { "pageTitle" });
        if (!String.IsNullOrEmpty(category.PageTitle))
        {
            Page.Title = category.PageTitle;
        }
        else
        {
            Page.Title = category.Title + " - " + bll_config["pageTitle"];
        }

        //KeyWord
        WebUtility.CreateMeta(Page, "keywords", category.Keywords);

        //Description
        WebUtility.CreateMeta(Page, "description", category.Descn);


        //组合查询字段
        List <string> fieldList = new List <string>();

        fieldList.Add(ArticleModel.PIC);
        fieldList.Add(ArticleModel.AUTHOR);
        fieldList.Add(ArticleModel.PKID);
        fieldList.Add(ArticleModel.TITLE);
        fieldList.Add(ArticleModel.FILES);
        fieldList.Add(ArticleModel.SOURCE);
        fieldList.Add(ArticleModel.PUBDATE);
        fieldList.Add(ArticleModel.CREATETIME);

        //文章
        List <SqlWhere> sqlWhereList = new List <SqlWhere>();

        sqlWhereList.Add(new SqlWhere(ArticleModel.ENABLED, SqlWhere.Oper.Equal, true));
        //sqlWhereList.Add(new SqlWhere(ArticleModel.CATEGORYID, SqlWhere.Oper.In, bll_category.GetIds(category.Pkid.ToString())));
        sqlWhereList.Add(new SqlWhere(ArticleModel.CATEGORYID, SqlWhere.Oper.In, bll_category.GetIds(category.Pkid.ToString())));

        //读取分页数据
        int iRecordsTotal = bll_article.DoCount(sqlWhereList);

        QianZhu.Utility.Pagination pagination = new QianZhu.Utility.Pagination(Request.QueryString["page"], iRecordsTotal, iPageSize, "/expert/" + category.Pkid.ToString() + "/page/$p/", false);
        //pagination.HomePage = category.Url;
        Paging.InnerHtml = pagination.Show();
        articleList      = bll_article.GetList(pagination.PageIndex, iPageSize, fieldList, sqlWhereList, null);
    }
Exemplo n.º 15
0
    /// <summary>
    /// 绑定信息
    /// </summary>
    private void BindInfo()
    {
        OpBtn.Visible = !group.Inbuilt;
        PicTd.Visible = group.Display == 0;

        //搜索控件
        MyTitle.Value = Request.QueryString["title"];
        if (group.Inbuilt)
        {
            Enabled.Visible = false;
        }
        else
        {
            WebUtility.BindHtmlSelectByBool(Enabled, "--状态--", "上线", "下线", Request.QueryString["enab"]);
        }

        //组合查询条件
        List <SqlWhere> sqlWhereList = new List <SqlWhere>();

        sqlWhereList.Add(new SqlWhere(AdFixedModel.GROUPID, SqlWhere.Oper.Equal, group.Pkid));
        sqlWhereList.Add(new SqlWhere(AdFixedModel.TITLE, SqlWhere.Oper.Like, Request.QueryString["title"]));
        if (group.Inbuilt)
        {
            sqlWhereList.Add(new SqlWhere(AdFixedModel.ENABLED, SqlWhere.Oper.Equal, true));
        }
        else
        {
            sqlWhereList.Add(new SqlWhere(AdFixedModel.ENABLED, SqlWhere.Oper.Equal, Request.QueryString["enab"]));
        }

        //读取分页数据
        int iRecordsTotal = bll_adFixed.DoCount(sqlWhereList);

        QianZhu.Utility.Pagination pagination = new QianZhu.Utility.Pagination(Request.QueryString["page"], iRecordsTotal, iPageSize, "?page=$p" + WebUtility.GetUrlParams("&", false), true);
        pagination.HAlign = QianZhu.Utility.Pagination.Align.Right;
        Paging.InnerHtml  = pagination.Show();
        List <AdFixedModel> adFixedList = bll_adFixed.GetList(pagination.PageIndex, iPageSize, sqlWhereList);

        //绑定
        if (adFixedList.Count == 0)
        {
            NoDataRow.Visible = true;
        }
        Repeater1.DataSource = adFixedList;
        Repeater1.DataBind();
    }
Exemplo n.º 16
0
    /// <summary>
    /// 绑定信息
    /// </summary>
    private void BindInfo()
    {
        string words = Request.QueryString["words"];

        //Title
        bll_config.Load(new string[] { "pageTitle" });
        if (String.IsNullOrEmpty(words))
        {
            Page.Title = "搜索结果 - " + bll_config["pageTitle"];
        }
        else
        {
            Page.Title = "搜索结果 - " + bll_config["pageTitle"];
        }

        //组合查询条件
        List <SqlWhere> sqlWhereList = new List <SqlWhere>();

        sqlWhereList.Add(new SqlWhere(SearchIndexModel.ENABLED, SqlWhere.Oper.Equal, true));
        sqlWhereList.Add(new SqlWhere(SearchIndexModel.TITLE, SqlWhere.Oper.Like, words));

        //读取分页数据
        int    iRecordsTotal = bll_searchIndex.DoCount(sqlWhereList);
        string homePage      = "/search/";

        if (!String.IsNullOrEmpty(words))
        {
            homePage += "w-" + HttpUtility.UrlEncode(words) + "/";
        }
        QianZhu.Utility.Pagination pagination = new QianZhu.Utility.Pagination(Request.QueryString["page"], iRecordsTotal, iPageSize, homePage + "page-$p/", false);
        pagination.HomePage = homePage;
        Paging.InnerHtml    = pagination.Show();
        List <SearchIndexModel> searchIndexList = bll_searchIndex.GetList(pagination.PageIndex, iPageSize, sqlWhereList);

        //绑定文章数据
        Repeater1.DataSource = searchIndexList;
        Repeater1.DataBind();
        ad6 = bll_adFixed.GetModel(18);
    }
Exemplo n.º 17
0
    /// <summary>
    /// 绑定信息
    /// </summary>
    private void BindInfo()
    {
        //搜索控件
        if (!String.IsNullOrEmpty(Request.QueryString["uid"]))
        {
            Username.Value = Request.QueryString["uid"];
        }
        AreaId.Value = Request.QueryString["area"];

        //组合查询条件
        List <SqlWhere> sqlWhereList = new List <SqlWhere>();

        sqlWhereList.Add(new SqlWhere(MemberModel.ENABLED, SqlWhere.Oper.Equal, true));
        sqlWhereList.Add(new SqlWhere(MemberModel.AGENTAREA, SqlWhere.Oper.More, 0));
        sqlWhereList.Add(new SqlWhere(MemberModel.USERNAME, SqlWhere.Oper.Equal, Request.QueryString["uid"]));
        sqlWhereList.Add(new SqlWhere(ArticleModel.AREAID, SqlWhere.Oper.In, bll_area.GetIds(Request.QueryString["area"])));

        List <SqlOrder> sqlOrderList = new List <SqlOrder>();

        sqlOrderList.Add(new SqlOrder(MemberModel.AGENTAREA, false));
        sqlOrderList.Add(new SqlOrder(MemberModel.PKID, false));

        //读取分页数据
        int iRecordsTotal = bll_member.DoCount(sqlWhereList);

        QianZhu.Utility.Pagination pagination = new QianZhu.Utility.Pagination(Request.QueryString["page"], iRecordsTotal, iPageSize, "?page=$p" + WebUtility.GetUrlParams("&", false), true);
        pagination.HAlign = QianZhu.Utility.Pagination.Align.Right;
        Paging.InnerHtml  = pagination.Show();
        List <MemberModel> memberList = bll_member.GetList(pagination.PageIndex, iPageSize, sqlWhereList, sqlOrderList);

        //绑定
        if (memberList.Count == 0)
        {
            NoDataRow.Visible = true;
        }
        Repeater1.DataSource = memberList;
        Repeater1.DataBind();
    }