mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 04:20:55 +00:00
49 lines
1.4 KiB
Plaintext
49 lines
1.4 KiB
Plaintext
<RadzenStack>
|
|
<div style="height: 640px;">
|
|
<Pager DataToPrinterAdd="DataToPrinterAdd" page="page" />
|
|
</div>
|
|
<RadzenStack Orientation="Orientation.Horizontal" JustifyContent="JustifyContent.SpaceBetween">
|
|
<RadzenButton Text="Назад" Style="width: 125px;" Click="PrevPage" Disabled="@(page == 1)" ButtonStyle="ButtonStyle.Secondary" />
|
|
@if (page == 3)
|
|
{
|
|
<RadzenButton Text="Добавить" Style="width: 125px;" ButtonStyle="ButtonStyle.Success"/>
|
|
}
|
|
else
|
|
{
|
|
<RadzenButton Text="Дальше" Style="width: 125px;" Click="NextPage" ButtonStyle="ButtonStyle.Primary" />
|
|
}
|
|
</RadzenStack>
|
|
</RadzenStack>
|
|
|
|
@code {
|
|
int page = 1;
|
|
|
|
Shared.Models.Printer.PrinterAdd DataToPrinterAdd = new()
|
|
{
|
|
PrinterConnetctionTypeId = 1,
|
|
Name = string.Empty,
|
|
Model = new()
|
|
{
|
|
Name = string.Empty,
|
|
Manufacturer = new()
|
|
{
|
|
Name = string.Empty
|
|
},
|
|
SupportedArticle = string.Empty
|
|
},
|
|
CountPrintedAllTime = 0,
|
|
VolumeBuiltInCartridge = 0,
|
|
LocationName = string.Empty,
|
|
PrintTypeId = 1
|
|
};
|
|
|
|
async Task NextPage()
|
|
{
|
|
page += (DataToPrinterAdd.PrinterConnetctionTypeId == 2) ? 2 : 1;
|
|
}
|
|
async Task PrevPage()
|
|
{
|
|
page -= (DataToPrinterAdd.PrinterConnetctionTypeId == 2) ? 2 : 1;
|
|
}
|
|
}
|