1234567891011121314151617181920212223242526272829303132 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.ViewModel.TeacherManagement;
- 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<Func<CF_Staff, bool>> exp = x => true;
- if (userID.HasValue && userID != Guid.Empty)
- {
- exp = exp.And(x => x.UserID == userID);
- }
- var query = UserInfoChangeDAL.GetStaffViewQueryable(exp);
- return query.FirstOrDefault();
- }
- }
- }
|