ViewDelegationInfoAndcreditCardPaymentService.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using Models;
  6. using System.Data.SqlClient;
  7. using System.Data;
  8. namespace DAL
  9. {
  10. public class ViewDelegationInfoAndcreditCardPaymentService
  11. {
  12. /// <summary>
  13. /// 根据出访日期获取数据集合
  14. /// </summary>
  15. /// <param name="userNumber"></param>
  16. /// <param name="swipeDate"></param>
  17. /// <returns></returns>
  18. public List<ViewDelegationInfoAndcreditCardPayment> GetByTime(string startTime, string endTime)
  19. {
  20. return excuteSql("select distinct ccp.diid,di.TeamName,di.ClientUnit,di.VisitDate from creditCardPayment ccp join DelegationInfo di on ccp.DIID = di.id where di.VisitDate between '" + startTime + "' and '" + endTime + "' and ccp.isdel=0 and di.isdel=0");
  21. }
  22. /// <summary>
  23. /// 查询所有
  24. /// </summary>
  25. /// <param name="sql">sql语句</param>
  26. /// <param name="param">可变参数数组</param>
  27. /// <returns>返回集合</returns>
  28. List<ViewDelegationInfoAndcreditCardPayment> excuteSql(string sql, params SqlParameter[] param)
  29. {
  30. return ServiceBase<ViewDelegationInfoAndcreditCardPayment>.excuteSql(new ViewDelegationInfoAndcreditCardPayment(), "ViewDelegationInfoAndcreditCardPayment", sql, CommandType.Text, param);
  31. }
  32. }
  33. }