Esempio n. 1
0
 /// <summary>
 /// ShowMessage
 /// </summary>
 /// <param name="message"></param>
 /// <param name="type"></param>
 public virtual void ShowMessage(string message, MessageType type)
 {
     if (this.Page is IMessageBar)
     {
         IMessageBar messageBar = (IMessageBar)this.Page;
         messageBar.ShowMessage(message, type);
     }
 }
Esempio n. 2
0
    /// <summary>
    /// ShowMessage
    /// </summary>
    /// <param name="message"></param>
    /// <param name="type"></param>
    public void ShowMessage(string message, MessageType type)
    {
        Control control = this.FindControl("MessageBar1");

        if (control == null && this.Master != null)
        {
            control = this.Master.FindControl("MessageBar1");
        }

        if (control != null)
        {
            IMessageBar messageBar = control as IMessageBar;

            if (messageBar != null)
            {
                messageBar.ShowMessage(message, type);
            }
        }
    }