UserInfoChangeDAL.cs 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using EMIS.DataLogic.Repositories;
  6. using EMIS.ViewModel.UniversityManage.TeacherManage;
  7. using System.Linq.Expressions;
  8. using EMIS.Entities;
  9. namespace EMIS.DataLogic.SystemDAL
  10. {
  11. public class UserInfoChangeDAL
  12. {
  13. public StaffRepository staffRepository { get; set; }
  14. public IQueryable<StaffView> GetStaffViewQueryable(Expression<Func<CF_Staff, bool>> exp)
  15. {
  16. var query = from a in staffRepository.GetList(exp)
  17. select new StaffView
  18. {
  19. UserID = a.UserID,
  20. Name = a.Sys_User.Name,
  21. DepartmentID = a.DepartmentID,
  22. DepartmentName = a.CF_Department.Name,
  23. CampusID = a.CF_College.CampusID,
  24. CampusName = a.CF_College.CF_Campus.Name,
  25. CollegeID = a.CF_College.CollegeID,
  26. CollegeName = a.CF_College.Name,
  27. StaffCode = a.Sys_User.LoginID,
  28. BirthDate = a.BirthDate,
  29. SexID = a.SexID,
  30. TeacherTypeID = a.TeacherTypeID,
  31. IncumbencyState = a.IncumbencyState,
  32. CertificatesType = a.CertificatesType,
  33. CertificatesNum = a.CertificatesNum,
  34. SituationID = a.SituationID,
  35. LiteracyLevelID = a.LiteracyLevelID,
  36. LearnPositionID = a.LearnPositionID,
  37. TitleID = a.TitleID,
  38. WorkDate = a.WorkDate,
  39. ComeSchoolDate = a.ComeSchoolDate,
  40. PhotoUrl = a.PhotoUrl,
  41. Profile = a.Profile,
  42. UsedName = a.CF_StaffProfile.UsedName,
  43. NationID = a.NationID,
  44. Place = a.CF_StaffProfile.Place,
  45. Telephone = a.CF_StaffProfile.Telephone,
  46. OfficeTelephone = a.CF_StaffProfile.OfficeTelephone,
  47. Mobile = a.CF_StaffProfile.Mobile,
  48. Email = a.CF_StaffProfile.Email,
  49. QQ = a.CF_StaffProfile.QQ,
  50. Nationality = a.CF_StaffProfile.Nationality,
  51. HealthStateID = a.CF_StaffProfile.HealthStateID,
  52. HousePhone = a.CF_StaffProfile.HousePhone,
  53. Address = a.CF_StaffProfile.Address,
  54. ZIPCode = a.CF_StaffProfile.ZIPCode,
  55. HomeAddress = a.CF_StaffProfile.HomeAddress,
  56. NowAddress = a.CF_StaffProfile.NowAddress,
  57. Residence = a.CF_StaffProfile.Residence,
  58. Speciality = a.CF_StaffProfile.Speciality,
  59. WeChatNum = a.CF_StaffProfile.WeChatNum,
  60. ReligionID = a.CF_StaffProfile.ReligionID,
  61. CreateUserID = a.CreateUserID,
  62. CreateTime = a.CreateTime,
  63. Remark = a.Remark,
  64. CollegeNo = a.CF_College.No
  65. };
  66. return query;
  67. }
  68. }
  69. }