UserInfoChangeDAL.cs 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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.TeacherManagement;
  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. Sex = a.Sex,
  30. TeacherType = a.TeacherType,
  31. IncumbencyState = a.IncumbencyState,
  32. CertificatesType = a.CertificatesType,
  33. CertificatesNum = a.CertificatesNum,
  34. Situation = a.Situation,
  35. LiteracyLevels = a.LiteracyLevels,
  36. DegreeState = a.DegreeState,
  37. LearnPosition = a.LearnPosition,
  38. Title = a.Title,
  39. WorkDate = a.WorkDate,
  40. ComeSchoolDate = a.ComeSchoolDate,
  41. TeachingDate = a.TeachingDate,
  42. PhotoUrl = a.PhotoUrl,
  43. Profile = a.Profile,
  44. UsedName = a.CF_StaffProfile.UsedName,
  45. Nation = a.CF_StaffProfile.Nation,
  46. Place = a.CF_StaffProfile.Place,
  47. EducationCode = a.CF_StaffProfile.EducationCode,
  48. Telephone = a.CF_StaffProfile.Telephone,
  49. OfficeTelephone = a.CF_StaffProfile.OfficeTelephone,
  50. Mobile = a.CF_StaffProfile.Mobile,
  51. Email = a.CF_StaffProfile.Email,
  52. QQ = a.CF_StaffProfile.QQ,
  53. Nationality = a.CF_StaffProfile.Nationality,
  54. HealthState = a.CF_StaffProfile.HealthState,
  55. HousePhone = a.CF_StaffProfile.HousePhone,
  56. Address = a.CF_StaffProfile.Address,
  57. Postcode = a.CF_StaffProfile.Postcode,
  58. HomeAddress = a.CF_StaffProfile.HomeAddress,
  59. NowAddress = a.CF_StaffProfile.NowAddress,
  60. Residence = a.CF_StaffProfile.Residence,
  61. Speciality = a.CF_StaffProfile.Speciality,
  62. WeChatNum = a.CF_StaffProfile.WeChatNum,
  63. Religion = a.CF_StaffProfile.Religion,
  64. CreateUserID = a.CreateUserID,
  65. CreateTime = a.CreateTime,
  66. Remarks = a.Remarks,
  67. CollegeNo = a.CF_College.No
  68. };
  69. return query;
  70. }
  71. }
  72. }