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 GetMinorConditionViewQueryable(Expression> 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 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; } } }