ホテル管理システム
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
using System.Collections.Concurrent;
 
namespace HotelPms.Client.Blazor.Util
{
    public class OptionCore : IDisposable
    {
        public enum GroupKey : int
        {
            System = 0,
        }
 
        public enum Key: int
        {
            System_CinTime = 0,
            System_CoutTime,
            System_CinTimeDayUse,
            System_CoutTimeDayUse,
        }
 
        private static OptionCore m_Instance;
        public static OptionCore Instance
        {
            get
            {
                if (m_Instance == null) { m_Instance = new OptionCore(); }
                return m_Instance;
            }
        }
 
        /// <summary>
        /// バッファー保存用メモリDB
        /// </summary>
        public ConcurrentDictionary<string, string> Data { get; set; } = new ConcurrentDictionary<string, string>();
 
        /// <summary>
        /// [Group,[Key, Value]]
        /// </summary>
        public ConcurrentDictionary<string, ConcurrentDictionary<string, string>> DefaultData { get; set; } = new ConcurrentDictionary<string, ConcurrentDictionary<string, string>>();
 
        public void Dispose()
        {
            Data.Clear();
        }
 
        public OptionCore() 
        {
            InitDefault();
        } 
 
        /// <summary>
        /// 初期値
        /// </summary>
        private void InitDefault()
        {
            #region システム
 
            ConcurrentDictionary<string, string>  itemDict = new();
            DefaultData[GroupKey.System.ToString()] = itemDict;
            itemDict[Key.System_CinTime.ToString()] = "1500";
            itemDict[Key.System_CoutTime.ToString()] = "1000";
            itemDict[Key.System_CinTimeDayUse.ToString()] = "0900";
            itemDict[Key.System_CoutTimeDayUse.ToString()] = "1000";
 
            #endregion
        }
    }
}