diff --git a/TaxPayerFull/Layout/Contact.razor b/TaxPayerFull/Layout/Contact.razor
index 69a9912..c7193d6 100644
--- a/TaxPayerFull/Layout/Contact.razor
+++ b/TaxPayerFull/Layout/Contact.razor
@@ -29,6 +29,8 @@
+
+
+ title="Modal title">
Modal body text goes here.
@@ -94,15 +91,15 @@
-
+
@code {
+ List messages = new List();
private Modal _modal = default!;
- [Inject] ToastService ToastService { get; set; } = default!;
//-------------------------------
string type = "NewTicketNoAuthentication";
private EditContext? editContext;
@@ -140,38 +137,28 @@
}
}
+ private async Task testhand()
+ {
+ ShowMessage(ToastType.Warning);
+ }
private async Task OnShowModalClick()
{
await _modal.ShowAsync();
}
-
private async Task OnHideModalClick()
{
await _modal.HideAsync();
}
- private void OnModalShowing()
- {
- ToastService.Notify(new(ToastType.Primary, $"Event: Showing called. DateTime: {DateTime.Now}"));
- }
+ private void ShowMessage(ToastType toastType) => messages.Add(CreateToastMessage(toastType));
- private void OnModalShown()
- {
- ToastService.Notify(new(ToastType.Success, $"Event: Show called. DateTime: {DateTime.Now}"));
- }
+ private ToastMessage CreateToastMessage(ToastType toastType)
+ => new ToastMessage
+ {
+ Type = toastType,
+ Title = "Blazor Bootstrap",
+ HelpText = $"{DateTime.Now}",
+ Message = $"Hello, world! This is a toast message. DateTime: {DateTime.Now}",
+ };
- private void OnModalHiding()
- {
- ToastService.Notify(new(ToastType.Danger, $"Event: Hiding called. DateTime: {DateTime.Now}"));
- }
-
- private void OnModalHidden()
- {
- ToastService.Notify(new(ToastType.Warning, $"Event: Hide called. DateTime: {DateTime.Now}"));
- }
-
- private void OnModalHidePrevented()
- {
- ToastService.Notify(new(ToastType.Info, $"Event: Hide Prevented called. DateTime: {DateTime.Now}"));
- }
}