123456789101112131415161718192021222324252627282930313233343536373839 |
- 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; }
- /// <summary>
- /// 查询重修控制信息View
- /// </summary>
- /// <param name="exp"></param>
- /// <returns></returns>
- public IQueryable<RetakeOpenControlView> GetRetakeOpenControlViewQuery(Expression<Func<ER_RetakeOpenControl, bool>> 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;
- }
- }
- }
|