public void ThrowEvent(AlertID errorID, string message) { if (ViewModelEvent != null) { ViewModelEvent(errorID, message); } }
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"); }