1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- 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; }
- /// <summary>
- /// 读取参评类型信息
- /// </summary>
- /// <param name="exp"></param>
- /// <returns></returns>
- public IQueryable<EvaluationTypeView> GetEvaluationTypeQueryable(Expression<Func<EM_EvaluationType, bool>> 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;
- }
- }
- }
|