using System; using System.Collections.Generic; using System.Linq; using System.Text; using EMIS.DataLogic.Repositories; using EMIS.ViewModel.UniversityManage.TeacherManage; using System.Linq.Expressions; using EMIS.Entities; namespace EMIS.DataLogic.SystemDAL { public class UserInfoChangeDAL { public StaffRepository staffRepository { get; set; } public IQueryable GetStaffViewQueryable(Expression> exp) { var query = from a in staffRepository.GetList(exp) select new StaffView { UserID = a.UserID, Name = a.Sys_User.Name, DepartmentID = a.DepartmentID, DepartmentName = a.CF_Department.Name, CampusID = a.CF_College.CampusID, CampusName = a.CF_College.CF_Campus.Name, CollegeID = a.CF_College.CollegeID, CollegeName = a.CF_College.Name, StaffCode = a.Sys_User.LoginID, BirthDate = a.BirthDate, SexID = a.SexID, TeacherTypeID = a.TeacherTypeID, IncumbencyState = a.IncumbencyState, CertificatesType = a.CertificatesType, CertificatesNum = a.CertificatesNum, SituationID = a.SituationID, LiteracyLevelID = a.LiteracyLevelID, LearnPositionID = a.LearnPositionID, TitleID = a.TitleID, WorkDate = a.WorkDate, ComeSchoolDate = a.ComeSchoolDate, PhotoUrl = a.PhotoUrl, Profile = a.Profile, UsedName = a.CF_StaffProfile.UsedName, NationID = a.NationID, Place = a.CF_StaffProfile.Place, Telephone = a.CF_StaffProfile.Telephone, OfficeTelephone = a.CF_StaffProfile.OfficeTelephone, Mobile = a.CF_StaffProfile.Mobile, Email = a.CF_StaffProfile.Email, QQ = a.CF_StaffProfile.QQ, Nationality = a.CF_StaffProfile.Nationality, HealthStateID = a.CF_StaffProfile.HealthStateID, HousePhone = a.CF_StaffProfile.HousePhone, Address = a.CF_StaffProfile.Address, ZIPCode = a.CF_StaffProfile.ZIPCode, HomeAddress = a.CF_StaffProfile.HomeAddress, NowAddress = a.CF_StaffProfile.NowAddress, Residence = a.CF_StaffProfile.Residence, Speciality = a.CF_StaffProfile.Speciality, WeChatNum = a.CF_StaffProfile.WeChatNum, ReligionID = a.CF_StaffProfile.ReligionID, CreateUserID = a.CreateUserID, CreateTime = a.CreateTime, Remark = a.Remark, CollegeNo = a.CF_College.No }; return query; } } }