SHA256
GuestLog - User message improvements
- Added UserMessageService to have common methods for showing messages and errors to the user. - Added Result record so services can return status on operation error (so it can be shown in the UI messages). - Updated services to use the new Result record. - Updated pages to use the new IUserMessageService.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using Somnia.GuestLog.Models.DTOs;
|
||||
|
||||
namespace Somnia.GuestLog.Services;
|
||||
|
||||
public interface IUserMessageService
|
||||
{
|
||||
public void ShowMessage(string text, MessageKind kind, params object[] parameters);
|
||||
|
||||
public void ShowResult(Result resultDto);
|
||||
public void ShowResultWithMessage(Result resultDto, string message);
|
||||
|
||||
|
||||
public enum MessageKind
|
||||
{
|
||||
Info, Warning, Error, Success, Normal
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user