1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Linq.Expressions;
- using EMIS.DataLogic.Repositories;
- using EMIS.ViewModel.DegreeManage.DegreeSetting;
- using EMIS.Entities;
- namespace EMIS.DataLogic.DegreeManage.DegreeSetting
- {
- public class DegreeOpenControlDAL
- {
- public DegreeOpenControlRepository DegreeOpenControlRepository { get; set; }
- public SchoolyearRepository SchoolyearRepository { get; set; }
- /// <summary>
- /// 查询对应的学位控制信息View
- /// </summary>
- /// <param name="exp"></param>
- /// <returns></returns>
- public IQueryable<DegreeOpenControlView> GetDegreeOpenControlViewQueryable(Expression<Func<ER_DegreeOpenControl, bool>> exp)
- {
- var query = from doc in DegreeOpenControlRepository.GetList(exp)
- join sy in SchoolyearRepository.Entities
- on doc.GraduatingSemesterID equals sy.SchoolyearID
- select new DegreeOpenControlView
- {
- DegreeOpenControlID = doc.DegreeOpenControlID,
- GraduatingSemesterID = doc.GraduatingSemesterID,
- GraduatingSemesterValue = sy.Value,
- GraduatingSemesterCode = sy.Code,
- DegreeBatchID = doc.DegreeBatchID,
- StartDate = doc.StartDate,
- EndDate = doc.EndDate,
- RecordStatus = doc.RecordStatus,
- CreateUserID = doc.CreateUserID,
- CreateTime = doc.CreateTime,
- ModifyUserID = doc.ModifyUserID,
- ModifyTime = doc.ModifyTime
- };
- return query;
- }
- }
- }
|