public override void ShowMessage(string MessageTitle, string Message, string CompleteMessage, bool isSageAsyncPostBack, SageMessageType MessageType)
    {

        string strCssClass = GetMessageCssClass(MessageType);
        int Cont = this.Page.Controls.Count;
        ControlCollection lstControls = Page.FindControl("form1").Controls;
        PlaceHolder phd = Page.FindControl("message") as PlaceHolder;
        if (phd != null)
        {
            foreach (Control c in phd.Controls)
            {
                if (c.GetType().FullName.ToLower() == "ASP.Controls_message_ascx".ToLower())
                {
                    SageUserControl tt = (SageUserControl)c;
                    tt.Modules_Message_ShowMessage(tt, MessageTitle, Message, CompleteMessage, isSageAsyncPostBack, MessageType, strCssClass);
                }
            }
        }
    }
Пример #2
0
        public override void ShowMessage(string MessageTitle,  string Message, string CompleteMessage, bool isSageAsyncPostBack, SageMessageType MessageType)
        {

            string strCssClass = GetMessageCsssClass(MessageType);

            int Cont = this.Page.Controls.Count;
            List<SageFrameStringKeyValue> lst = SageFrameLists.ModulePanes();
            for (int i = 0; i < lst.Count; i++)
            {
                string strName = lst[i].Key;
                PlaceHolder phd = this.Page.FindControl(strName) as PlaceHolder;
                if (phd != null)
                {
                    foreach (Control ctl in phd.Controls)
                    {
                        if (ctl.GetType().FullName.ToLower() == "ASP.modules_message_message_ascx".ToLower())
                        {
                            SageUserControl tt = (SageUserControl)ctl;
                            tt.Modules_Message_ShowMessage(tt, MessageTitle, Message, CompleteMessage, isSageAsyncPostBack, MessageType, strCssClass);
                        }
                    }
                }
            }         
        }
Пример #3
0
        /// <summary>
        /// Show Message In The Page
        /// </summary>
        /// <param name="MessageTitle"> Display Message Title</param>
        /// <param name="Message"> Display Message</param>
        /// <param name="CompleteMessage">Complete Message</param>
        /// <param name="isSageAsyncPostBack">Set True If Update Panel Post Back</param>
        /// <param name="MessageType">Message Type</param>
        public virtual void ShowMessage(string MessageTitle, string Message, string CompleteMessage, bool isSageAsyncPostBack, SageMessageType MessageType)
        {

        }
Пример #4
0
        /// <summary>
        /// Displays the message with provided message, title, complete message and message type.
        /// </summary>
        /// <param name="MessageTitle">Message tittle</param>
        /// <param name="Message">Message</param>
        /// <param name="CompleteMessage">Complete message</param>
        /// <param name="MessageType">Message type</param>
        protected void ShowMessage(string MessageTitle, string Message, string CompleteMessage, SageMessageType MessageType)
        {
            ScriptManager scp = (ScriptManager)this.Page.FindControl("ScriptManager1");
            if (scp != null)
            {
                bool isSageAsyncPostBack = false;
                if (scp.IsInAsyncPostBack)
                {
                    isSageAsyncPostBack = true;
                }

                if (this.Page == null)
                    return;

                Page SagePage = this.Page;
                if (SagePage == null)
                    return;

                PageBase mSagePage = SagePage as PageBase;
                if (mSagePage != null)
                    mSagePage.ShowMessage(MessageTitle, Message, CompleteMessage, isSageAsyncPostBack, MessageType);
            }
        }
Пример #5
0
 /// <summary>
 /// Get message css class by message type
 /// </summary>
 /// <param name="MessageType"> Messsage Type (Enum) SageMessageType</param>
 /// <returns>Css Class </returns>
 public string GetMessageCssClass(SageMessageType MessageType)
 {
     string cssClass = string.Empty;
     switch (MessageType)
     {
         case SageMessageType.Alert:
             cssClass = "sfMessage sfAlertmsg sfCurve";
             break;
         case SageMessageType.Error:
             cssClass = "sfMessage sfErrormsg sfCurve";
             break;
         case SageMessageType.Success:
             cssClass = "sfMessage sfSuccessmsg sfCurve";
             break;
     }
     return cssClass;
 }
        public override void ShowMessage(string MessageTitle, string Message, string CompleteMessage, bool isSageAsyncPostBack, SageMessageType MessageType)
        {
            string            strCssClass = GetMessageCssClass(MessageType);
            int               Cont        = this.Page.Controls.Count;
            ControlCollection lstControls = Page.FindControl("form1").Controls;
            PlaceHolder       phd         = Page.FindControl("message") as PlaceHolder;

            if (phd != null)
            {
                foreach (Control c in phd.Controls)
                {
                    if (c.GetType().FullName.ToLower() == "ASP.Controls_message_ascx".ToLower())
                    {
                        SageUserControl tt = (SageUserControl)c;
                        tt.Modules_Message_ShowMessage(tt, MessageTitle, Message, CompleteMessage, isSageAsyncPostBack, MessageType, strCssClass);
                    }
                }
            }
        }
Пример #7
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="ctl"></param>
        /// <param name="MessageTitle"></param>
        /// <param name="Message"></param>
        /// <param name="CompleteMessage"></param>
        /// <param name="isSageAsyncPostBack"></param>
        /// <param name="MessageType"></param>
        /// <param name="strCssClass"></param>
        public void Modules_Message_ShowMessage(Control ctl, string MessageTitle, string Message, string CompleteMessage, bool isSageAsyncPostBack, SageMessageType MessageType, string strCssClass)
        {
            Label lblUdpSageMesageTitle  = ctl.FindControl("lblUdpSageMesageTitle") as Label;
            Label lblUdpSageMesageCustom = ctl.FindControl("lblUdpSageMesageCustom") as Label;
            Label lblUdpSageMesageDetail = ctl.FindControl("lblUdpSageMesageDetail") as Label;

            System.Web.UI.HtmlControls.HtmlGenericControl divUdpSageMessage = ctl.FindControl("divUdpSageMessage") as System.Web.UI.HtmlControls.HtmlGenericControl;
            isSageAsyncPostBack = true;
            bool isudpSageMessageVisible = false;

            if (isSageAsyncPostBack)
            {
                if (lblUdpSageMesageTitle != null && lblUdpSageMesageCustom != null && lblUdpSageMesageDetail != null && divUdpSageMessage != null)
                {
                    lblUdpSageMesageTitle.Visible = false;
                    lblUdpSageMesageCustom.Text   = Message;
                    if (Message == string.Empty)
                    {
                        lblUdpSageMesageCustom.Visible = false;
                    }

                    lblUdpSageMesageDetail.Text = CompleteMessage;
                    if (CompleteMessage == string.Empty)
                    {
                        lblUdpSageMesageDetail.Visible = false;
                    }

                    divUdpSageMessage.Attributes.Add("class", strCssClass);
                    isudpSageMessageVisible = true;
                }
            }
            System.Web.UI.HtmlControls.HtmlGenericControl divUdpMessage = ctl.FindControl("divUdpMessage") as System.Web.UI.HtmlControls.HtmlGenericControl;
            if (divUdpMessage != null)
            {
                if (isudpSageMessageVisible == true)
                {
                    divUdpMessage.Style.Add("display", "block");
                }
            }
        }
Пример #8
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="MessageTitle"></param>
        /// <param name="Message"></param>
        /// <param name="CompleteMessage"></param>
        /// <param name="MessageType"></param>
        protected void ShowMessage(string MessageTitle, string Message, string CompleteMessage, SageMessageType MessageType)
        {
            ScriptManager scp = (ScriptManager)this.Page.FindControl("ScriptManager1");

            if (scp != null)
            {
                bool isSageAsyncPostBack = false;
                if (scp.IsInAsyncPostBack)
                {
                    isSageAsyncPostBack = true;
                }
                if (this.Page == null)
                {
                    return;
                }
                Page SagePage = this.Page;
                if (SagePage == null)
                {
                    return;
                }

                PageBase mSagePage = SagePage as PageBase;
                if (mSagePage != null)
                {
                    mSagePage.ShowMessage(MessageTitle, Message, CompleteMessage, isSageAsyncPostBack, MessageType);
                }
            }
        }
Пример #9
0
 public string GetMessageCsssClass(SageMessageType MessageType)
 {
     string cssClass = string.Empty;
     switch (MessageType)
     {
         case SageMessageType.Alert:
             cssClass = "cssClassAlert";
             break;
         case SageMessageType.Error:
             cssClass = "cssClassError";
             break;
         case SageMessageType.Success:
             cssClass = "cssClassSuccess";
             break;                    
     }
     return cssClass;
 }
        /// <summary>
        ///
        /// </summary>
        /// <param name="ctl"></param>
        /// <param name="MessageTitle"></param>
        /// <param name="Message"></param>
        /// <param name="CompleteMessage"></param>
        /// <param name="isSageAsyncPostBack"></param>
        /// <param name="MessageType"></param>
        /// <param name="strCssClass"></param>
        public void Modules_Message_ShowMessage(Control ctl, string MessageTitle, string Message, string CompleteMessage, bool isSageAsyncPostBack, SageMessageType MessageType, string strCssClass)
        {

            Label lblUdpSageMesageTitle = ctl.FindControl("lblUdpSageMesageTitle") as Label;
            Label lblUdpSageMesageCustom = ctl.FindControl("lblUdpSageMesageCustom") as Label;
            Label lblUdpSageMesageDetail = ctl.FindControl("lblUdpSageMesageDetail") as Label;
            System.Web.UI.HtmlControls.HtmlGenericControl divUdpSageMessage = ctl.FindControl("divUdpSageMessage") as System.Web.UI.HtmlControls.HtmlGenericControl;
            isSageAsyncPostBack = true;
            bool isudpSageMessageVisible = false;
            if (isSageAsyncPostBack)
            {
                if (lblUdpSageMesageTitle != null && lblUdpSageMesageCustom != null && lblUdpSageMesageDetail != null && divUdpSageMessage != null)
                {
                    lblUdpSageMesageTitle.Visible = false;
                    lblUdpSageMesageCustom.Text = Message;
                    if (Message == string.Empty)
                        lblUdpSageMesageCustom.Visible = false;

                    lblUdpSageMesageDetail.Text = CompleteMessage;
                    if (CompleteMessage == string.Empty)
                        lblUdpSageMesageDetail.Visible = false;

                    divUdpSageMessage.Attributes.Add("class", strCssClass);
                    isudpSageMessageVisible = true;
                }
            }
            System.Web.UI.HtmlControls.HtmlGenericControl divUdpMessage = ctl.FindControl("divUdpMessage") as System.Web.UI.HtmlControls.HtmlGenericControl;
            if (divUdpMessage != null)
            {
                if (isudpSageMessageVisible == true)
                {
                    divUdpMessage.Style.Add("display", "block");
                }

            }
        }
Пример #11
0
        public override void ShowMessage(string MessageTitle, string Message, string CompleteMessage, bool isSageAsyncPostBack, SageMessageType MessageType)
        {
            string strCssClass = GetMessageCsssClass(MessageType);

            int Cont = this.Page.Controls.Count;
            List <SageFrameStringKeyValue> lst = SageFrameLists.ModulePanes();

            for (int i = 0; i < lst.Count; i++)
            {
                string      strName = lst[i].Key;
                PlaceHolder phd     = this.Page.FindControl(strName) as PlaceHolder;
                if (phd != null)
                {
                    foreach (Control ctl in phd.Controls)
                    {
                        if (ctl.GetType().FullName.ToLower() == "ASP.modules_message_message_ascx".ToLower())
                        {
                            SageUserControl tt = (SageUserControl)ctl;
                            tt.Modules_Message_ShowMessage(tt, MessageTitle, Message, CompleteMessage, isSageAsyncPostBack, MessageType, strCssClass);
                        }
                    }
                }
            }
        }