123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.DataLogic.Repositories;
- using EMIS.ViewModel.MinorManage.MinorSetting;
- using System.Linq.Expressions;
- using EMIS.Entities;
- using EMIS.ViewModel.ScoreManage;
- namespace EMIS.DataLogic.MinorManage.MinorSetting
- {
- public class MinorConditionDAL
- {
- public MinorConditionRepository minorConditionRepository { get; set; }
- public FinallyScoreRepository finallyScoreRepository { get; set; }
- public IQueryable<MinorConditionView> GetMinorConditionViewQueryable(Expression<Func<ER_MinorCondition, bool>> exp)
- {
- var query = from mcr in minorConditionRepository.GetList(exp)
- select new MinorConditionView
- {
- MinorConditionID = mcr.MinorConditionID,
- Title = mcr.Title,
- MethodFullName = mcr.MethodFullName,
- RecordStatus = mcr.RecordStatus,
- IsEnable = mcr.RecordStatus == 1 ? true : false,
- CreateUserID = mcr.CreateUserID,
- CreateTime = mcr.CreateTime,
- ModifyUserID = mcr.ModifyUserID,
- ModifyTime = mcr.ModifyTime
- };
- return query;
- }
- public IQueryable<StudentScoreView> GetAllScore(Guid userID)
- {
- var query = from a in finallyScoreRepository.GetList(x => x.UserID == userID)
- select new StudentScoreView
- {
- UserID = a.UserID,
- TotalScore = a.TotalScore,
- ExamsCategoryID = a.ExamsCategoryID
- };
- return query;
- }
- }
- }
|