Example #1
0
        /// <summary>
        /// getContext
        /// </summary>
        /// <param name="p_page"> Web Page</param>
        /// <returns>Context</returns>
        public static CUIContext getContext(System.Web.UI.Page p_page)
        {
            CUIContext l_context = (CUIContext)p_page.Session[CUIContext.TypeName];

            if (l_context == null && p_page.Parent != null)
            {
                l_context = (CUIContext)((Page)p_page.Parent).Session[CUIContext.TypeName];
            }
            if (l_context == null)
            {
                l_context = new CUIContext();
                setContext(p_page, l_context);
            }
            return(l_context);
        }
Example #2
0
 /// <summary>
 /// setContext 把Context放置Session & Application
 /// </summary>
 /// <param name="p_page">Web Page</param>
 /// <param name="p_context">Context</param>
 public static void setContext(System.Web.UI.Page p_page, CUIContext p_context)
 {
     p_page.Session.Add(CUIContext.TypeName, p_context);
 }
Example #3
0
 /// <summary>
 /// setContext 把Context放置Session & Application
 /// </summary>
 /// <param name="p_control"> Web Control</param>
 /// <param name="p_context"> Context</param>
 public static void setContext(System.Web.UI.UserControl p_control, CUIContext p_context)
 {
     setContext(p_control.Page, p_context);
 }