using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EMIS.DataLogic.Repositories;
using System.Linq.Expressions;
using EMIS.Entities;
using EMIS.ViewModel.EvaluationManage;
namespace EMIS.DataLogic.Common.EvaluationManage
{
public class EvaluationTypeDAL
{
public EvaluationTypeRepository evaluationTypeRepository { get; set; }
public DictionaryItemRepository dictionaryItemRepository { get; set; }
///
/// 读取参评类型信息
///
///
///
public IQueryable GetEvaluationTypeQueryable(Expression> exp)
{
var query = from a in evaluationTypeRepository.GetList(exp)
select new EvaluationTypeView
{
TypeID = a.EvaluationTypeID,
//Code = a.Code,
Name = a.Name,
IsStudent = a.IsStudent.Value,
Student = (a.IsStudent.HasValue && a.IsStudent == true) ? "是" : "否",
IsDefault = a.IsStudent.Value,
Default = (a.IsStudent.HasValue && a.IsStudent == true) ? "是" : "否",
StartTime = a.StartTime,
EndTime = a.EndTime,
Number=a.Number,
Remark=a.Remark,
CreateUserID = a.CreateUserID,
CreateTime = a.CreateTime
};
return query;
}
}
}