ExaminationBatchDAL.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using EMIS.DataLogic.Repositories;
  6. using System.Linq.Expressions;
  7. using EMIS.Entities;
  8. namespace EMIS.DataLogic.ExamManage
  9. {
  10. public class ExaminationBatchDAL
  11. {
  12. public ExaminationBatchRepository BatchRepository { get; set; }
  13. public IQueryable<EMIS.ViewModel.ExaminationBatchView> GetBatchList(Expression<Func<EX_ExaminationBatch, bool>> expCampus)
  14. {
  15. var query = from a in BatchRepository.GetList(expCampus)
  16. select new EMIS.ViewModel.ExaminationBatchView
  17. {
  18. EndDate = a.EndDate,
  19. ExaminationBatchID = a.ExaminationBatchID,
  20. Name = a.Name,
  21. Remark = a.Remark,
  22. Schoolyear = a.CF_Schoolyear.Code,
  23. SchoolyearID = a.SchoolyearID,
  24. StartDate = a.StartDate
  25. };
  26. return query;
  27. }
  28. }
  29. }