示例#1
0
        public static EmployeeUser SetEmployeeUser(EmployeeUser empUser)
        {
            EmployeeUser user = null;

            user = employeeCache.AddOrUpdate(empUser.EmployeeId, empUser, UpdateEmployeeUserFunc);
            return(user);
        }
示例#2
0
        public static EmployeeUser GetEmployeeUser(Guid userId)
        {
            EmployeeUser empUser = null;

            if (employeeCache.TryGetValue(userId, out empUser))
            {
                return(empUser);
            }
            return(null);
        }
示例#3
0
        public static EmployeeUser ToEmployeeUser(this IUserData userData)
        {
            EmployeeUser empUser = UserManager.GetEmployeeUser(userData.UserId);

            if (empUser == null)
            {
                EmployeeLogic empLogic = new EmployeeLogic();
                Employee      emp      = empLogic.GetEmployeeById(userData.UserId);
                empUser = new EmployeeUser(userData)
                {
                    EmployeeId      = userData.UserId,
                    Birthday        = emp.Birthday,
                    CellPhoneNumber = emp.CellPhoneNumber,
                    LinePhoneNumber = emp.LinePhoneNumber,
                    Email           = emp.Email,
                    Email2          = emp.Email2,
                    QQ      = emp.QQ,
                    ID      = emp.ID,
                    Address = emp.Address
                };
                UserManager.SetEmployeeUser(empUser);
            }
            return(empUser);
        }
示例#4
0
 public static EmployeeUser UpdateEmployeeUserFunc(Guid key, EmployeeUser empUser)
 {
     return(empUser);
 }