12345678910111213141516171819202122232425262728293031323334353637 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.DataLogic.Repositories;
- using EMIS.ViewModel.RetakeManage;
- using EMIS.ViewModel;
- namespace EMIS.DataLogic.RetakeManage
- {
- public class RetakeParameterDAL
- {
- public DictionaryItemRepository DictionaryItemRepository { get; set; }
- public RetakeExamsCatagoryRepository RetakeExamsCatagoryRepository { get; set; }
- /// <summary>
- /// 查询重修预查考试性质信息View
- /// </summary>
- /// <returns></returns>
- public IQueryable<RetakeExamsCategoryView> GetRetakeExamsCategoryViewQuery()
- {
- var query = (from examsCategory in DictionaryItemRepository.GetList(x => x.DictionaryCode == typeof(CF_ExamsCategory).Name)
- join retakeCategory in RetakeExamsCatagoryRepository.Entities
- on examsCategory.Value equals retakeCategory.ExamsCategoryID
- into dretakeCatagory
- from eretakeCatagory in dretakeCatagory.DefaultIfEmpty()
- select new RetakeExamsCategoryView
- {
- RetakeExamsCatagoryID = eretakeCatagory.RetakeExamsCatagoryID,
- ExamsCategoryID = examsCategory.Value,
- IsSelected = eretakeCatagory.ExamsCategoryID != null
- });
- return query;
- }
- }
- }
|