12345678910111213141516171819202122232425262728293031 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Linq.Expressions;
- using EMIS.Entities;
- using EMIS.ViewModel.ExaminationManage;
- using EMIS.DataLogic.Repositories;
- namespace EMIS.DataLogic.ExaminationManage
- {
- public class TimeSegmentDAL
- {
- public TimeSegmentRepository TimeSegmentRepository { get; set; }
- public IQueryable<TimeSegmentView> GetTimeSegmentView(Expression<Func<EX_TimeSegment, bool>> exp)
- {
- var query = (from ts in TimeSegmentRepository.GetList(exp)
- select new TimeSegmentView
- {
- TimeSegmentID = ts.TimeSegmentID,
- IsForResit = ts.IsForResit == true,
- ExaminationDate = ts.ExaminationDate.Value,
- StartTime = ts.StartTime.Value,
- EndTime = ts.EndTime.Value
- });
- return query;
- }
- }
- }
|