/// <summary> /// 获取查询条件 /// </summary> /// <param name="query"></param> /// <returns></returns> private string GetReviewBillFilter(ReviewBillQuery query) { StringBuilder strFilter = new StringBuilder(" JournalID = " + query.JournalID); if (query.PItemID != null) { strFilter.Append(" and PItemID=").Append(query.PItemID.Value); } return(strFilter.ToString()); }
/// <summary> /// 获取审稿单项数据 /// </summary> /// <param name="query"></param> /// <returns></returns> public IList <ReviewBillEntity> GetReviewBillList(ReviewBillQuery query) { string strSql = "SELECT * FROM dbo.ReviewBill with(nolock)"; string whereSQL = GetReviewBillFilter(query); if (!string.IsNullOrWhiteSpace(whereSQL)) { strSql += " WHERE " + whereSQL; } strSql += " order by SortID"; return(db.GetList <ReviewBillEntity>(strSql, MakeReviewBillList)); }
/// <summary> /// 获取审稿单项分页数据 /// </summary> /// <param name="query"></param> /// <returns></returns> public Pager <ReviewBillEntity> GetReviewBillPageList(ReviewBillQuery query) { string strSql = "SELECT *,ROW_NUMBER() OVER(ORDER BY SortID ASC) AS ROW_ID FROM dbo.ReviewBill with(nolock)", sumStr = "SELECT RecordCount=COUNT(1) FROM dbo.ReviewBill with(nolock)"; string whereSQL = GetReviewBillFilter(query); if (!string.IsNullOrWhiteSpace(whereSQL)) { strSql += " WHERE " + whereSQL; sumStr += " WHERE " + whereSQL; } return(db.GetPageList <ReviewBillEntity>(string.Format(SQL_Page_Select, strSql, query.StartIndex, query.EndIndex) , sumStr , query.CurrentPage, query.PageSize , (dr, pager) => { pager.TotalRecords = TypeParse.ToLong(dr["RecordCount"]); } , MakeReviewBillList)); }
/// <summary> /// 获取审稿单项数据 /// </summary> /// <param name="query"></param> /// <returns></returns> public IList <ReviewBillEntity> GetReviewBillList(ReviewBillQuery query) { return(ReviewBillDataAccess.Instance.GetReviewBillList(query)); }
/// <summary> /// 获取审稿单项数据 /// </summary> /// <param name="query"></param> /// <returns></returns> public IList <ReviewBillEntity> GetReviewBillList(ReviewBillQuery query) { return(ReviewBillBusProvider.GetReviewBillList(query)); }
/// <summary> /// 获取审稿单项分页数据 /// </summary> /// <param name="query"></param> /// <returns></returns> public Pager <ReviewBillEntity> GetReviewBillPageList(ReviewBillQuery query) { return(ReviewBillBusProvider.GetReviewBillPageList(query)); }