using System; using System.Collections.Generic; using System.Linq; using System.Text; using EMIS.DataLogic.Repositories; using EMIS.ViewModel.RetakeManage; using EMIS.ViewModel; using EMIS.Entities; using System.Linq.Expressions; namespace EMIS.DataLogic.RetakeManage { public class RetakeOpenControlDAL { public RetakeOpenControlRepository RetakeOpenControlRepository { get; set; } public SchoolyearRepository SchoolyearRepository { get; set; } /// /// 查询重修控制信息View /// /// /// public IQueryable GetRetakeOpenControlViewQuery(Expression> exp) { var query = (from opencontrol in RetakeOpenControlRepository.GetList(exp) join schoolyear in SchoolyearRepository.Entities on opencontrol.SchoolyearID equals schoolyear.SchoolyearID select new RetakeOpenControlView { RetakeOpenControlID = opencontrol.RetakeOpenControlID, SchoolyearID = opencontrol.SchoolyearID, SchoolyearCode = schoolyear.Code, StartDate = opencontrol.StartDate, EndDate = opencontrol.EndDate }); return query; } } }