ホテル管理システム
ogi
yesterday 1a1c8e71fcd14858f595029f089b2d4a00202b32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@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" />;
}