Esempio n. 1
0
        protected void initList()
        {
            Eyousoft_yhq.BLL.BCustomMsg bll = new Eyousoft_yhq.BLL.BCustomMsg();
            Eyousoft_yhq.Model.serCustomMsg serchModel = new Eyousoft_yhq.Model.serCustomMsg();

            pageIndex = UtilsCommons.GetPagingIndex("Page");
            var list = bll.GetList(pageSize, pageIndex, ref recordCount, serchModel);
            if (list != null && list.Count > 0)
            {
                rptList.DataSource = list;
                rptList.DataBind();
                BindPage();
                litMsg.Visible = false;

            }
            else
            {
                rptList.Visible = false;
            }
        }
Esempio n. 2
0
        protected void initList()
        {
            Eyousoft_yhq.BLL.BCustomMsg     bll        = new Eyousoft_yhq.BLL.BCustomMsg();
            Eyousoft_yhq.Model.serCustomMsg serchModel = new Eyousoft_yhq.Model.serCustomMsg();

            pageIndex = UtilsCommons.GetPagingIndex("Page");
            var list = bll.GetList(pageSize, pageIndex, ref recordCount, serchModel);

            if (list != null && list.Count > 0)
            {
                rptList.DataSource = list;
                rptList.DataBind();
                BindPage();
                litMsg.Visible = false;
            }
            else
            {
                rptList.Visible = false;
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 获取分页列表
        /// </summary>
        /// <param name="PageSize"></param>
        /// <param name="PageIndex"></param>
        /// <param name="RecordCount"></param>
        /// <param name="serModel"></param>
        /// <returns></returns>
        public IList <Eyousoft_yhq.Model.CustomMsg> GetList(int PageSize, int PageIndex, ref int RecordCount, Eyousoft_yhq.Model.serCustomMsg serModel)
        {
            IList <Eyousoft_yhq.Model.CustomMsg> list = new List <Eyousoft_yhq.Model.CustomMsg>();

            string tableName = "tbl_Recommend";

            string fileds = " * ";

            string orderByString = " IssueTime desc ";


            StringBuilder query = new StringBuilder();

            query.Append(" 1=1 ");

            if (serModel != null)
            {
            }



            using (IDataReader dr = DbHelper.ExecuteReader1(this._db, PageSize, PageIndex, ref RecordCount, tableName, fileds, query.ToString(), orderByString, null))
            {
                while (dr.Read())
                {
                    Eyousoft_yhq.Model.CustomMsg model = new Eyousoft_yhq.Model.CustomMsg();

                    model.Id          = dr.GetInt32(dr.GetOrdinal("id"));
                    model.OpenId      = dr.GetString(dr.GetOrdinal("OpenId"));
                    model.NickName    = dr.GetString(dr.GetOrdinal("NickName"));
                    model.Sex         = dr.GetString(dr.GetOrdinal("Sex"));
                    model.IssueTime   = dr.GetDateTime(dr.GetOrdinal("IssueTime"));
                    model.CommendInfo = dr.GetString(dr.GetOrdinal("CommendInfo"));
                    list.Add(model);
                }
            };
            return(list);
        }
Esempio n. 4
0
 /// <summary>
 /// 获取分页列表
 /// </summary>
 /// <param name="PageSize"></param>
 /// <param name="PageIndex"></param>
 /// <param name="RecordCount"></param>
 /// <param name="serModel"></param>
 /// <returns></returns>
 public IList <Eyousoft_yhq.Model.CustomMsg> GetList(int PageSize, int PageIndex, ref int RecordCount, Eyousoft_yhq.Model.serCustomMsg serModel)
 {
     return(dal.GetList(PageSize, PageIndex, ref RecordCount, serModel));
 }