-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOmniaNotification.cs
More file actions
37 lines (32 loc) · 955 Bytes
/
OmniaNotification.cs
File metadata and controls
37 lines (32 loc) · 955 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using Radzen;
namespace omnia_blazor_demo
{
public class OmniaNotification
{
public readonly NotificationService notificationService;
public OmniaNotification(NotificationService notificationService)
{
this.notificationService = notificationService;
}
public void SendSuccess(string message)
{
notificationService.Notify(new NotificationMessage
{
Severity = NotificationSeverity.Success,
Summary = "Success",
Detail = message,
Duration = 4000
});
}
public void SendError(string message)
{
notificationService.Notify(new NotificationMessage
{
Severity = NotificationSeverity.Error,
Summary = "Error",
Detail = message,
Duration = 10000
});
}
}
}