Exemple #1
0
 public void ThrowEvent(AlertID errorID, string message)
 {
     if (ViewModelEvent != null)
     {
         ViewModelEvent(errorID, message);
     }
 }
Exemple #2
0
        public void SetMessage(AlertID alertType, string message)
        {
            switch (alertType)
            {
            case AlertID.SUCCESS:
                alertMessageDiv.Attributes["class"] = "alert alert-success";
                lbErrorType.Text = "SUCCESS!";
                break;

            case AlertID.WARNING:
                alertMessageDiv.Attributes["class"] = "alert alert-warning";
                lbErrorType.Text = "WARNING!";
                break;

            case AlertID.FAILED:
                alertMessageDiv.Attributes["class"] = "alert alert-danger";
                lbErrorType.Text = "DANGER!";
                break;

            default:
                alertMessageDiv.Attributes["class"] = "alert alert-info";
                lbErrorType.Text = "INFO!";
                break;
            }

            // Set message
            litMessage.Text = message;

            // Show
            alertMessageDiv.Style.Remove("display");
        }
        public void SetMessage(AlertID alertType, string message)
        {
            switch (alertType)
            {
                case AlertID.SUCCESS:
                    alertMessageDiv.Attributes["class"] = "alert alert-success";
                    lbErrorType.Text = "SUCCESS!";
                    break;
                case AlertID.WARNING:
                    alertMessageDiv.Attributes["class"] = "alert alert-warning";
                    lbErrorType.Text = "WARNING!";
                    break;
                case AlertID.FAILED:
                    alertMessageDiv.Attributes["class"] = "alert alert-danger";
                    lbErrorType.Text = "DANGER!";
                    break;
                default:
                    alertMessageDiv.Attributes["class"] = "alert alert-info";
                    lbErrorType.Text = "INFO!";
                    break;
            }

            // Set message
            litMessage.Text = message;

            // Show
            alertMessageDiv.Style.Remove("display");
        }