@using System.ComponentModel.DataAnnotations
|
@using System.Text.RegularExpressions
|
@using System.Reflection
|
@using HotelPms.Client.Blazor.Models;
|
@using HotelPms.Client.Blazor.ViewModel
|
@using HotelPms.Data.Common
|
@using HotelPms.Data.Common.Interface.Master
|
@using HotelPms.DataAccessGrpc.Client
|
@using HotelPms.Share.IO
|
@using HotelPms.Share.Util
|
@using ViewModel = HotelPms.Client.Blazor.ViewModel
|
@using static HotelPms.Client.Blazor.Util.SystemEnum
|
@inject IJSRuntime JSRuntime
|
@inject IDialogService DialogService
|
@inject ISnackbar Snackbar
|
|
<MudCard Style="height: 100%" Elevation="4">
|
<MudCardHeader Class="mb-0 pb-0">
|
<CardHeaderContent>
|
<MudText Typo="Typo.body1">タイプ・室数</MudText>
|
</CardHeaderContent>
|
</MudCardHeader>
|
<MudCardContent Class="mt-0 pt-0 mb-0 pb-1">
|
<MudTable Class="edit-grid" id="gdi-roomtype-list" T="RoomTypeInputRow" Items="@Data.RoomTypeList" @ref="mudRoomTypeInputTable" @bind-SelectedItem="m_SelRoomTypeInputRow" Dense="true" ReadOnly="false" FixedHeader="true" Height="200px" Striped="true" Elevation="0" Outlined="true">
|
<ColGroup>
|
<col style="width:80px;" />
|
<col />
|
<col style="width:80px;" />
|
</ColGroup>
|
<HeaderContent>
|
<MudTh>ID</MudTh>
|
<MudTh>名称</MudTh>
|
<MudTh>室数</MudTh>
|
</HeaderContent>
|
<RowTemplate>
|
<MudTd DataLabel="ID" Class="slip-row pr-0 pl-1">
|
<MudTextField class="input-pink input-center" @ref="@context.Cells[(int)RoomTypeInputRow.ColType.ID].Ref" @bind-Value="@context.Cells[(int)RoomTypeInputRow.ColType.ID].Text" Margin="Margin.Dense"
|
OnKeyPress="@(e => KeyPress((int)RoomTypeInputRow.ColType.ID, context, e))"
|
KeyPressPreventDefault="@keyPressPreventDefault"
|
OnKeyDown="@(e => KeyDown((int)RoomTypeInputRow.ColType.ID, context, e))"
|
KeyDownPreventDefault="@keyDownPreventDefault"
|
OnBlur="@(e => Leave((int)RoomTypeInputRow.ColType.ID, context, e))"
|
@onfocus="(e => Enter((int)RoomTypeInputRow.ColType.ID, context, e))"
|
MaxLength="7" />
|
</MudTd>
|
<MudTd DataLabel="名称" Class="slip-row pr-0 pl-1"><MudTextField id="txtInputRoomTypeName" @bind-Value="@context.Cells[(int)RoomTypeInputRow.ColType.Name].Text" Margin="Margin.Dense" ReadOnly="true" /></MudTd>
|
<MudTd DataLabel="室数" Class="slip-row pr-2 pl-1">
|
<MudTextField class="input-pink input-center" @ref="@context.Cells[(int)RoomTypeInputRow.ColType.Count].Ref" @bind-Value="@context.Cells[(int)RoomTypeInputRow.ColType.Count].Text" Margin="Margin.Dense"
|
OnKeyPress="@(e => KeyPress((int)RoomTypeInputRow.ColType.Count, context, e))"
|
KeyPressPreventDefault="@keyPressPreventDefault"
|
OnKeyDown="@(e => KeyDown((int)RoomTypeInputRow.ColType.Count, context, e))"
|
KeyDownPreventDefault="@keyDownPreventDefault"
|
OnBlur="@(e => Leave((int)RoomTypeInputRow.ColType.Count, context, e))"
|
@onfocus="(e => Enter((int)RoomTypeInputRow.ColType.ID, context, e))"
|
MaxLength="7" />
|
</MudTd>
|
</RowTemplate>
|
</MudTable>
|
</MudCardContent>
|
</MudCard>
|
|
@code {
|
private static RenderFragment RenderMessage(string text) =>@<MessageContext Text="@text" />;
|
}
|