private void BindData()
        {
            DataTable dt = new BLL.common_adR().GetList("ad_group_id = " + (int)EnumCollection.adR_group.梧桐花轮播图 + " order by ad_group_id,ad_sort_id");

            this.rptBanner.DataSource = dt;
            this.rptBanner.DataBind();

            BLL.common_article bll = new BLL.common_article();
            dt = bll.GetListByPage(" group_id = " + (int)EnumCollection.article_group.我们的服务, "add_time desc", 1, 4);

            this.rptService.DataSource = dt;
            this.rptService.DataBind();

            dt = bll.GetListByPage(" group_id = " + (int)EnumCollection.article_group.客户案例, "add_time desc", 1, 8);

            this.rptCase.DataSource = dt;
            this.rptCase.DataBind();
            if (bll.GetRecordCount(" group_id = " + (int)EnumCollection.article_group.客户案例) <= 8)
            {
                this.more_i.Visible = false;
            }

            dt = bll.GetListByPage(" group_id = " + (int)EnumCollection.article_group.新闻动态, " add_time desc ", 1, 4);
            this.rptNews.DataSource = dt;
            this.rptNews.DataBind();
            if (bll.GetRecordCount(" group_id = " + (int)EnumCollection.article_group.新闻动态) <= 4)
            {
                this.news_more.Visible = false;
            }
        }
Exemple #2
0
        private void BindData()
        {
            #region 组装查询条件
            string whereStr  = " 1 = 1 ";
            string _keywords = keywords.Replace("'", "");

            if (!string.IsNullOrEmpty(_keywords))
            {
                if (Utils.IsSafeSqlString(_keywords))
                {
                    whereStr += " and (Title like  '%" + _keywords + "%')";
                }
                else
                {
                    JscriptMsg("搜索关键词中包含危险字符,检索终止!", Utils.CombUrlTxt("Manage.aspx", "keywords={0}", ""));
                    return;
                }
            }
            #endregion

            this.page        = RequestHelper.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;
            BLL.common_article bll = new BLL.common_article();
            this.rptList.DataSource = bll.GetListByPage(whereStr, "ID DESC", this.page, this.pageSize);
            this.rptList.DataBind();

            this.totalCount = bll.GetRecordCount(whereStr);
            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("Manage.aspx", "keywords={0}&page={1}", this.keywords, "__id__");
            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
        private void BindData()
        {
            BLL.common_category catebll = new BLL.common_category();

            DataTable dt = catebll.GetList(" group_id = " + (int)EnumCollection.category_group.新闻动态 + " order by sort asc ");

            this.rptCategory.DataSource = dt;
            this.rptCategory.DataBind();

            if (this.cate <= 0)
            {
                Model.common_category cateModel = catebll.GetModel(1, " group_id = " + (int)EnumCollection.category_group.新闻动态, " sort asc ");
                if (cateModel != null)
                {
                    this.cate = cateModel.id;
                }
            }

            this.pageIndex = RequestHelper.GetQueryInt("page", 1);

            BLL.common_article bll      = new BLL.common_article();
            string             whereStr = " group_id = " + (int)EnumCollection.article_group.新闻动态 + " and category_id = " + this.cate;

            dt = bll.GetListByPage("*", "View_NewsList", whereStr, " add_time desc ", pageIndex, pageSize);
            this.rptNews.DataSource = dt;
            this.rptNews.DataBind();

            int totalCount = bll.GetRecordCount("View_NewsList", whereStr);

            string pageUrl = Utils.CombUrlTxt("news_list.aspx", "page={0}", "__id__");

            PageContent.InnerHtml = PageListHelper.OutPageList(totalCount, pageIndex, pageSize, pageUrl);
        }
        private void BindData()
        {
            #region 组装查询条件
            string whereStr  = " group_id = " + (int)EnumCollection.article_group.我们的服务;
            string _keywords = keywords.Replace("'", "");

            if (!string.IsNullOrEmpty(_keywords))
            {
                if (Utils.IsSafeSqlString(_keywords))
                {
                    whereStr += " and ((title like  '%" + _keywords + "%') or (content like '%" + _keywords + "%'))";
                }
                else
                {
                    JscriptMsg("搜索关键词中包含危险字符,检索终止!", Utils.CombUrlTxt("services_list.aspx", "keywords={0}", ""));
                    return;
                }
            }

            #endregion

            this.page        = RequestHelper.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;
            BLL.common_article bll = new BLL.common_article();
            this.rptList.DataSource = bll.GetListByPage(whereStr, "add_time desc", this.page, this.pageSize);
            this.rptList.DataBind();

            this.totalCount = bll.GetRecordCount(whereStr);
            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("services_list.aspx", "keywords={0}&page={1}&cp={2}", this.keywords, "__id__", this.cp + "");
            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
        private void BindData()
        {
            #region 组装查询条件
            string whereStr  = " group_id = " + (int)EnumCollection.article_group.精品微课问题讨论 + " and category_id = " + this.chapter;
            string _keywords = keywords.Replace("'", "");

            if (!string.IsNullOrEmpty(_keywords))
            {
                if (Utils.IsSafeSqlString(_keywords))
                {
                    whereStr += " and (Title like  '%" + _keywords + "%')";
                }
                else
                {
                    JscriptMsg("搜索关键词中包含危险字符,检索终止!", Utils.CombUrlTxt("discuss_list.aspx", "keywords={0}", ""));
                    return;
                }
            }

            Model.course_chapter ccModel = new BLL.course_chapter().GetModel(chapter);
            if (ccModel != null)
            {
                chapter_name = ccModel.name;
                Model.course_info course = new BLL.course_info().GetModel(ccModel.course_id);
                if (course != null)
                {
                    course_name = course.name;
                }
                else
                {
                    JscriptMsg("传递参数错误", "back");
                    return;
                }
            }
            else
            {
                JscriptMsg("传递参数错误", "back");
                return;
            }

            #endregion

            this.page        = RequestHelper.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;
            BLL.common_article bll = new BLL.common_article();
            this.rptList.DataSource = bll.GetListByPage("*", "View_CourseArticle", whereStr, "add_time desc", this.page, this.pageSize);
            this.rptList.DataBind();

            this.totalCount = bll.GetRecordCount("View_CourseArticle", whereStr);
            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("discuss_list.aspx", "keywords={0}&page={1}&chapter={2}", this.keywords, "__id__", this.chapter + "");
            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }
Exemple #6
0
        private void BindData()
        {
            #region 组装查询条件

            if (this.class_id > 0)
            {
                this.ddlClassroom.SelectedValue = this.class_id + "";
            }
            else
            {
                this.class_id = Convert.ToInt32(this.ddlClassroom.SelectedValue);
            }

            string whereStr  = " group_id = " + (int)EnumCollection.article_group.课堂公告 + " and category_id = " + this.class_id;
            string _keywords = keywords.Replace("'", "");

            if (!string.IsNullOrEmpty(_keywords))
            {
                if (Utils.IsSafeSqlString(_keywords))
                {
                    whereStr += " and (Title like  '%" + _keywords + "%')";
                }
                else
                {
                    JscriptMsg("搜索关键词中包含危险字符,检索终止!", Utils.CombUrlTxt("notice_list.aspx", "keywords={0}&class_id={1}", "", this.class_id + ""));
                    return;
                }
            }
            #endregion

            this.page        = RequestHelper.GetQueryInt("page", 1);
            txtKeywords.Text = this.keywords;
            BLL.common_article bll = new BLL.common_article();
            this.rptList.DataSource = bll.GetListByPage("*", "View_ClassroomNotice", whereStr, "ID DESC", this.page, this.pageSize);
            this.rptList.DataBind();

            this.totalCount = bll.GetRecordCount("View_ClassroomNotice", whereStr);
            //绑定页码
            txtPageNum.Text = this.pageSize.ToString();
            string pageUrl = Utils.CombUrlTxt("notice_list.aspx", "keywords={0}&page={1}&chass_id={2}", this.keywords, "__id__", this.class_id + "");
            PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8);
        }