[성현모] DB 예외처리 추가, UI 사이즈 조정
This commit is contained in:
Binary file not shown.
Binary file not shown.
@ -12,7 +12,7 @@ namespace SystemX.Core.Services
|
|||||||
{
|
{
|
||||||
public class DbContextProvider
|
public class DbContextProvider
|
||||||
{
|
{
|
||||||
public Dictionary<string, DataBase> DBDictionary { get; private set; } = new Dictionary<string, DataBase>();
|
public Dictionary<int, DataBase> DBDictionary { get; private set; } = new Dictionary<int, DataBase>();
|
||||||
|
|
||||||
public void SetDBList(IList<DataBase>? DBList)
|
public void SetDBList(IList<DataBase>? DBList)
|
||||||
{
|
{
|
||||||
@ -20,18 +20,18 @@ namespace SystemX.Core.Services
|
|||||||
{
|
{
|
||||||
foreach (var db in DBList)
|
foreach (var db in DBList)
|
||||||
{
|
{
|
||||||
if (DBDictionary.ContainsKey($"{db.DBName}") == false)
|
if (DBDictionary.ContainsKey(db.DBID) == false)
|
||||||
DBDictionary.Add($"{db.DBName}", db);
|
DBDictionary.Add(db.DBID, db);
|
||||||
else
|
else
|
||||||
LogXnet.WriteLine($"Exist key DB Dictionary {db.DBName}", LogXLabel.Error);
|
LogXnet.WriteLine($"Exist key DB Dictionary {db.DBID}", LogXLabel.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 또는 context 직접 반환 (주의: caller가 Dispose 해야 함)
|
// 또는 context 직접 반환 (주의: caller가 Dispose 해야 함)
|
||||||
public TContext? GetDBContext<TContext>(string dbName) where TContext : DbContext
|
public TContext? GetDBContext<TContext>(int dbID) where TContext : DbContext
|
||||||
{
|
{
|
||||||
if(DBDictionary.TryGetValue(dbName, out var db) == true)
|
if(DBDictionary.TryGetValue(dbID, out var db) == true)
|
||||||
{
|
{
|
||||||
var optionsBuilder = new DbContextOptionsBuilder<TContext>();
|
var optionsBuilder = new DbContextOptionsBuilder<TContext>();
|
||||||
optionsBuilder.UseSqlServer(db.ConvertToConnectionString());
|
optionsBuilder.UseSqlServer(db.ConvertToConnectionString());
|
||||||
|
|||||||
22
Projects/WebClient/Web.Tra/Components/Dialog/Loading.razor
Normal file
22
Projects/WebClient/Web.Tra/Components/Dialog/Loading.razor
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
@page "/loading/{Message?}"
|
||||||
|
|
||||||
|
<div style="text-align: center;">
|
||||||
|
<div class="lds-ring">
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
<div></div>
|
||||||
|
</div>
|
||||||
|
<div class="message">
|
||||||
|
@Message
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@code {
|
||||||
|
[Parameter]
|
||||||
|
public string? Message { get; set; }
|
||||||
|
|
||||||
|
protected override void OnParametersSet()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,58 @@
|
|||||||
|
.message {
|
||||||
|
/* change color here */
|
||||||
|
color: #f8b26a;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lds-ring {
|
||||||
|
/* change color here */
|
||||||
|
color: #f8b26a;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lds-ring,
|
||||||
|
.lds-ring div {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lds-ring {
|
||||||
|
display: inline-block;
|
||||||
|
position: relative;
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lds-ring div {
|
||||||
|
box-sizing: border-box;
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
width: 64px;
|
||||||
|
height: 64px;
|
||||||
|
margin: 8px;
|
||||||
|
border: 8px solid currentColor;
|
||||||
|
border-radius: 50%;
|
||||||
|
animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
||||||
|
border-color: currentColor transparent transparent transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lds-ring div:nth-child(1) {
|
||||||
|
animation-delay: -0.45s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lds-ring div:nth-child(2) {
|
||||||
|
animation-delay: -0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lds-ring div:nth-child(3) {
|
||||||
|
animation-delay: -0.15s;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes lds-ring {
|
||||||
|
0% {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -5,7 +5,6 @@
|
|||||||
@inject ConfigService<WebClientConfig> configService
|
@inject ConfigService<WebClientConfig> configService
|
||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
|
|
||||||
<RadzenComponents @rendermode="InteractiveServer" />
|
|
||||||
<RadzenLayout>
|
<RadzenLayout>
|
||||||
<RadzenHeader Style="height: 5rem; font-size: 2rem;" class="rz-px-5">
|
<RadzenHeader Style="height: 5rem; font-size: 2rem;" class="rz-px-5">
|
||||||
<RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" JustifyContent="JustifyContent.SpaceBetween" Gap="0">
|
<RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" JustifyContent="JustifyContent.SpaceBetween" Gap="0">
|
||||||
@ -17,10 +16,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</RadzenStack>
|
</RadzenStack>
|
||||||
</RadzenHeader>
|
</RadzenHeader>
|
||||||
<RadzenBody Style="margin:0; padding:0;">
|
<RadzenBody Style="margin:0; padding:0; overflow:hidden; font-size: 2rem;">
|
||||||
@Body
|
@Body
|
||||||
</RadzenBody>
|
</RadzenBody>
|
||||||
</RadzenLayout>
|
</RadzenLayout>
|
||||||
|
<RadzenComponents @rendermode="InteractiveServer" />
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
bool sidebarExpanded = true;
|
bool sidebarExpanded = true;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
@inject ContextMenuService ContextMenuService
|
@inject ContextMenuService ContextMenuService
|
||||||
|
|
||||||
<RadzenDataGrid TItem="TDataModel" Data="@DataList" AllowPaging PageSize="100"
|
<RadzenDataGrid Style="height:calc(100vh - 23rem); font-size: 20px;" TItem="TDataModel" Data="@DataList" AllowPaging PageSize="100"
|
||||||
AllowFiltering FilterMode="FilterMode.Advanced" CellRender="@CellRender"
|
AllowFiltering FilterMode="FilterMode.Advanced" CellRender="@CellRender"
|
||||||
SelectionMode="DataGridSelectionMode.Single" @bind-Value="@SelectedRow"
|
SelectionMode="DataGridSelectionMode.Single" @bind-Value="@SelectedRow"
|
||||||
CellContextMenu="@OnCellContextMenu" RowSelect="@SelectRow">
|
CellContextMenu="@OnCellContextMenu" RowSelect="@SelectRow">
|
||||||
@ -25,8 +25,10 @@
|
|||||||
if (col.Name.ToLower().Equals("testdate"))
|
if (col.Name.ToLower().Equals("testdate"))
|
||||||
{
|
{
|
||||||
<RadzenDataGridColumn Property="@col.Name" Title="@col.Name">
|
<RadzenDataGridColumn Property="@col.Name" Title="@col.Name">
|
||||||
<Template>
|
<Template>
|
||||||
@Convert.ToDateTime(col.GetValue(context)).ToString("yyyy-MM-dd")
|
<span class="custom-rz-value rz-color-secondary">
|
||||||
|
@Convert.ToDateTime(col.GetValue(context)).ToString("yyyy-MM-dd")
|
||||||
|
</span>
|
||||||
</Template>
|
</Template>
|
||||||
</RadzenDataGridColumn>
|
</RadzenDataGridColumn>
|
||||||
}
|
}
|
||||||
@ -34,9 +36,9 @@
|
|||||||
{
|
{
|
||||||
<RadzenDataGridColumn Property="@col.Name" Title="@col.Name">
|
<RadzenDataGridColumn Property="@col.Name" Title="@col.Name">
|
||||||
<Template>
|
<Template>
|
||||||
<RadzenText Style="color: lime;">
|
<span class="custom-rz-value" style="color: lime;">
|
||||||
@col.GetValue(context)
|
@col.GetValue(context)
|
||||||
</RadzenText>
|
</span>
|
||||||
</Template>
|
</Template>
|
||||||
</RadzenDataGridColumn>
|
</RadzenDataGridColumn>
|
||||||
}
|
}
|
||||||
@ -44,15 +46,20 @@
|
|||||||
{
|
{
|
||||||
<RadzenDataGridColumn Property="@col.Name" Title="@col.Name">
|
<RadzenDataGridColumn Property="@col.Name" Title="@col.Name">
|
||||||
<Template>
|
<Template>
|
||||||
<RadzenText Style="color:red;">
|
<span class="custom-rz-value" style="color:red;">
|
||||||
@col.GetValue(context)
|
@col.GetValue(context)
|
||||||
</RadzenText>
|
</span>
|
||||||
</Template>
|
</Template>
|
||||||
</RadzenDataGridColumn>
|
</RadzenDataGridColumn>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<RadzenDataGridColumn Property="@col.Name" Title="@col.Name">
|
<RadzenDataGridColumn Property="@col.Name" Title="@col.Name">
|
||||||
|
<Template>
|
||||||
|
<span class="custom-rz-value">
|
||||||
|
@col.GetValue(context)
|
||||||
|
</span>
|
||||||
|
</Template>
|
||||||
</RadzenDataGridColumn>
|
</RadzenDataGridColumn>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,3 @@
|
|||||||
|
.custom-rz-value {
|
||||||
|
font-size: 1.5rem !important;
|
||||||
|
}
|
||||||
@ -1,41 +1,38 @@
|
|||||||
@page "/tra"
|
@page "/tra"
|
||||||
@using Web.Tra.Services
|
@using Web.Tra.Services
|
||||||
@inject CPXV2LogService CPXV2LogService
|
@inject CPXV2LogService CPXV2LogService
|
||||||
|
@inject PopupService PopupService
|
||||||
|
|
||||||
<RadzenStack Style="width:100%; background-color:var(--rz-primary-lighter);" class="rz-border-bottom rz-p-3" Orientation="Orientation.Horizontal" AlignItems="AlignItems.Start" JustifyContent="JustifyContent.Start">
|
<RadzenStack Style="width:100%; background-color:var(--rz-primary-lighter);" class="rz-border-bottom rz-p-3" Orientation="Orientation.Horizontal" AlignItems="AlignItems.Start" JustifyContent="JustifyContent.Start">
|
||||||
<!--Search Block-->
|
<!--Search Block-->
|
||||||
<RadzenStack Style="height:12rem; width:fit-content;" class="rz-border-right rz-pr-5" Orientation="Orientation.Horizontal" AlignItems="AlignItems.Start" JustifyContent="JustifyContent.Start">
|
<RadzenStack Style="height:10rem; width:fit-content;" class="rz-border-right rz-pr-5" Orientation="Orientation.Horizontal" AlignItems="AlignItems.Start" JustifyContent="JustifyContent.Start">
|
||||||
<!--Date Picker Block-->
|
<!--Date Picker Block-->
|
||||||
<RadzenStack Style="font-size:1.3rem;" Orientation="Orientation.Vertical" AlignItems="AlignItems.Start" JustifyContent="JustifyContent.Center">
|
<RadzenStack Style="font-size:1.5rem;" Orientation="Orientation.Vertical" AlignItems="AlignItems.Start" JustifyContent="JustifyContent.Center">
|
||||||
<RadzenStack Style="width: 20rem;" Orientation="Orientation.Horizontal" JustifyContent="JustifyContent.SpaceBetween">
|
<RadzenStack Style="width: 25rem; margin-bottom:0.5rem;" Orientation="Orientation.Horizontal" JustifyContent="JustifyContent.SpaceBetween">
|
||||||
<RadzenLabel Text="Begin"></RadzenLabel>
|
<RadzenLabel Text="Begin"></RadzenLabel>
|
||||||
<RadzenDatePicker @bind-Value=@RequestSearch.SearchStart TValue="DateOnly"></RadzenDatePicker>
|
<RadzenDatePicker @bind-Value=@RequestSearch.SearchStart TValue="DateOnly"></RadzenDatePicker>
|
||||||
</RadzenStack>
|
</RadzenStack>
|
||||||
<RadzenStack Style="width:20rem;" Orientation="Orientation.Horizontal" JustifyContent="JustifyContent.SpaceBetween">
|
<RadzenStack Style="width:25rem; margin-bottom: 0.5rem;" Orientation="Orientation.Horizontal" JustifyContent="JustifyContent.SpaceBetween">
|
||||||
<RadzenLabel Text="End"></RadzenLabel>
|
<RadzenLabel Text="End"></RadzenLabel>
|
||||||
<RadzenDatePicker @bind-Value=@RequestSearch.SearchEnd TValue="DateOnly"></RadzenDatePicker>
|
<RadzenDatePicker Style="font-size: 1.5rem !important; color:red;" @bind-Value=@RequestSearch.SearchEnd TValue="DateOnly"></RadzenDatePicker>
|
||||||
</RadzenStack>
|
</RadzenStack>
|
||||||
</RadzenStack>
|
</RadzenStack>
|
||||||
|
|
||||||
<RadzenStack Style="cursor: pointer;" class="" Orientation="Orientation.Vertical" AlignItems="AlignItems.Center" JustifyContent="JustifyContent.Start" @onclick="@OnSearch">
|
<RadzenStack Style="cursor: pointer;" class="" Orientation="Orientation.Vertical" AlignItems="AlignItems.Center" JustifyContent="JustifyContent.Start" @onclick="@OnSearch">
|
||||||
<RadzenIcon IconStyle="IconStyle.Warning" Style="font-size: 3.5rem; font-weight:400;" Icon="search"></RadzenIcon>
|
<RadzenIcon Style="font-size: 3.5rem; font-weight:400; color:var(--rz-warning)" Icon="search"></RadzenIcon>
|
||||||
<RadzenLabel Style="font-size: 1.2rem; cursor:pointer;" Text="Search"></RadzenLabel>
|
<RadzenLabel Style="font-size: 1.5rem; cursor:pointer; color:var(--rz-warning)" Text="Search"></RadzenLabel>
|
||||||
</RadzenStack>
|
</RadzenStack>
|
||||||
</RadzenStack>
|
</RadzenStack>
|
||||||
|
|
||||||
</RadzenStack>
|
</RadzenStack>
|
||||||
|
|
||||||
<TraGrid TDataModel="Overview" DataList="@Overviews" OnClickContextMenu="@OnClickDetailOverviewContextMenu"
|
<RadzenTabs @ref="@tabs" Style="width:100%; height:100%;" RenderMode="TabRenderMode.Client" @bind-SelectedIndex=@SelectedTabIndex>
|
||||||
OnSelectRow="@OnSelectRowOverview">
|
|
||||||
</TraGrid>
|
|
||||||
|
|
||||||
@* <RadzenTabs @ref="@tabs" Style="width:100%; height: 100%;" RenderMode="TabRenderMode.Client" @bind-SelectedIndex=@SelectedTabIndex>
|
|
||||||
<Tabs>
|
<Tabs>
|
||||||
@foreach (var tab in ListTabs)
|
@foreach (var tab in ListTabs)
|
||||||
{
|
{
|
||||||
<RadzenTabsItem Text="@tab.Key.ToString()">
|
<RadzenTabsItem Text="@tab.Key.ToString()">
|
||||||
<Template>
|
<Template>
|
||||||
<span style="margin-right: 1rem;">@context.Text</span>
|
<span style="margin-right: 1rem; font-size: 1.5rem;">@context.Text</span>
|
||||||
<RadzenButton Size="ButtonSize.Small" Icon="close" Click="@(()=>OnClickClose(tab.Key))"></RadzenButton>
|
<RadzenButton Size="ButtonSize.Small" Icon="close" Click="@(()=>OnClickClose(tab.Key))"></RadzenButton>
|
||||||
</Template>
|
</Template>
|
||||||
<ChildContent>
|
<ChildContent>
|
||||||
@ -52,22 +49,27 @@
|
|||||||
OnSelectRow="@OnSelectRowOverview" HostColumnMerge="true">
|
OnSelectRow="@OnSelectRowOverview" HostColumnMerge="true">
|
||||||
</TraGrid>
|
</TraGrid>
|
||||||
}
|
}
|
||||||
|
@*
|
||||||
@if (tab.Key.Contains(EnumTabs.TestHistoryC1.ToString()))
|
@if (tab.Key.Contains(EnumTabs.TestHistoryC1.ToString()))
|
||||||
{
|
{
|
||||||
<TRAGrid TDataModel="TestHistory" DataList="@TestHistories" HostColumnMerge="true" VisibleRowNo="true">
|
<TRAGrid TDataModel="TestHistory" DataList="@TestHistories" HostColumnMerge="true" VisibleRowNo="true">
|
||||||
</TRAGrid>
|
</TRAGrid>
|
||||||
}
|
} *@
|
||||||
</ChildContent>
|
</ChildContent>
|
||||||
</RadzenTabsItem>
|
</RadzenTabsItem>
|
||||||
}
|
}
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</RadzenTabs>
|
</RadzenTabs>
|
||||||
*@
|
|
||||||
@code {
|
@code {
|
||||||
private RequestSearch RequestSearch = new RequestSearch();
|
private RequestSearch RequestSearch = new RequestSearch();
|
||||||
|
|
||||||
RadzenTabs tabs;
|
RadzenTabs tabs;
|
||||||
|
int SelectedTabIndex = 0;
|
||||||
|
Dictionary<string, EnumTabs> ListTabs = new Dictionary<string, EnumTabs>();
|
||||||
|
List<Overview> Overviews = new List<Overview>();
|
||||||
|
List<Overview> DetailOverviews = new List<Overview>();
|
||||||
|
// List<TestHistory> TestHistories = new List<TestHistory>();
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
@ -82,14 +84,14 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Overviews = await CPXV2LogService.GetOverview(RequestSearch);
|
PopupService.OpenIndicator("Search Data");
|
||||||
}
|
|
||||||
|
|
||||||
int SelectedTabIndex = 0;
|
Overviews = await CPXV2LogService.GetOverview(RequestSearch);
|
||||||
Dictionary<string, EnumTabs> ListTabs = new Dictionary<string, EnumTabs>();
|
if (ListTabs.ContainsKey(EnumTabs.OverviewC1.ToString()) == false)
|
||||||
List<Overview> Overviews = new List<Overview>();
|
ListTabs.Add($"{EnumTabs.OverviewC1}", EnumTabs.OverviewC1);
|
||||||
List<Overview> DetailOverviews = new List<Overview>();
|
|
||||||
// List<TestHistory> TestHistories = new List<TestHistory>();
|
PopupService.CloseIndicator();
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnInitialized()
|
protected override void OnInitialized()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -24,11 +24,14 @@ else
|
|||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
|
builder.Services.AddRadzenComponents();
|
||||||
|
|
||||||
//singleton
|
//singleton
|
||||||
builder.Services.AddSingleton<ConfigService<WebClientConfig>>();
|
builder.Services.AddSingleton<ConfigService<WebClientConfig>>();
|
||||||
|
|
||||||
//scoped
|
//scoped
|
||||||
builder.Services.AddScoped<CPXV2LogService>();
|
builder.Services.AddScoped<CPXV2LogService>();
|
||||||
|
builder.Services.AddScoped<PopupService>();
|
||||||
|
|
||||||
//db
|
//db
|
||||||
builder.Services.AddSingleton<DbContextProvider>(); // Generic <20><><EFBFBD><EFBFBD>
|
builder.Services.AddSingleton<DbContextProvider>(); // Generic <20><><EFBFBD><EFBFBD>
|
||||||
@ -37,8 +40,6 @@ builder.Services.AddSingleton<DbContextProvider>(); // Generic
|
|||||||
builder.Services.AddRazorComponents()
|
builder.Services.AddRazorComponents()
|
||||||
.AddInteractiveServerComponents();
|
.AddInteractiveServerComponents();
|
||||||
|
|
||||||
builder.Services.AddRadzenComponents();
|
|
||||||
|
|
||||||
//config preload, auth set
|
//config preload, auth set
|
||||||
ConfigService<WebClientConfig> preloadConfig = new ConfigService<WebClientConfig>();
|
ConfigService<WebClientConfig> preloadConfig = new ConfigService<WebClientConfig>();
|
||||||
if (preloadConfig.OpenConfig($@"{configDir}/{configFileName}") == true)
|
if (preloadConfig.OpenConfig($@"{configDir}/{configFileName}") == true)
|
||||||
@ -73,7 +74,7 @@ if (configService?.OpenConfig($@"{configDir}/{configFileName}") == true)
|
|||||||
dbProvider?.SetDBList(apiConfig?.DataBase);
|
dbProvider?.SetDBList(apiConfig?.DataBase);
|
||||||
|
|
||||||
//log db list
|
//log db list
|
||||||
var dbcontext = dbProvider.GetDBContext<CPXV2>("CPXV2");
|
var dbcontext = dbProvider.GetDBContext<CPXV2>(1);
|
||||||
var getDbList = await dbcontext.ExecuteStoredProcedureAsync<CPXV2, DBList>("spGetDBList");
|
var getDbList = await dbcontext.ExecuteStoredProcedureAsync<CPXV2, DBList>("spGetDBList");
|
||||||
var longTermDB = getDbList.Where(x => x.Name.ToLower().Contains("longterm")).ToList();
|
var longTermDB = getDbList.Where(x => x.Name.ToLower().Contains("longterm")).ToList();
|
||||||
|
|
||||||
|
|||||||
@ -88,12 +88,12 @@ namespace Web.Tra.Services
|
|||||||
{
|
{
|
||||||
var contextName = typeof(T).Name;
|
var contextName = typeof(T).Name;
|
||||||
|
|
||||||
var findDB = provider.DBDictionary.Values.First(x => x.DBID == dbID);
|
if(provider.DBDictionary.TryGetValue(dbID, out var findDB) == true)
|
||||||
if(findDB is not null)
|
|
||||||
{
|
{
|
||||||
return provider?.GetDBContext<T>($"{findDB.DBName}");
|
return provider?.GetDBContext<T>(findDB.DBID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LogXnet.WriteLine($"GetDBContext Error DBID:{dbID}", LogXLabel.Error);
|
||||||
return null;
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -50,3 +50,57 @@ h1:focus {
|
|||||||
.darker-border-checkbox.form-check-input {
|
.darker-border-checkbox.form-check-input {
|
||||||
border-color: #929292;
|
border-color: #929292;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rz-column-title {
|
||||||
|
font-size: 1.5rem !important;
|
||||||
|
color: var(--rz-secondary) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*calendar*/
|
||||||
|
|
||||||
|
.rz-datepicker-popup-container {
|
||||||
|
width: 30rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rz-calendar-header{
|
||||||
|
height: 5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rz-calendar-view rz-calendar-month-view {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rz-calendar-month-dropdown {
|
||||||
|
height: 3.0rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rz-calendar-year-dropdown {
|
||||||
|
width: 9rem !important;
|
||||||
|
height: 3.0rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rz-calendar-view-container {
|
||||||
|
font-size: 2.0rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rz-inputtext {
|
||||||
|
font-size: 1.5rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rz-state-default{
|
||||||
|
font-size: 1.5rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*data grid*/
|
||||||
|
.rz-dropdown{
|
||||||
|
height: 3.0rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rz-textbox{
|
||||||
|
font-size: 1.5rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
span{
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user