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; }
///
/// 读取评价指标信息
///
///
///
public IQueryable GetEvaluationTargetQueryable(Expression> 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;
}
}
}