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; } /// /// 查询对应的学位控制信息View /// /// /// public IQueryable GetDegreeOpenControlViewQueryable(Expression> 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; } } }