1234567891011121314151617181920212223242526272829303132333435363738 |
- using System;
- using System.Collections.Generic;
- using EMIS.DataLogic.Repositories;
- using System.Linq;
- using System.Text;
- using EMIS.ViewModel.ScoreManage;
- using EMIS.Entities;
- using System.Linq.Expressions;
- namespace EMIS.DataLogic.ScoreManage
- {
- public class LevelSettingDAL
- {
- public LevelSettingRepository levelSettingRepository { get; set; }
- public ExaminationSubjectRepository examinationSubjectRepository { get; set; }
- public IQueryable<LevelSettingView> GetLevelSettingViewQueryable(Expression<Func<ER_LevelSetting, bool>> exp)
- {
- var query = from a in levelSettingRepository.GetList(exp)
- join b in examinationSubjectRepository.Entities on a.ExaminationSubjectID equals b.ExaminationSubjectID
- select new LevelSettingView
- {
- LevelSettingID = a.LevelSettingID,
- ExaminationSubjectID = a.ExaminationSubjectID,
- ExaminationSubjectName = b.Name,
- LevelNo = a.LevelNum.Value,
- LevelName = a.LevelName,
- MaxScore = a.MaxScore.Value,
- MinScore = a.MinScore.Value,
- ScoreRange = a.MinScore.ToString() + " <=总成绩<= " + a.MaxScore.ToString(),
- Remark = a.Remark
- };
- return query;
- }
- }
- }
|