12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.DataLogic.Repositories;
- using System.Linq.Expressions;
- using EMIS.Entities;
- namespace EMIS.DataLogic.ExamManage
- {
- public class ExamBatchProjectDAL
- {
- public ExaminationBatchProjectRepository BatchProjectRepository { get; set; }
- public ExaminationBatchRepository BatchRepository { get; set; }
- public IQueryable<EMIS.ViewModel.ExamBatchProjectView> GetBatchProjectList(Expression<Func<EX_ExaminationBatchProject, bool>> expCampus)
- {
- var query = from b in BatchProjectRepository.GetList(expCampus)
- join a in BatchRepository.Entities on b.ExaminationBatchID equals a.ExaminationBatchID
- select new EMIS.ViewModel.ExamBatchProjectView
- {
- Schoolyear = a.CF_Schoolyear.Code,
- SchoolYearCode = a.CF_Schoolyear.SchoolyearID,
- BatchName = b.EX_ExaminationBatch.Name,
- EndDate = b.EndDate,
- ExaminationBatchID = a.ExaminationBatchID,
- Name = b.EX_ExaminationProject.Name,
- Remark = b.Remark,
- SchoolyearID = a.SchoolyearID,
- StartDate = b.StartDate,
- ExaminationProjectID = b.ExaminationProjectID,
- MaxRegistCount = b.MaxRegistCount,
- SimulateTime = b.SimulateTime,
- TakeCourseTime = b.TakeCourseTime,
- Training = b.Training,
- ExaminationType = b.EX_ExaminationProject.EX_ExaminationType.Name,
- ExaminationBatchProjectID = b.ExaminationBatchProjectID,
- ExaminationTypeID = b.EX_ExaminationProject.ExaminationTypeID,
- RecordStatus = b.RecordStatus
- };
- return query;
- }
- }
- }
|