ホテル管理システム
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
using MudBlazor;
using static HotelPms.Client.Blazor.Util.SystemEnum;
 
namespace HotelPms.Client.Blazor.ViewModel
{
    public class ValidField
    {
        public int Index { get; set; } = -1;
 
        public MudTextField<string> Ref { get; set; }
 
        /// <summary>
        /// コード・名称の制御有効かどうか
        /// </summary>
        public bool DispNameEnabled { get; set; } = false;
 
        /// <summary>
        /// 表示名称
        /// </summary>
        public string DispText { get; set; } = String.Empty;
 
        /// <summary>
        /// 表示名称の幅
        /// </summary>
        public int DispWidthUnit { get; set; } = 6;
 
        /// <summary>
        /// コード・名称の制御の
        /// 名称表示コントロール
        /// </summary>
        public MudField RefDispName { get; set; }
 
 
        /// <summary>
        /// 名称(キーとして使用)
        /// DBの列名と一致すること
        /// </summary>
        public string Name { get; set; } = string.Empty;
 
        public string Caption { get; set; } = string.Empty;
 
        //private string m_Text = string.Empty;
 
        /// <summary>
        /// @bind-Value用項目
        /// </summary>
        public string Text { get; set; } = string.Empty;
 
        /// <summary>
        /// フォーカス入る時点の値の退避
        /// </summary>
        public string OrgText { get; set; } = string.Empty;
 
        /// <summary>
        /// DB中の値
        /// </summary>
        public object Value { get; set; }
 
        /// <summary>
        /// 必要な時使う
        /// </summary>
        public object Tag { get; set; }
 
        public bool Error { get; set; }
 
        /// <summary>
        /// 使用不可
        /// </summary>
        public bool Disabled { get; set; }
 
        /// <summary>
        /// 一覧検索時のフィルター対象かどうか
        /// </summary>
        public bool GridFilter { get; set; }
 
        /// <summary>
        /// 一覧表示時の順番
        /// </summary>
        public int GridOrder { get; set; }
 
        /// <summary>
        /// 入力エラーメッセージ
        /// </summary>
        public string ErrorText { get; set; } = string.Empty;
 
        /// <summary>
        /// 入力必須かどうか
        /// </summary>
        public bool Required { get; set; }
 
        public EInputChar InputChar { get; set; } = EInputChar.None;
 
 
        public EShowStyle ShowStyle { get; set; } = EShowStyle.None;
 
        public string ThousandFormat { get; set; } = "N0";
 
        public EInputStyle InputStyle { get; set; } = EInputStyle.Normal;
 
        public int MaxLenth { get; set; } = 50;
 
        /// <summary>
        /// 入力範囲
        /// "'A','E','F'" OR "'1','2','21'" OR "[1,10]" OR "(1,10)" OR "[1,10)" OR "(1,10]"  
        /// ※空白の時しない
        /// </summary>
        public string Range { get; set; } = string.Empty;
 
        /// <summary>
        /// textareaかどうか
        /// </summary>
        public bool MultiLine { get; set; }
 
        /// <summary>
        /// xsモードで一行最大12単位
        /// </summary>
        public int WidthUnit { get; set; } = 6;
 
        /// <summary>
        /// 配置した後に改行するかしないか
        /// </summary>
        public bool NewLine { get; set; } = false;
 
        public bool ReadOnly { get; set; } = false;
 
        /// <summary>
        /// 値をクリアする
        /// </summary>
        public void Clear()
        {
            Disabled = false;
            Text = string.Empty;
            Value = null;
            OrgText = string.Empty;
            Error = false;
            ErrorText = string.Empty;
        }
    }
}