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; }
///
/// 查询重修预查考试性质信息View
///
///
public IQueryable 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;
}
}
}