RoomSettingDAL.cs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using EMIS.DataLogic.Repositories;
  6. namespace EMIS.ExtensionLogic.DataLogic.ExaminationManage
  7. {
  8. public class RoomSettingDAL : EMIS.DataLogic.ExaminationManage.RoomSettingDAL
  9. {
  10. //public EducationMissionRepository EducationMissionRepository { get; set; }
  11. //public InSchoolSettingRepository InSchoolSettingRepository { get; set; }
  12. //public override IQueryable<EMIS.ViewModel.FieldResour.ClassroomView> GetAvailableClassroomView(System.Linq.Expressions.Expression<Func<Entities.EX_ExaminationPlan, bool>> examinationPlanExp, System.Linq.Expressions.Expression<Func<Entities.EX_ExaminationRoomLayout, bool>> examinationRoomLayoutExp, System.Linq.Expressions.Expression<Func<Entities.CF_Classroom, bool>> classroomExp)
  13. //{
  14. // var inschool = InSchoolSettingRepository.Entities.Where(x => x.IsSelected == true).Select(x => x.InSchoolStatusID);
  15. // var q = (from c in ClassroomDAL.Value.GetClassroomQueryable(classroomExp)
  16. // join cid in
  17. // (
  18. // (from ers in ExaminationRoomSettingRepository.Entities
  19. // join nas in
  20. // (
  21. // from ep in ExaminationPlanRepository.GetList(examinationPlanExp)
  22. // join erl in ExaminationRoomLayoutRepository.Entities on true equals true
  23. // where erl.EX_ExaminationPlan.ExaminationDate == ep.ExaminationDate
  24. // && erl.EX_ExaminationPlan.EndTime >= ep.StartTime && erl.EX_ExaminationPlan.StartTime <= ep.EndTime
  25. // select erl
  26. // ) on ers.ClassroomID equals nas.ClassroomID into dnas
  27. // from enas in dnas.DefaultIfEmpty()
  28. // where enas.ClassroomID == null
  29. // select ers.ClassroomID
  30. // ).Concat(
  31. // from erl in ExaminationRoomLayoutRepository.GetList(examinationRoomLayoutExp)
  32. // select erl.ClassroomID)
  33. // ) on c.ClassroomID equals cid
  34. // select c);
  35. // return q;
  36. //}
  37. }
  38. }