123456789101112131415161718192021222324252627282930313233343536373839 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.DataLogic.Repositories;
- using EMIS.ViewModel.PaymentManage;
- using System.Linq.Expressions;
- using EMIS.Entities;
- namespace EMIS.DataLogic.PaymentManage
- {
- public class WorktimeRateDAL
- {
- public CollegeRepository CollegeRepository { get; set; }
- public WorktimeRateRepository WorktimeRateRepository { get; set; }
- public IQueryable<WorktimeRateView> GetWorktimeRateViewQueryable(Expression<Func<TP_WorktimeRate, bool>> exp)
- {
- var sql = (from rate in WorktimeRateRepository.GetList(exp)
- join college in CollegeRepository.Entities on rate.CollegeID equals college.CollegeID into dcollege
- from college in dcollege.DefaultIfEmpty()
- select new WorktimeRateView
- {
- WorktimeRateID = rate.WorktimeRateID,
- CollegeID = rate.CollegeID,
- CollegeNo = college.No,
- CollegeName = college.Name,
- TeachingModeID = rate.TeachingModeID,
- TeachingMethodID = rate.TeachingMethodID,
- PaymentLevelID = rate.PaymentLevelID,
- StudentCountStart = rate.StudentCountStart,
- StudentCountEnd = rate.StudentCountEnd,
- WorktimeRate = rate.WorktimeRate
- });
- return sql;
- }
- }
- }
|