コード例 #1
0
        /// <summary>
        /// Fills the session user.
        /// </summary>
        /// <param name="developer">The developer.</param>
        public static void FillSessionUser(DeveloperListItem developer)
        {
            if (developer != null)
            {
                SessionData.Instance.UserInfo = new UserInfo
                {
                    Developer = developer
                };

                SessionData.Instance.UserInfo.ImageUrl = SessionData.Instance.UserInfo.Developer.LoginID.RetrieveDeveloperImageName();
                RetrieveNameParts(SessionData.Instance.UserInfo);
            }
            else
            {
                SessionData.Instance.UserInfo = null;
            }

            FillDeveloperTimeZoneOffset(developer);
        }
コード例 #2
0
 /// <summary>
 /// Function to fill time zone offset.
 /// </summary>
 /// <param name="developer">Developer information</param>
 private static void FillDeveloperTimeZoneOffset(DeveloperListItem developer)
 {
     if (developer != null && developer.TimeZoneID.HasValue)
     {
         using (var lookupService = DependencyInjectionContainer.Instance.Container.Resolve<LookupService>())
         {
             var timeZone = lookupService.RetrieveTimeZoneById(developer.TimeZoneID.Value);
             developer.TimeZone = timeZone;
             developer.TimeZoneOffset = timeZone.Offset;
         }
     }
 }
コード例 #3
0
 /// <summary>
 /// Maps to Developer.
 /// </summary>
 /// <param name="developerListItem">The developer List fill item.</param>
 /// <returns>project information.</returns>
 private static Entity.Developer MapToDeveloper(DeveloperListItem developerListItem)
 {
     return new Entity.Developer()
     {
         DeveloperName = developerListItem.DeveloperName,
         DeveloperId = developerListItem.DeveloperID,
         Email = developerListItem.Email,
         RoleId = developerListItem.RoleID,
         LogOn = developerListItem.LoginID,
         DesignationId = developerListItem.DesignationID,
         ManagerId = developerListItem.ManagerID,
         IsInactive = developerListItem.InActive
     };
 }