using System; using System.Collections.Generic; using System.Linq; using System.Text; using EMIS.ViewModel.UniversityManage.TeacherManage; using Bowin.Common.Linq; using EMIS.DataLogic.SystemDAL; using System.Linq.Expressions; using EMIS.Entities; namespace EMIS.CommonLogic.SystemServices { public class UserInfoChangeServices: BaseServices, IUserInfoChangeServices { public UserInfoChangeDAL UserInfoChangeDAL { get; set; } public StaffView GetStaffView(Guid? userID) { var curUser = EMIS.Utility.FormValidate.CustomPrincipal.Current; userID = curUser.UserID; Expression> exp = x => true; if (userID.HasValue && userID != Guid.Empty) { exp = exp.And(x => x.UserID == userID); } var query = UserInfoChangeDAL.GetStaffViewQueryable(exp); return query.FirstOrDefault(); } } }