private void SetNotificationBox( string heading, string bodyText, NotificationBoxType boxType )
        {
            nbRssItem.Heading = heading;
            nbRssItem.Text = bodyText;
            nbRssItem.NotificationBoxType = boxType;

            nbRssItem.Visible = !( String.IsNullOrWhiteSpace( heading ) || String.IsNullOrWhiteSpace( bodyText ) );
        }
示例#2
0
        /// <summary>
        /// Shows the message.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <param name="title">The title.</param>
        /// <param name="text">The text.</param>
        private void ShowMessage( NotificationBoxType type, string title, string text )
        {
            if ( !string.IsNullOrWhiteSpace( text ) )
            {
                NotificationBox nb = nbMessage;
                switch ( hfCurrentPage.Value.AsInteger() )
                {
                    case 1: nb = nbSelectionMessage; break;
                    case 2: nb = nbSelectionMessage; break;
                    case 3: nb = nbConfirmationMessage; break;
                    case 4: nb = nbSuccessMessage; break;
                }

                nb.Text = text;
                nb.Title = string.IsNullOrWhiteSpace( title ) ? "" : string.Format( "<p>{0}</p>", title );
                nb.NotificationBoxType = type;
                nb.Visible = true;
            }
        }
示例#3
0
 /// <summary>
 /// Shows the message.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <param name="title">The title.</param>
 /// <param name="text">The text.</param>
 private void ShowMessage( NotificationBoxType type, string title, string text )
 {
     if ( !string.IsNullOrWhiteSpace( text ) )
     {
         nbMessage.Text = text;
         nbMessage.Title = title;
         nbMessage.NotificationBoxType = type;
         nbMessage.Visible = true;
     }
 }
示例#4
0
        private void ShowMessage( NotificationBoxType type, string title, string message, bool hideForm = true )
        {
            nbMessage.NotificationBoxType = type;
            nbMessage.Title = title;
            nbMessage.Text = message;
            nbMessage.Visible = true;
            nbMessage.Dismissable = false;

            if ( hideForm )
            {
                pnlForm.Visible = false;
            }
        }
示例#5
0
 /// <summary>
 /// Displays the notification.
 /// </summary>
 /// <param name="notificationBox">The notification box.</param>
 /// <param name="message">The message.</param>
 /// <param name="notificationBoxType">Type of the notification box.</param>
 protected void DisplayNotification(NotificationBox notificationBox, string message, NotificationBoxType notificationBoxType)
 {
     notificationBox.Text = message;
     notificationBox.NotificationBoxType = notificationBoxType;
     notificationBox.Visible             = true;
 }
        /// <summary>
        /// Shows the result.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <param name="communication">The communication.</param>
        private void ShowResult( string message, Rock.Model.Communication communication, NotificationBoxType notificationType )
        {
            ShowStatus( communication );

            pnlDetails.Visible = false;

            nbResult.Text = message;
            nbResult.NotificationBoxType = notificationType;

            if ( CurrentPageReference.Parameters.ContainsKey( "CommunicationId" ) )
            {
                CurrentPageReference.Parameters["CommunicationId"] = communication.Id.ToString();
            }
            else
            {
                CurrentPageReference.Parameters.Add( "CommunicationId", communication.Id.ToString() );
            }
            hlViewCommunication.NavigateUrl = CurrentPageReference.BuildUrl();

            pnlResult.Visible = true;
        }
示例#7
0
 /// <summary>
 /// Displays the result of an attempt to send a SMS.
 /// </summary>
 /// <param name="type">The NotificationBoxType.</param>
 /// <param name="message">The message to display.</param>
 private void DisplayResult(NotificationBoxType type, string message)
 {
     nbResult.NotificationBoxType = type;
     nbResult.Text    = message;
     nbResult.Visible = true;
 }
示例#8
0
 /// <summary>
 /// Show a notification message for the block.
 /// </summary>
 /// <param name="notificationControl"></param>
 /// <param name="message"></param>
 /// <param name="notificationType"></param>
 private void ShowBlockNotification(NotificationBox notificationControl, string message, NotificationBoxType notificationType = NotificationBoxType.Info)
 {
     notificationControl.Text = message;
     notificationControl.NotificationBoxType = notificationType;
 }
 /// <summary>
 /// Sets and displays the content of the notification box.
 /// </summary>
 /// <param name="message">The message to display</param>
 /// <param name="boxType">The notification/alert box type</param>
 private void NotificationBoxSet(string message, NotificationBoxType boxType)
 {
     nbMain.Text = message;
     nbMain.NotificationBoxType = boxType;
     nbMain.Visible             = true;
 }
        /// <summary>
        /// Shows the result.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <param name="communication">The communication.</param>
        private void ShowResult(string message, Rock.Model.Communication communication, NotificationBoxType notificationType)
        {
            ShowStatus(communication);

            pnlDetails.Visible = false;

            nbResult.Text = message;
            nbResult.NotificationBoxType = notificationType;

            if (CurrentPageReference.Parameters.ContainsKey("CommunicationId"))
            {
                CurrentPageReference.Parameters["CommunicationId"] = communication.Id.ToString();
            }
            else
            {
                CurrentPageReference.Parameters.Add("CommunicationId", communication.Id.ToString());
            }
            hlViewCommunication.NavigateUrl = CurrentPageReference.BuildUrl();

            pnlResult.Visible = true;
        }
示例#11
0
 /// <summary>
 /// Shows the notification.
 /// </summary>
 /// <param name="errorMessage">The error message.</param>
 /// <param name="notificationBoxType">Type of the notification box.</param>
 private void ShowNotification(string errorMessage, NotificationBoxType notificationBoxType)
 {
     nbError.Visible             = true;
     nbError.Text                = errorMessage;
     nbError.NotificationBoxType = notificationBoxType;
 }
示例#12
0
 /// <summary>
 /// Displays the error text.
 /// </summary>
 /// <param name="messageText">The message text.</param>
 private void DisplayMessage(string messageText, NotificationBoxType noticeType)
 {
     nbMessage.NotificationBoxType = noticeType;
     nbMessage.Text    = messageText;
     nbMessage.Visible = true;
 }
示例#13
0
 /// <summary>
 /// Displays the message with a custom notification type.
 /// </summary>
 /// <param name="message">The message.</param>
 /// <param name="nbType">Type of the nb.</param>
 private void DisplayMessage(string message, NotificationBoxType nbType)
 {
     nbReportingServices.Text = message;
     nbReportingServices.NotificationBoxType = nbType;
     nbReportingServices.Visible             = !string.IsNullOrWhiteSpace(message);
 }
示例#14
0
 private void DisplayBox(string text, NotificationBoxType type)
 {
     nbDisplayBox.Text = text;
     nbDisplayBox.NotificationBoxType = type;
     nbDisplayBox.Visible             = true;
 }
 /// <summary>
 /// Displays the error text.
 /// </summary>
 /// <param name="messageText">The message text.</param>
 private void DisplayMessage(string messageText, NotificationBoxType noticeType)
 {
     nbMessage.NotificationBoxType = noticeType;
     nbMessage.Text = messageText;
     nbMessage.Visible = true;
 }