예제 #1
0
        /// <summary>
        /// 创建服务
        /// </summary>
        public CalendarService()
        {
            UserCookie        cookie        = new UserCookie();
            UserCookieService cookieService = DataCenter.UserCookieService;

            if (cookieService.GetCookie("CALENDAR", ref cookie) > 0)
            {
                try
                {
                    m_calendars = JsonConvert.DeserializeObject <Dictionary <String, CalendarInfo> >(AESHelper.Decrypt(cookie.m_value));
                }
                catch (Exception ex)
                {
                }
                if (m_calendars == null)
                {
                    try
                    {
                        m_calendars = JsonConvert.DeserializeObject <Dictionary <String, CalendarInfo> >(cookie.m_value);
                    }
                    catch (Exception ex)
                    {
                    }
                }
            }
        }
예제 #2
0
        /// <summary>
        /// 创建服务
        /// </summary>
        public LevelService()
        {
            UserCookie        cookie        = new UserCookie();
            UserCookieService cookieService = DataCenter.UserCookieService;

            if (cookieService.GetCookie("LEVEL", ref cookie) > 0)
            {
                try
                {
                    m_levels = JsonConvert.DeserializeObject <List <LevelInfo> >(AESHelper.Decrypt(cookie.m_value));
                }
                catch (Exception ex)
                {
                }
                if (m_levels == null)
                {
                    try
                    {
                        m_levels = JsonConvert.DeserializeObject <List <LevelInfo> >(cookie.m_value);
                    }
                    catch (Exception ex)
                    {
                    }
                }
            }
        }
예제 #3
0
        /// <summary>
        /// 创建服务
        /// </summary>
        public ProjectService()
        {
            UserCookie        cookie        = new UserCookie();
            UserCookieService cookieService = DataCenter.UserCookieService;

            if (cookieService.GetCookie("PROJECT", ref cookie) > 0)
            {
                try
                {
                    m_projects = JsonConvert.DeserializeObject <List <ProjectInfo> >(AESHelper.Decrypt(cookie.m_value));
                }
                catch (Exception ex)
                {
                }
                if (m_projects == null)
                {
                    try
                    {
                        m_projects = JsonConvert.DeserializeObject <List <ProjectInfo> >(cookie.m_value);
                    }
                    catch (Exception ex)
                    {
                    }
                }
            }
        }
예제 #4
0
        /// <summary>
        /// 创建服务
        /// </summary>
        public BusinessCardService()
        {
            UserCookie        cookie        = new UserCookie();
            UserCookieService cookieService = DataCenter.UserCookieService;

            if (cookieService.GetCookie("BUSINESSCARD", ref cookie) > 0)
            {
                try
                {
                    m_businessCards = JsonConvert.DeserializeObject <List <BusinessCardInfo> >(AESHelper.Decrypt(cookie.m_value));
                }
                catch (Exception ex)
                {
                }
                if (m_businessCards == null)
                {
                    try
                    {
                        m_businessCards = JsonConvert.DeserializeObject <List <BusinessCardInfo> >(cookie.m_value);
                    }
                    catch (Exception ex)
                    {
                    }
                }
            }
        }
예제 #5
0
        /// <summary>
        /// 创建服务
        /// </summary>
        public DimensionService()
        {
            UserCookie        cookie        = new UserCookie();
            UserCookieService cookieService = DataCenter.UserCookieService;

            if (cookieService.GetCookie("DIMENSION", ref cookie) > 0)
            {
                try
                {
                    m_dimensions = JsonConvert.DeserializeObject <List <DimensionInfo> >(AESHelper.Decrypt(cookie.m_value));
                }
                catch (Exception ex)
                {
                }
                if (m_dimensions == null)
                {
                    try
                    {
                        m_dimensions = JsonConvert.DeserializeObject <List <DimensionInfo> >(cookie.m_value);
                    }
                    catch (Exception ex)
                    {
                    }
                }
            }
        }
예제 #6
0
        /// <summary>
        /// 创建服务
        /// </summary>
        public UserSecurityService()
        {
            UserCookie        cookie        = new UserCookie();
            UserCookieService cookieService = DataCenter.UserCookieService;

            if (cookieService.GetCookie("USERSECURITY", ref cookie) > 0)
            {
                try
                {
                    m_codes = JsonConvert.DeserializeObject <List <UserSecurity> >(cookie.m_value);
                }
                catch (Exception ex)
                {
                }
                if (m_codes == null)
                {
                    try
                    {
                        m_codes = JsonConvert.DeserializeObject <List <UserSecurity> >(cookie.m_value);
                    }
                    catch (Exception ex)
                    {
                    }
                }
            }
        }
예제 #7
0
 /// <summary>
 /// 创建服务
 /// </summary>
 public BSStockService()
 {
     UserCookie cookie = new UserCookie();
     UserCookieService cookieService = DataCenter.UserCookieService;
     if (cookieService.GetCookie("BSSTOCK", ref cookie) > 0)
     {
         try
         {
             m_bsStocks = JsonConvert.DeserializeObject<List<BSStockInfo>>(AESHelper.Decrypt(cookie.m_value));
         }
         catch (Exception ex)
         {
         }
         if (m_bsStocks == null)
         {
             try
             {
                 m_bsStocks = JsonConvert.DeserializeObject<List<BSStockInfo>>(cookie.m_value);
             }
             catch (Exception ex)
             {
             }
         }
     }
 }
예제 #8
0
        /// <summary>
        /// 创建服务
        /// </summary>
        public FollowService()
        {
            UserCookie        cookie        = new UserCookie();
            UserCookieService cookieService = DataCenter.UserCookieService;

            if (cookieService.GetCookie("FOLLOW", ref cookie) > 0)
            {
                try
                {
                    m_follows = JsonConvert.DeserializeObject <List <FollowInfo> >(AESHelper.Decrypt(cookie.m_value));
                }
                catch (Exception ex)
                {
                }
                if (m_follows == null)
                {
                    try
                    {
                        m_follows = JsonConvert.DeserializeObject <List <FollowInfo> >(cookie.m_value);
                    }
                    catch (Exception ex)
                    {
                    }
                }
            }
        }
예제 #9
0
        /// <summary>
        /// 获取COOKIE
        /// </summary>
        /// <param name="var">变量</param>
        /// <returns>状态</returns>
        private double GETCOOKIE(CVariable var)
        {
            String            cookieName    = m_indicator.GetText(var.m_parameters[1]);
            UserCookieService cookieService = DataCenter.UserCookieService;
            UserCookie        cookie        = new UserCookie();

            if (cookieService.GetCookie(cookieName, ref cookie) > 0)
            {
                CVariable newVar = new CVariable(m_indicator);
                newVar.m_expression = "'" + cookie.m_value + "'";
                m_indicator.SetVariable(var.m_parameters[0], newVar);
                return(1);
            }
            return(0);
        }