示例#1
0
 //------------------------------------------------------------------------------------------ Static --
 public static UserSessionClient Get()
 {
     try
     {
         UserSessionClient rtn = null;
         eval("rtn = document.ASPdatabaseNET_Users_UserSessionClient;");
         return(rtn);
     }
     catch { }
     return(null);
 }
示例#2
0
        //----------------------------------------------------------------------------------------------------
        public static UserSessionClient GetUserSession_ForClient()
        {
            var userSessionInfo = GetUser();

            if (userSessionInfo == null)
            {
                return(null);
            }
            var rtn = new UserSessionClient()
            {
                UserInfo   = userSessionInfo.UserInfo,
                IsLoggedIn = userSessionInfo.IsLoggedIn,
                Impersonation_IsAllowed  = userSessionInfo.Impersonation_IsAllowed,
                Impersonation_IsOn       = userSessionInfo.Impersonation_IsOn,
                Impersonation_ActualUser = userSessionInfo.Impersonation_ActualUser,
                IsAdmin = userSessionInfo.UserInfo.IsAdmin
            };

            return(rtn);
        }
示例#3
0
        //------------------------------------------------------------------------------------------ Static --
        public static void Set(UserSessionClient userSessionClient)
        {
            var value = userSessionClient;

            eval("document.ASPdatabaseNET_Users_UserSessionClient = value;");
        }