123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.DataLogic.Repositories;
- using EMIS.ViewModel.MinorGraduation.MinorGraduationSetting;
- using System.Linq.Expressions;
- using EMIS.Entities;
- namespace EMIS.DataLogic.MinorGraduation.MinorGraduationSetting
- {
- public class MinorGraduationConditionPackageDAL
- {
- public MinorGraduationConditionPackageRepository minorGraduationConditionPackageRepository { get; set; }
- public MinorGraduationConditionRepository minorGraduationConditionRepository { get; set; }
- public MinorGraduationApplyRepository minorGraduationApplyRepository { get; set; }
- /// <summary>
- /// 查询辅修毕业公式信息
- /// </summary>
- /// <param name="exp"></param>
- /// <returns></returns>
- public IQueryable<MinorGraduationConditionPackageView> GetMinorGraduationConditionPackageQueryable(Expression<Func<ER_MinorGraduationConditionPackage, bool>> exp)
- {
- var query = from gp in minorGraduationConditionPackageRepository.GetList(exp)
- select new MinorGraduationConditionPackageView
- {
- MinorGraduationConditionPackageID = gp.MinorGraduationConditionPackageID,
- Title = gp.Title,
- StudentTypeID = gp.StudentType,
- IsDefault = gp.IsDefault.Value,
- IsEnable = gp.RecordStatus.Value > 0 ? true : false,
- RecordStatus = gp.RecordStatus,
- CreateUserID = gp.CreateUserID,
- CreateTime = gp.CreateTime,
- ModifyUserID = gp.ModifyUserID,
- ModifyTime = gp.ModifyTime
- };
- return query;
- }
- /// <summary>
- /// 查询毕业公式中对应的毕业条件信息View(MinorGraduationConditionView)
- /// </summary>
- /// <param name="exp"></param>
- /// <returns></returns>
- public IQueryable<MinorGraduationConditionView> MinorGraduationConditionQueryable(Expression<Func<ER_MinorGraduationConditionPackage, bool>> exp)
- {
- var query = from gp in minorGraduationConditionPackageRepository.GetList(exp)
- from gc in gp.ER_MinorGraduationCondition
- select new MinorGraduationConditionView
- {
- MinorGraduationConditionID = gc.MinorGraduationConditionID,
- Title = gc.Title,
- MethodFullName = gc.MethodFullName,
- };
- return query;
- }
- }
- }
|