//private static Models.IErrorRepository errorRepository;

        public static void SetMessage(string a_Message, LayoutMessageType a_MessageType, Exception p_Error = null)
        {
            LayoutMessage l_LayoutMessage = new LayoutMessage(a_Message, a_MessageType);

            try
            {
                HttpContext.Current.Session.Add(LAYOUT_MESSAGE_SESSION_KEY, l_LayoutMessage);


                //errorRepository = new ErrorRepository();

                if (p_Error != null)
                {
                }
            }
            catch (Exception Error)
            {
            }
        }
        public static LayoutMessage GetMessage()
        {
            LayoutMessage l_LayoutMessage = new LayoutMessage();

            if (m_LayoutMessageOverride != null)
            {
                l_LayoutMessage = m_LayoutMessageOverride;
            }
            else
            {
                if (HttpContext.Current.Session[LAYOUT_MESSAGE_SESSION_KEY] != null)
                {
                    l_LayoutMessage = (LayoutMessage)HttpContext.Current.Session[LAYOUT_MESSAGE_SESSION_KEY];
                }
                else
                {
                    l_LayoutMessage = null;
                }
            }

            return(l_LayoutMessage);
        }