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; } /// /// 读取评价表信息 /// /// /// public IQueryable GetEvaluationTableQueryable(Expression> 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(); } } }