/// <summary>
 /// 分页获取符合查询条件的数据
 /// </summary>
 /// <param name="financePayDetailQuery">FinancePayDetailQuery查询实体对象</param>
 /// <returns>Pager<FinancePayDetailEntity></returns>
 public Pager<FinancePayDetailEntity> GetFinancePayDetailPageList(FinancePayDetailQuery financePayDetailQuery)
 {
     return FinancePayDetailBusProvider.GetFinancePayDetailPageList(financePayDetailQuery);
 }
 /// <summary>
 /// 获取所有符合查询条件的数据
 /// </summary>
 /// <param name="financePayDetailQuery">FinancePayDetailQuery查询实体对象</param>
 /// <returns>List<FinancePayDetailEntity></returns>
 public List<FinancePayDetailEntity> GetFinancePayDetailList(FinancePayDetailQuery financePayDetailQuery)
 {
     return FinancePayDetailDataAccess.Instance.GetFinancePayDetailList(financePayDetailQuery);
 }
 public Pager<FinancePayDetailEntity> GetFinancePayDetailPageList(FinancePayDetailQuery query)
 {
     int recordCount=0;
     string whereSQL=FinancePayDetailQueryToSQLWhere(query);
     string orderBy=FinancePayDetailQueryToSQLOrder(query);
     DataSet ds=db.GetPagingData("FinancePayDetail","BillID,JournalID,AuthorID,EBankType,TransactionID,TotalFee,Currency,IsInCome,PayType,PayStatus,PayDate,ProductTable,ProductID,ProductDes,UserAccount,BankID,BankNo,AddDate",orderBy,whereSQL,query.CurrentPage,query.PageSize,out recordCount);
     Pager<FinancePayDetailEntity>  pager=new Pager<FinancePayDetailEntity>();
     if(ds!=null && ds.Tables.Count>0)
     {
          pager.ItemList= MakeFinancePayDetailList(ds.Tables[0]);
     }
     pager.CurrentPage=query.CurrentPage;
     pager.PageSize=query.PageSize;
     pager.TotalRecords=recordCount;
     return pager;
 }
 public List<FinancePayDetailEntity> GetFinancePayDetailList(FinancePayDetailQuery query)
 {
     List<FinancePayDetailEntity> list = new List<FinancePayDetailEntity>();
     StringBuilder sqlCommandText = new StringBuilder();
     sqlCommandText.Append("SELECT BillID,JournalID,AuthorID,EBankType,TransactionID,TotalFee,Currency,IsInCome,PayType,PayStatus,PayDate,ProductTable,ProductID,ProductDes,UserAccount,BankID,BankNo,AddDate FROM dbo.FinancePayDetail WITH(NOLOCK)");
     string whereSQL = FinancePayDetailQueryToSQLWhere(query);
     string orderBy=FinancePayDetailQueryToSQLOrder(query);
     if(!string.IsNullOrEmpty(whereSQL)) sqlCommandText.Append(" WHERE " + whereSQL);
     if(!string.IsNullOrEmpty(orderBy)) sqlCommandText.Append(" ORDER BY " + orderBy);
     DbCommand cmd = db.GetSqlStringCommand(sqlCommandText.ToString());
     using(IDataReader dr = db.ExecuteReader(cmd))
     {
         list = MakeFinancePayDetailList(dr);
     }
     return list;
 }
 /// <summary>
 /// 将查询实体转换为Where语句
 /// <param name="query">查询实体</param>
 /// <returns>获取Where语句,不包含Where</returns>
 /// </summary>
 public string FinancePayDetailQueryToSQLWhere(FinancePayDetailQuery query)
 {
     return string.Empty;
 }
 /// <summary>
 /// 将查询实体转换为Order语句
 /// <param name="query">查询实体</param>
 /// <returns>获取Order语句,不包含Order</returns>
 /// </summary>
 public string FinancePayDetailQueryToSQLOrder(FinancePayDetailQuery query)
 {
     return " BillID DESC";
 }