[성현모] DB 예외처리 추가, UI 사이즈 조정
This commit is contained in:
@ -88,12 +88,12 @@ namespace Web.Tra.Services
|
||||
{
|
||||
var contextName = typeof(T).Name;
|
||||
|
||||
var findDB = provider.DBDictionary.Values.First(x => x.DBID == dbID);
|
||||
if(findDB is not null)
|
||||
if(provider.DBDictionary.TryGetValue(dbID, out var findDB) == true)
|
||||
{
|
||||
return provider?.GetDBContext<T>($"{findDB.DBName}");
|
||||
}
|
||||
return provider?.GetDBContext<T>(findDB.DBID);
|
||||
}
|
||||
|
||||
LogXnet.WriteLine($"GetDBContext Error DBID:{dbID}", LogXLabel.Error);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
43
Projects/WebClient/Web.Tra/Services/PopupService.cs
Normal file
43
Projects/WebClient/Web.Tra/Services/PopupService.cs
Normal file
@ -0,0 +1,43 @@
|
||||
using Radzen;
|
||||
using Web.Tra.Components.Dialog;
|
||||
|
||||
namespace Web.Tra.Services
|
||||
{
|
||||
public class PopupService
|
||||
{
|
||||
public DialogService _dialogService;
|
||||
|
||||
public PopupService(DialogService dialogService)
|
||||
{
|
||||
_dialogService = dialogService;
|
||||
}
|
||||
|
||||
public async Task<bool> Confirm(string title, string message)
|
||||
{
|
||||
bool result = false;
|
||||
result = await _dialogService.Confirm(message, title, new ConfirmOptions
|
||||
{
|
||||
OkButtonText = "OK",
|
||||
CancelButtonText = "Cancel",
|
||||
}) ?? false;
|
||||
return result;
|
||||
}
|
||||
|
||||
public void OpenIndicator(string message = "")
|
||||
{
|
||||
_dialogService.Open<Loading>("",
|
||||
new Dictionary<string, object>() { { "Message", message } },
|
||||
new DialogOptions
|
||||
{
|
||||
ShowClose = false,
|
||||
ShowTitle = false,
|
||||
Style = "box-shadow: none; background: transparent; min-width:0; min-height:0; width:auto;"
|
||||
});
|
||||
}
|
||||
|
||||
public void CloseIndicator()
|
||||
{
|
||||
_dialogService.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user