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; }
///
/// 查询对应的评价控制信息EvaluationControlView
///
///
///
public IQueryable GetEvaluationControlViewQueryable(Expression> 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;
}
}
}