PrintControlDAL.cs 901 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using EMIS.DataLogic.Repositories;
  6. using EMIS.ViewModel.TerminatePrinter;
  7. using System.Linq.Expressions;
  8. using EMIS.Entities;
  9. namespace EMIS.DataLogic.TerminatePrinter
  10. {
  11. public class PrintControlDAL
  12. {
  13. public PrintControlRepository PrintControlRepository { get; set; }
  14. public IQueryable<PrintControlView> GetPrintControlViewQueryable(Expression<Func<Tem_PrintControl, bool>> exp)
  15. {
  16. var query = from control in PrintControlRepository.GetList(exp)
  17. select new PrintControlView
  18. {
  19. PrintControlID = control.PrintControlID,
  20. YearID = control.YearID,
  21. Times = control.Times
  22. };
  23. return query;
  24. }
  25. }
  26. }