116 lines
4.6 KiB
Plaintext
116 lines
4.6 KiB
Plaintext
@page "/dbtest"
|
|
@using TIAMSharedUI.Pages.Components
|
|
@using TIAMWebApp.Shared.Application.Interfaces
|
|
@using TIAMWebApp.Shared.Application.Models.ClientSide.UI.WizardModels
|
|
@using TIAMWebApp.Shared.Application.Utility
|
|
@inject LogToBrowserConsole logToBrowserConsole
|
|
@inject IWizardProcessor WizardProcessor
|
|
<h3>TestPage</h3>
|
|
<div class="container mt-3">
|
|
|
|
<ChooseDestination></ChooseDestination>
|
|
<hr/>
|
|
<DbTestComponent></DbTestComponent>
|
|
<div class="target-container" @onclick="@(() => EulaVisible = true)">
|
|
<button class="btn btn-primary">NEW TRANSFERDESTINATION</button>
|
|
<button class="btn btn-primary">NEW TRANSFER</button>
|
|
</div>
|
|
<DxPopup CssClass="popup-demo-events"
|
|
@bind-Visible="@EulaVisible"
|
|
ShowFooter="true"
|
|
CloseOnEscape="false"
|
|
CloseOnOutsideClick="false"
|
|
ShowCloseButton="false"
|
|
HeaderText="DevExpress EULA"
|
|
Closing="EulaPopupClosing"
|
|
Closed="EulaPopupClosed">
|
|
<BodyContentTemplate>
|
|
<InputWizard Data=@myModel OnSubmit="SubmitForm"></InputWizard>
|
|
</BodyContentTemplate>
|
|
<FooterContentTemplate Context="Context">
|
|
<div class="popup-demo-events-footer">
|
|
<!--DxCheckBox CssClass="popup-demo-events-checkbox" @bind-Checked="@EulaAccepted">I accept the terms of the EULA</!--DxCheckBox-->
|
|
<!--DxButton CssClass="popup-demo-events-button ms-2" RenderStyle="ButtonRenderStyle.Primary" Text="OK" Click="Context.CloseCallback" /-->
|
|
<DxButton CssClass="popup-demo-events-button ms-2" RenderStyle="ButtonRenderStyle.Secondary" Text="Cancel" Click="CancelEulaClick" />
|
|
</div>
|
|
</FooterContentTemplate>
|
|
</DxPopup>
|
|
<DxPopup CssClass="popup-demo-events"
|
|
@bind-Visible="@EulaVisible"
|
|
ShowFooter="true"
|
|
CloseOnEscape="false"
|
|
CloseOnOutsideClick="false"
|
|
ShowCloseButton="false"
|
|
HeaderText="DevExpress EULA"
|
|
Closing="EulaPopupClosing"
|
|
Closed="EulaPopupClosed">
|
|
<BodyContentTemplate>
|
|
<InputWizard Data=@myModel2 OnSubmit="SubmitForm"></InputWizard>
|
|
</BodyContentTemplate>
|
|
<FooterContentTemplate Context="Context">
|
|
<div class="popup-demo-events-footer">
|
|
<!--DxCheckBox CssClass="popup-demo-events-checkbox" @bind-Checked="@EulaAccepted">I accept the terms of the EULA</!--DxCheckBox-->
|
|
<!--DxButton CssClass="popup-demo-events-button ms-2" RenderStyle="ButtonRenderStyle.Primary" Text="OK" Click="Context.CloseCallback" /-->
|
|
<DxButton CssClass="popup-demo-events-button ms-2" RenderStyle="ButtonRenderStyle.Secondary" Text="Cancel" Click="CancelEulaClick" />
|
|
</div>
|
|
</FooterContentTemplate>
|
|
</DxPopup>
|
|
<DxPopup @bind-Visible="@MessageBoxVisible"
|
|
ShowFooter="true"
|
|
HeaderText="DevExpress EULA"
|
|
BodyText="You must read and accept the terms of the EULA to continue.">
|
|
<FooterContentTemplate Context="Context">
|
|
<DxButton CssClass="popup-button my-1 ms-2" RenderStyle="ButtonRenderStyle.Primary" Text="OK" Click="Context.CloseCallback" />
|
|
<DxButton CssClass="popup-button my-1 ms-2" RenderStyle="ButtonRenderStyle.Secondary" Text="Cancel" Click="CancelEulaClick" />
|
|
</FooterContentTemplate>
|
|
</DxPopup>
|
|
|
|
|
|
</div>
|
|
@code {
|
|
|
|
public TransferDestinationWizardModel myModel = new TransferDestinationWizardModel();
|
|
public TransferWizardModel myModel2 = new TransferWizardModel();
|
|
|
|
bool EulaAccepted { get; set; }
|
|
bool EulaVisible { get; set; }
|
|
bool MessageBoxVisible { get; set; }
|
|
bool SkipEulaCheck { get; set; }
|
|
void TryAgainClick()
|
|
{
|
|
MessageBoxVisible = false;
|
|
}
|
|
void CancelEulaClick()
|
|
{
|
|
myModel = new TransferDestinationWizardModel();
|
|
SkipEulaCheck = true;
|
|
MessageBoxVisible = false;
|
|
EulaVisible = false;
|
|
}
|
|
void EulaPopupClosed()
|
|
{
|
|
EulaAccepted = false;
|
|
SkipEulaCheck = false;
|
|
}
|
|
void EulaPopupClosing(PopupClosingEventArgs args)
|
|
{
|
|
if (SkipEulaCheck)
|
|
return;
|
|
args.Cancel = !EulaAccepted;
|
|
MessageBoxVisible = !EulaAccepted;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------------
|
|
|
|
|
|
public async Task SubmitForm(object Result)
|
|
{
|
|
//await WizardProcessor.ProcessWizardAsync(Result.GetType(), Result);
|
|
logToBrowserConsole.LogToBC($"Submitted nested form: {Result.GetType().FullName}");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|