using System; using System.Collections.Generic; using System.Linq; using System.Text; using EMIS.DataLogic.Repositories; namespace EMIS.ExtensionLogic.DataLogic.ExaminationManage { public class RoomSettingDAL : EMIS.DataLogic.ExaminationManage.RoomSettingDAL { //public EducationMissionRepository EducationMissionRepository { get; set; } //public InSchoolSettingRepository InSchoolSettingRepository { get; set; } //public override IQueryable GetAvailableClassroomView(System.Linq.Expressions.Expression> examinationPlanExp, System.Linq.Expressions.Expression> examinationRoomLayoutExp, System.Linq.Expressions.Expression> classroomExp) //{ // var inschool = InSchoolSettingRepository.Entities.Where(x => x.IsSelected == true).Select(x => x.InSchoolStatusID); // var q = (from c in ClassroomDAL.Value.GetClassroomQueryable(classroomExp) // join cid in // ( // (from ers in ExaminationRoomSettingRepository.Entities // join nas in // ( // from ep in ExaminationPlanRepository.GetList(examinationPlanExp) // join erl in ExaminationRoomLayoutRepository.Entities on true equals true // where erl.EX_ExaminationPlan.ExaminationDate == ep.ExaminationDate // && erl.EX_ExaminationPlan.EndTime >= ep.StartTime && erl.EX_ExaminationPlan.StartTime <= ep.EndTime // select erl // ) on ers.ClassroomID equals nas.ClassroomID into dnas // from enas in dnas.DefaultIfEmpty() // where enas.ClassroomID == null // select ers.ClassroomID // ).Concat( // from erl in ExaminationRoomLayoutRepository.GetList(examinationRoomLayoutExp) // select erl.ClassroomID) // ) on c.ClassroomID equals cid // select c); // return q; //} } }