12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.ViewModel.ExaminationManage;
- using System.Linq.Expressions;
- using EMIS.Entities;
- using EMIS.DataLogic.Common.Students;
- using EMIS.DataLogic.Repositories;
- using EMIS.Utility.FormValidate;
- using Bowin.Common.Linq;
- namespace EMIS.DataLogic.ExaminationManage
- {
- public class StudentExaminationCourseDAL
- {
- public ExaminationPlanRepository ExaminationPlanRepository { get; set; }
- public ExaminationRoomLayoutRepository ExaminationRoomLayoutRepository { get; set; }
- public EducationMissionClassRepository EducationMissionClassRepository { get; set; }
- public EducationSchedulingClassRepository educationSchedulingClassRepository { get; set; }
- public EducationSchedulingRepository educationSchedulingRepository { get; set; }
- public ExaminationRoomStudentRepository examinationRoomStudentRepository { get; set; }
- public EducationSchedulingWeekNumRepository educationSchedulingWeekNumRepository { get; set; }
- public EducationMissionRepository EducationMissionRepository { get; set; }
- public StudentsDAL StudentsDAL { get; set; }
- public IQueryable<StudentExaminationCourseView> GetExaminationPlanView(Expression<Func<EX_ExaminationPlan, bool>> examinationPlanExpression,
- Guid userID)
- {
- //examinationPlanExpression = examinationPlanExpression.And(x =)
- //var inschool = StudentsDAL.InSchoolSettingRepository.Entities.Where(x => x.IsSelected == true).Select(x => x.InSchoolStatusID).ToList();
- var q = from ersr in examinationRoomStudentRepository.GetList(x => x.UserID == userID)
- join erlr in ExaminationRoomLayoutRepository.Entities
- on ersr.ExaminationRoomLayoutID equals erlr.ExaminationRoomLayoutID
- join ep in ExaminationPlanRepository.GetList(examinationPlanExpression)
- on erlr.ExaminationPlanID equals ep.ExaminationPlanID
- select new StudentExaminationCourseView
- {
- ExaminationPlanID = ep.ExaminationPlanID,
- SchoolyearID = ep.SchoolyearID,
- SchoolyearCode = ep.CF_Schoolyear.Code,
- CollegeID = ep.CollegeID,
- CollegeName = ep.CF_College.Name,
- CoursematerialID = ep.CoursematerialID,
- CoursematerialName = ep.EM_Coursematerial.CourseName,
- ExaminationModeID = ep.ExaminationModeID,
- ExaminationStyleID = ep.ExaminationStyleID,
- ClassroomNames = erlr.CF_Classroom.Name,
- ExamsCategoryID = ep.ExamsCategoryID,
- EducationMissionID = ep.EducationMissionID,
- ExaminationDate = ep.ExaminationDate,
- StartTime = ep.StartTime,
- EndTime = ep.EndTime,
- RecordStatus = ep.RecordStatus,
- CreateUserID = ep.CreateUserID,
- CreateTime = ep.CreateTime,
- ModifyUserID = ep.ModifyUserID,
- ModifyTime = ep.ModifyTime
- };
- return q;
- }
- }
- }
|