示例#1
0
        /// <summary>
        /// 获取指定大小的一页批次信息表集合
        /// </summary>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">分页大小</param>
        /// <param name="rowsCount">总记录条数</param>
        /// <returns>分页数据</returns>
        public ObservableCollection <GroupInfo> SelectAllCollection(int pageIndex, int pageSize, int rowsCount)
        {
            ObservableCollection <GroupInfo> datas = new ObservableCollection <GroupInfo>();
            GenDataReader reader = Session.ExcecuteReader(_dal.SelectAllSqlStatement(), pageIndex, pageSize, rowsCount);

            while (reader.Read())
            {
                GroupInfo dao = new GroupInfo();
                _dal.DataReaderToEntity(reader, dao);
                datas.Add(dao);
            }
            reader.Close();
            return(datas);
        }