12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- 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; }
- /// <summary>
- /// 查询对应的毕业学期信息View
- /// </summary>
- /// <param name="exp"></param>
- /// <param name="GraduatingSemesterID"></param>
- /// <returns></returns>
- public IQueryable<GraduationSchoolYearView> GetGraduationSchoolYearViewQueryable(Expression<Func<ER_GraduateSchoolyear, bool>> 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;
- }
- }
- }
|