123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- 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;
- using EMIS.ViewModel;
- namespace EMIS.DataLogic.Common.EvaluationManage
- {
- public class EvaluationTableDAL
- {
- public EvaluationTableRepository evaluationTableRepository { get; set; }
- public DictionaryItemRepository dictionaryItemRepository { get; set; }
- public EvaluationTypeRepository evaluationTypeRepository { get; set; }
- /// <summary>
- /// 读取评价表信息
- /// </summary>
- /// <param name="exp"></param>
- /// <returns></returns>
- public IQueryable<EvaluationTableView> GetEvaluationTableQueryable(Expression<Func<EM_EvaluationTable, bool>> exp)
- {
- var query = from a in evaluationTableRepository.GetList(exp)
- join c in evaluationTypeRepository.Entities on a.EvaluationTypeID equals c.EvaluationTypeID
- select new EvaluationTableView
- {
- TableID = a.EvaluationTableID,
- Code = a.Code,
- Name = a.Name,
- EvaluationType = c.Name,
- Weight = a.Weight,
- Remark = a.Remark,
- EvaluationIntTypeID = a.EvaluationIntTypeID,
- EvaluationIntTypeName = a.EM_EvaluationIntType.Name,
- CreateUserID = a.CreateUserID,
- CreateTime = a.CreateTime,
- IsEnabled = a.IsEnabled == true ? (int)CF_YesOrNoStatus.Yes : (int)CF_YesOrNoStatus.No,
- IsEnabledName = a.IsEnabled == true ? "是" : "否"//是否启用
- };
- return query.Distinct();
- }
- }
- }
|