ホテル管理システム
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
using HotelPms.Client.Blazor.Util;
using HotelPms.Client.Blazor.ViewModel;
using Microsoft.JSInterop;
 
namespace HotelPms.Client.Blazor.Services
{
    public static class JsInputCoreCallBack
    {
        [JSInvokable]
        public static async Task<JsInputCoreEventArgs> InputCoreEvent(JsInputCoreEventArgs args)
        {
            EnvironmentSetting.Debug($"InputCoreEvent:{args.ToString()}");
 
            //次のフォーカス移動先判断する
            args.ResultNo = 9;
            args.NextFocus = string.Empty;
            if (ValidModelEx.Storage.TryGetValue(args.ID, out ValidModelEx validModelEx))
            {
                if (args.EventName == "focus")
                {
                    validModelEx.Enter(args.Index, args);
                }
                else if (args.EventName == "keyup")
                {
                    await validModelEx.KeyUp(args.Index, args);
                }
                else if (args.EventName == "blur")
                {
                    await validModelEx.Leave(args.Index, args);
                }
            }
 
            return await Task.FromResult(args);
        }
    }
}