12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- 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 EvaluationTargetDAL
- {
- public EvaluationTargetRepository evaluationTargetRepository { get; set; }
- public EvaluationNormRepository evaluationNormRepository { get; set; }
- public EvaluationTableRepository evaluationTableRepository { get; set; }
- public EvaluationProjectRepository evaluationProjectRepository { get; set; }
- public EvaluationEnterRepository evaluationEnterRepository { get; set; }
- /// <summary>
- /// 读取评价指标信息
- /// </summary>
- /// <param name="exp"></param>
- /// <returns></returns>
- public IQueryable<EvaluationTargetView> GetEvaluationTargetQueryable(Expression<Func<EM_EvaluationTarget, bool>> exp)
- {
- var query = from a in evaluationTargetRepository.GetList(exp)
- join b in evaluationNormRepository.Entities on a.EvaluationNormID equals b.EvaluationNormID
- join c in evaluationTableRepository.Entities on a.EvaluationTableID equals c.EvaluationTableID
- select new EvaluationTargetView
- {
- TargetID = a.EvaluationTargetID,
- Code = a.Code,
- Name = a.Name,
- OrderID = a.OrderNo,
- Weight = a.Weight,
- NormID = a.EvaluationNormID,
- NormName = b.Name,
- TableID = a.EvaluationTableID,
- TableCode = c.Code,
- TableName = c.Name,
- Remark = a.Remark,
- CreateUserID = a.CreateUserID,
- CreateTime = a.CreateTime
- };
- return query;
- }
- }
- }
|