12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- 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 ExamProjectControlDAL
- {
- public ExaminationBatchProjectControlRepository ProjectControlRepository { get; set; }
- public ExaminationBatchProjectRepository BatchProjectRepository { get; set; }
- public DictionaryItemRepository DictionaryItemRepository { get; set; }
- public ExaminationTypeRepository TypeRepository { get; set; }
- public IQueryable<EMIS.ViewModel.ExamProjectControlView> GetList(Expression<Func<EX_ExaminationBatchProjectControl, bool>> expCampus)
- {
- var query = from a in ProjectControlRepository.GetList(expCampus)
- join b in BatchProjectRepository.Entities on a.ExaminationBatchProjectID equals b.ExaminationBatchProjectID
- select new EMIS.ViewModel.ExamProjectControlView
- {
- Schoolyear = b.EX_ExaminationBatch.CF_Schoolyear.Code,
- SchoolYearCode = b.EX_ExaminationBatch.CF_Schoolyear.SchoolyearID,
- ProjectName = b.EX_ExaminationProject.Name,
- StandardID = a.StandardID,
- SchoolyearNumID = a.SchoolyearID,
- ExaminationType = b.EX_ExaminationProject.EX_ExaminationType.Name,
- IsOnlinePay = a.IsOnlinePay,
- CollegeName = a.CF_College.Name,
- ExaminationBatchProject = a.EX_ExaminationBatchProject.EX_ExaminationBatch.Name,
- ExaminationProjectFee = a.EX_ExaminationProjectFee.Name,
- ExaminationBatchProjectID = a.ExaminationBatchProjectID,
- CollegeID = a.CollegeID,
- SchoolyearID = a.SchoolyearID,
- ExaminationBatchID = b.ExaminationBatchID,
- ExaminationProjectID = b.ExaminationProjectID,
- ExaminationProjectFeeID = a.ExaminationProjectFeeID,
- ExaminationBatchProjectControlID = a.ExaminationBatchProjectControlID,
- IsOnlinePayName = (a.IsOnlinePay == true ? "是" : "否"),
- ExaminationTypeID = b.EX_ExaminationProject.ExaminationTypeID,
- Name = b.EX_ExaminationProject.Name,
- };
- return query;
- }
- }
- }
|