using System; using System.Collections.Generic; using System.Linq; using System.Text; using EMIS.ViewModel.SupervisionManage; using EMIS.DataLogic.Repositories; namespace EMIS.DataLogic.SupervisionManage { public class SupervisionUserDAL { public SupervisionUserRepository SupervisionUserRepository { get; set; } public StaffRepository StaffRepository { get; set; } public IQueryable GetProjectRecordTeacherView() { var query = from supuser in SupervisionUserRepository.Entities join sta in StaffRepository.Entities on supuser.UserID equals sta.UserID select new ProjectRecordTeacherView { SupervisionUserID = supuser.SupervisionUserID, TeacherID = supuser.UserID, UserID = sta.UserID, LoginID = sta.Sys_User.LoginID, Name = sta.Sys_User.Name, CollegeID = sta.CF_College.CollegeID, CollegeName = sta.CF_College.Name, Sex = sta.SexID, DepartmentID = sta.DepartmentID, DepartmentName = sta.CF_Department.Name, BirthDate = sta.BirthDate, TeacherType = sta.TeacherTypeID, IncumbencyState = sta.IncumbencyState, Title = sta.TitleID, }; return query; } } }