1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Linq.Expressions;
- using System.Text;
- using EMIS.Entities;
- using EMIS.ViewModel.EvaluationManage.EvaluationSetting;
- using EMIS.DataLogic.Repositories;
- namespace EMIS.DataLogic.EvaluationManage.EvaluationSetting
- {
- public class EvaluationControlDAL
- {
- public EvaluationControlRepository EvaluationControlRepository { get; set; }
- public SchoolyearRepository SchoolyearRepository { get; set; }
- public ControlItemRepository ControlItemRepository { get; set; }
- /// <summary>
- /// 查询对应的评价控制信息EvaluationControlView
- /// </summary>
- /// <param name="exp"></param>
- /// <returns></returns>
- public IQueryable<EvaluationControlView> GetEvaluationControlViewQueryable(Expression<Func<EM_EvaluationControl, bool>> exp)
- {
- var query = from evct in EvaluationControlRepository.GetList(exp)
- join sy in SchoolyearRepository.Entities
- on evct.SchoolyearID equals sy.SchoolyearID
- select new EvaluationControlView
- {
- EvaluationControlID = evct.EvaluationControlID,
- SchoolyearID = evct.SchoolyearID,
- SchoolyearValue = sy.Value,
- SchoolyearCode = sy.Code,
- IsSelectCourseLock = evct.IsSelectCourseLock.Value,
- IsExaminationApplyLock = evct.IsExaminationApplyLock.Value,
- IsCourseScoreLock = evct.IsCourseScoreLock.Value,
- IsLevelScoreLock = evct.IsLevelScoreLock.Value,
- NoNumber = evct.NoNumber ?? 0,
- RecordStatus = evct.RecordStatus,
- CreateUserID = evct.CreateUserID,
- CreateTime = evct.CreateTime,
- ModifyUserID = evct.ModifyUserID,
- ModifyTime = evct.ModifyTime
- };
- return query;
- }
- }
- }
|