예제 #1
0
        /// <summary>
        /// 获取刊号列表
        /// </summary>
        /// <param name="number">期刊号</param>
        /// <param name="keyword">关键字</param>
        /// <param name="sortField">排序字段</param>
        /// <param name="sortOrder">排序方式</param>
        /// <param name="pageIndex">当前页</param>
        /// <param name="pageSize">页大小</param>
        /// <returns>数据集</returns>
        public DataTable GetNumberList(string number, string keyword, string sortField, int sortOrder, int pageIndex, int pageSize, ref int pageCount, ref int rowCount)
        {
            DataSet ds = _currentDAO.GetNumberList(number, keyword, sortField, sortOrder, pageIndex, pageSize);

            if (ds == null && ds.Tables.Count <= 0)
            {
                return(null);
            }
            rowCount = 0;
            int.TryParse(ds.Tables[1].Rows[0][0].ToString(), out rowCount);
            pageCount = rowCount / pageSize;
            if (rowCount % pageSize > 0)
            {
                pageCount++;
            }
            //Data Table
            DataTable dt = ds.Tables[0];

            //Instance Ojb
            LNumberTypeMappingDAO NumTypeMap = new LNumberTypeMappingDAO(CurrentUserInfo);

            dt.Columns.Add("TypeList", typeof(DataTable));

            foreach (DataRow row in dt.Rows)
            {
                //获取板块信息
                DataSet dsChild = NumTypeMap.GetTypeInfoList(row["NumberId"].ToString());
                if (dsChild != null && dsChild.Tables.Count > 0)
                {
                    row["TypeList"] = dsChild.Tables[0];
                }
                else
                {
                    row["TypeList"] = null;
                }
            }
            return(dt);
        }
 /// <summary>
 /// 构造函数
 /// </summary>
 public LNumberTypeMappingBLL(LoggingSessionInfo pUserInfo)
 {
     this.CurrentUserInfo = pUserInfo;
     this._currentDAO     = new LNumberTypeMappingDAO(pUserInfo);
 }