using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Linq.Expressions; using EMIS.DataLogic.Repositories; using EMIS.Entities; using EMIS.ViewModel.GraduationManage.GraduationSetting; namespace EMIS.DataLogic.GraduationManage.GraduationSetting { public class GraduationSchoolYearDAL { public GraduateSchoolyearRepository GraduateSchoolyearRepository { get; set; } public SchoolyearRepository SchoolyearRepository { get; set; } public DictionaryItemRepository DictionaryItemRepository { get; set; } /// /// 查询对应的毕业学期信息View /// /// /// /// public IQueryable GetGraduationSchoolYearViewQueryable(Expression> exp, Guid? GraduatingSemesterID) { var query = from grsy in GraduateSchoolyearRepository.GetList(exp) join sy in SchoolyearRepository.Entities on grsy.SchoolyearID equals sy.SchoolyearID select new GraduationSchoolYearView { GraduationSchoolYearSettingID = grsy.GraduateSchoolyearID, GraduatingSemesterID = grsy.SchoolyearID, GraduatingSemesterCode = sy.Code, Years = sy.Years, SchoolcodeID = sy.SchoolcodeID, WeeksNum = sy.WeeksNum, WeekDays = sy.WeekDays, GraduateDate = grsy.GraduateDate, IsCurrent = sy.IsCurrent, IsCurrentName = sy.IsCurrent ? "是" : "否", IsEnable = grsy.SchoolyearID == GraduatingSemesterID ? true : false, IsEnableName = grsy.SchoolyearID == GraduatingSemesterID ? "是" : "否", GraduatingSemesterValue = sy.Value, RecordStatus = grsy.RecordStatus, CreateUserID = grsy.CreateUserID, CreateTime = grsy.CreateTime, ModifyUserID = grsy.ModifyUserID, ModifyTime = grsy.ModifyTime }; return query; } } }