Пример #1
0
        protected void InitList()
        {
            string typeStr = Utils.GetConfigString("appSettings", "JCtype");

            EyouSoft.Model.TravelArticleOrderBy orderBy = new EyouSoft.Model.TravelArticleOrderBy();
            orderBy.FiledOrder = Eyousoft_yhq.Model.TravelArticleFiledOrder.IssueTime;
            orderBy.OrderBy    = Eyousoft_yhq.Model.OrderBy.DESC;
            List <EyouSoft.Model.TravelArticleOrderBy> orderBys = new List <EyouSoft.Model.TravelArticleOrderBy>();

            orderBys.Add(orderBy);
            EyouSoft.Model.MTravelArticleCX chaxun = new EyouSoft.Model.MTravelArticleCX();
            if (typeStr.Length > 0)
            {
                chaxun.ZXtype = typeStr.Split(',');
            }

            pageIndex = UtilsCommons.GetPagingIndex("Page");
            IList <EyouSoft.Model.MTravelArticle> list = new EyouSoft.BLL.OtherStructure.BTravelArticle().GetList(pageSize, pageIndex, ref recordCount, chaxun, orderBys);

            if (list != null && list.Count > 0)
            {
                rpt_Notices.DataSource = list;
                rpt_Notices.DataBind();
                this.ExporPageInfoSelect1.intPageSize    = pageSize;
                this.ExporPageInfoSelect1.CurrencyPage   = pageIndex;
                this.ExporPageInfoSelect1.intRecordCount = recordCount;
            }
            else
            {
                litMsg.Visible = true;
            }
        }
Пример #2
0
        /// <summary>
        /// 初始化页面
        /// </summary>
        private void PageInit()
        {
            EyouSoft.Model.MTravelArticleCX model = new EyouSoft.Model.MTravelArticleCX();
            model.ArticleTitle   = Utils.GetQueryStringValue("txtArticleTitle");
            model.ClassId        = Utils.GetInt(Utils.GetQueryStringValue("ddlArticleClass"));
            model.KeyWords       = Utils.GetQueryStringValue("txtKeyWords");
            model.OperatorName   = Utils.GetQueryStringValue("txtOperatorName");
            model.IssueTimeBegin = !string.IsNullOrEmpty(Utils.GetQueryStringValue("txtStartTime")) ? Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtStartTime")) : null;
            model.IssueTimeEnd   = !string.IsNullOrEmpty(Utils.GetQueryStringValue("txtEndTime")) ? Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtEndTime")) : null;
            model.IsFrontPage    = !string.IsNullOrEmpty(Utils.GetQueryStringValue("ddlIsFrontPage")) ? (bool?)(Utils.GetQueryStringValue("ddlIsFrontPage") == "1" ? true : false) : null;
            model.IsHot          = !string.IsNullOrEmpty(Utils.GetQueryStringValue("ddlIsHot")) ? (bool?)(Utils.GetQueryStringValue("ddlIsHot") == "1" ? true : false) : null;
            pageIndex            = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);
            EyouSoft.BLL.OtherStructure.BTravelArticle bll  = new EyouSoft.BLL.OtherStructure.BTravelArticle();
            IList <EyouSoft.Model.MTravelArticle>      list = bll.GetList(pageSize, pageIndex, ref recordCount, model, null);

            if (list != null && list.Count > 0)
            {
                this.RpArticle.DataSource = list;
                this.RpArticle.DataBind();
                BindExportPage();
            }
            else
            {
                Literal1.Text = "<tr align=\"center\"> <td colspan=\"12\">没有相关数据</td></tr>";
            }
        }
Пример #3
0
        protected void InitList()
        {
            string typeStr = Utils.GetConfigString("appSettings", "JCtype");
            EyouSoft.Model.TravelArticleOrderBy orderBy = new EyouSoft.Model.TravelArticleOrderBy();
            orderBy.FiledOrder = Eyousoft_yhq.Model.TravelArticleFiledOrder.IssueTime;
            orderBy.OrderBy = Eyousoft_yhq.Model.OrderBy.DESC;
            List<EyouSoft.Model.TravelArticleOrderBy> orderBys = new List<EyouSoft.Model.TravelArticleOrderBy>();
            orderBys.Add(orderBy);
            EyouSoft.Model.MTravelArticleCX chaxun = new EyouSoft.Model.MTravelArticleCX();
            if (typeStr.Length > 0)
            {
                chaxun.ZXtype = typeStr.Split(',');
            }

            pageIndex = UtilsCommons.GetPagingIndex("Page");
            IList<EyouSoft.Model.MTravelArticle> list = new EyouSoft.BLL.OtherStructure.BTravelArticle().GetList(pageSize, pageIndex, ref recordCount, chaxun, orderBys);

            if (list != null && list.Count > 0)
            {
                rpt_Notices.DataSource = list;
                rpt_Notices.DataBind();
                this.ExporPageInfoSelect1.intPageSize = pageSize;
                this.ExporPageInfoSelect1.CurrencyPage = pageIndex;
                this.ExporPageInfoSelect1.intRecordCount = recordCount;
            }
            else
            {
                litMsg.Visible = true;
            }
        }
Пример #4
0
 /// <summary>
 /// 初始化页面
 /// </summary>
 private void PageInit()
 {
     EyouSoft.Model.TravelArticleOrderBy orderBy = new EyouSoft.Model.TravelArticleOrderBy();
     orderBy.FiledOrder = Eyousoft_yhq.Model.TravelArticleFiledOrder.IssueTime;
     orderBy.OrderBy = Eyousoft_yhq.Model.OrderBy.DESC;
     List<EyouSoft.Model.TravelArticleOrderBy> orderBys = new List<EyouSoft.Model.TravelArticleOrderBy>();
     orderBys.Add(orderBy);
     EyouSoft.Model.MTravelArticleCX chaxun = new EyouSoft.Model.MTravelArticleCX();
     chaxun.IsSystem = new Eyousoft_yhq.Model.ArticleType[] { Eyousoft_yhq.Model.ArticleType.公告 };
     IList<EyouSoft.Model.MTravelArticle> list = new EyouSoft.BLL.OtherStructure.BTravelArticle().GetTopList(1, chaxun, orderBys);
     if (list != null && list.Count > 0)
     {
         lbltext.Text = string.Format(" <div class=\"hot\"><a href=\"/NoticeInfo.aspx?NotIceId={0}\"><b>公告:</b>{1}</a><a href=\"/NoticeList.aspx\" class=\"more\">更多 ></a></div>", list[0].ArticleID, list[0].ArticleTitle);
     }
 }
Пример #5
0
        /// <summary>
        /// 初始化页面
        /// </summary>
        private void PageInit()
        {
            EyouSoft.Model.TravelArticleOrderBy orderBy = new EyouSoft.Model.TravelArticleOrderBy();
            orderBy.FiledOrder = Eyousoft_yhq.Model.TravelArticleFiledOrder.IssueTime;
            orderBy.OrderBy    = Eyousoft_yhq.Model.OrderBy.DESC;
            List <EyouSoft.Model.TravelArticleOrderBy> orderBys = new List <EyouSoft.Model.TravelArticleOrderBy>();

            orderBys.Add(orderBy);
            EyouSoft.Model.MTravelArticleCX chaxun = new EyouSoft.Model.MTravelArticleCX();
            chaxun.IsSystem = new Eyousoft_yhq.Model.ArticleType[] { Eyousoft_yhq.Model.ArticleType.公告 };
            IList <EyouSoft.Model.MTravelArticle> list = new EyouSoft.BLL.OtherStructure.BTravelArticle().GetTopList(1, chaxun, orderBys);

            if (list != null && list.Count > 0)
            {
                lbltext.Text = string.Format(" <div class=\"hot\"><a href=\"/NoticeInfo.aspx?NotIceId={0}\"><b>公告:</b>{1}</a><a href=\"/NoticeList.aspx\" class=\"more\">更多 ></a></div>", list[0].ArticleID, list[0].ArticleTitle);
            }
        }
Пример #6
0
        protected void InitList()
        {
            EyouSoft.Model.TravelArticleOrderBy orderBy = new EyouSoft.Model.TravelArticleOrderBy();
            orderBy.FiledOrder = Eyousoft_yhq.Model.TravelArticleFiledOrder.IssueTime;
            orderBy.OrderBy = Eyousoft_yhq.Model.OrderBy.DESC;
            List<EyouSoft.Model.TravelArticleOrderBy> orderBys = new List<EyouSoft.Model.TravelArticleOrderBy>();
            orderBys.Add(orderBy);
            EyouSoft.Model.MTravelArticleCX chaxun = new EyouSoft.Model.MTravelArticleCX();
            chaxun.IsSystem = new Eyousoft_yhq.Model.ArticleType[] { Eyousoft_yhq.Model.ArticleType.公告 };
            pageIndex = UtilsCommons.GetPagingIndex("Page");
            IList<EyouSoft.Model.MTravelArticle> list = new EyouSoft.BLL.OtherStructure.BTravelArticle().GetList(pageSize, pageIndex, ref recordCount, chaxun, orderBys);

            UtilsCommons.Paging(pageSize, ref pageIndex, recordCount);
            string pagingScript = "pagingConfig.pageSize={0};pagingConfig.pageIndex={1};pagingConfig.recordCount={2};";
            if (list != null && list.Count > 0)
            {
                rpt_Notices.DataSource = list;
                rpt_Notices.DataBind();

            }
            RegisterScript(string.Format(pagingScript, pageSize, pageIndex, recordCount));
        }
Пример #7
0
        protected void InitList()
        {
            EyouSoft.Model.TravelArticleOrderBy orderBy = new EyouSoft.Model.TravelArticleOrderBy();
            orderBy.FiledOrder = Eyousoft_yhq.Model.TravelArticleFiledOrder.IssueTime;
            orderBy.OrderBy    = Eyousoft_yhq.Model.OrderBy.DESC;
            List <EyouSoft.Model.TravelArticleOrderBy> orderBys = new List <EyouSoft.Model.TravelArticleOrderBy>();

            orderBys.Add(orderBy);
            EyouSoft.Model.MTravelArticleCX chaxun = new EyouSoft.Model.MTravelArticleCX();
            chaxun.IsSystem = new Eyousoft_yhq.Model.ArticleType[] { Eyousoft_yhq.Model.ArticleType.公告 };
            pageIndex       = UtilsCommons.GetPagingIndex("Page");
            IList <EyouSoft.Model.MTravelArticle> list = new EyouSoft.BLL.OtherStructure.BTravelArticle().GetList(pageSize, pageIndex, ref recordCount, chaxun, orderBys);

            UtilsCommons.Paging(pageSize, ref pageIndex, recordCount);
            string pagingScript = "pagingConfig.pageSize={0};pagingConfig.pageIndex={1};pagingConfig.recordCount={2};";

            if (list != null && list.Count > 0)
            {
                rpt_Notices.DataSource = list;
                rpt_Notices.DataBind();
            }
            RegisterScript(string.Format(pagingScript, pageSize, pageIndex, recordCount));
        }
Пример #8
0
 /// <summary>
 /// 获得前几行数据集合
 /// </summary>
 /// <param name="Top">0:所有</param>
 /// <param name="chaXun"></param>
 /// <param name="filedOrder">排序</param>
 /// <returns></returns>
 public IList <EyouSoft.Model.MTravelArticle> GetTopList(int Top, EyouSoft.Model.MTravelArticleCX chaXun, IList <EyouSoft.Model.TravelArticleOrderBy> FiledOrder)
 {
     return(dal.GetTopList((Top < 0 ? 0 : Top), chaXun, FiledOrder));
 }
Пример #9
0
 /// <summary>
 /// 获得数据列表集合,分页
 /// </summary>
 /// <param name="pageSize"></param>
 /// <param name="pageIndex"></param>
 /// <param name="recordCount"></param>
 /// <param name="chaXun"></param>
 /// <param name="filedOrder">排序</param>
 /// <returns></returns>
 public IList <EyouSoft.Model.MTravelArticle> GetList(int pageSize, int pageIndex, ref int recordCount, EyouSoft.Model.MTravelArticleCX chaXun, IList <EyouSoft.Model.TravelArticleOrderBy> FiledOrder)
 {
     if (!Utils.ValidPaging(pageSize, pageIndex))
     {
         return(null);
     }
     return(dal.GetList(pageSize, pageIndex, ref recordCount, chaXun, FiledOrder));
 }
Пример #10
0
 /// <summary>
 /// 初始化页面
 /// </summary>
 private void PageInit()
 {
     EyouSoft.Model.MTravelArticleCX model = new EyouSoft.Model.MTravelArticleCX();
     model.ArticleTitle = Utils.GetQueryStringValue("txtArticleTitle");
     model.ClassId = Utils.GetInt(Utils.GetQueryStringValue("ddlArticleClass"));
     model.KeyWords = Utils.GetQueryStringValue("txtKeyWords");
     model.OperatorName = Utils.GetQueryStringValue("txtOperatorName");
     model.IssueTimeBegin = !string.IsNullOrEmpty(Utils.GetQueryStringValue("txtStartTime")) ? Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtStartTime")) : null;
     model.IssueTimeEnd = !string.IsNullOrEmpty(Utils.GetQueryStringValue("txtEndTime")) ? Utils.GetDateTimeNullable(Utils.GetQueryStringValue("txtEndTime")) : null;
     model.IsFrontPage = !string.IsNullOrEmpty(Utils.GetQueryStringValue("ddlIsFrontPage")) ? (bool?)(Utils.GetQueryStringValue("ddlIsFrontPage") == "1" ? true : false) : null;
     model.IsHot = !string.IsNullOrEmpty(Utils.GetQueryStringValue("ddlIsHot")) ? (bool?)(Utils.GetQueryStringValue("ddlIsHot") == "1" ? true : false) : null;
     pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1);
     EyouSoft.BLL.OtherStructure.BTravelArticle bll = new EyouSoft.BLL.OtherStructure.BTravelArticle();
     IList<EyouSoft.Model.MTravelArticle> list = bll.GetList(pageSize, pageIndex, ref recordCount, model, null);
     if (list != null && list.Count > 0)
     {
         this.RpArticle.DataSource = list;
         this.RpArticle.DataBind();
         BindExportPage();
     }
     else
     {
         Literal1.Text = "<tr align=\"center\"> <td colspan=\"12\">没有相关数据</td></tr>";
     }
 }