SupervisionUserDAL.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using EMIS.ViewModel.SupervisionManage;
  6. using EMIS.DataLogic.Repositories;
  7. namespace EMIS.DataLogic.SupervisionManage
  8. {
  9. public class SupervisionUserDAL
  10. {
  11. public SupervisionUserRepository SupervisionUserRepository { get; set; }
  12. public StaffRepository StaffRepository { get; set; }
  13. public IQueryable<ProjectRecordTeacherView> GetProjectRecordTeacherView()
  14. {
  15. var query = from supuser in SupervisionUserRepository.Entities
  16. join sta in StaffRepository.Entities
  17. on supuser.UserID equals sta.UserID
  18. select new ProjectRecordTeacherView
  19. {
  20. SupervisionUserID = supuser.SupervisionUserID,
  21. TeacherID = supuser.UserID,
  22. UserID = sta.UserID,
  23. LoginID = sta.Sys_User.LoginID,
  24. Name = sta.Sys_User.Name,
  25. CollegeID = sta.CF_College.CollegeID,
  26. CollegeName = sta.CF_College.Name,
  27. Sex = sta.SexID,
  28. DepartmentID = sta.DepartmentID,
  29. DepartmentName = sta.CF_Department.Name,
  30. BirthDate = sta.BirthDate,
  31. TeacherType = sta.TeacherTypeID,
  32. IncumbencyState = sta.IncumbencyState,
  33. Title = sta.TitleID,
  34. };
  35. return query;
  36. }
  37. }
  38. }