From 1a1c8e71fcd14858f595029f089b2d4a00202b32 Mon Sep 17 00:00:00 2001
From: ogi <Administrator@S-OGI-PC>
Date: Fri, 05 Dec 2025 09:24:16 +0900
Subject: [PATCH] プロジェクトファイルを追加。

---
 HotelPms.DataAccessGrpc.Client/AuthAccess.cs |   62 +++++++++++++++++++++++++++++++
 1 files changed, 62 insertions(+), 0 deletions(-)

diff --git a/HotelPms.DataAccessGrpc.Client/AuthAccess.cs b/HotelPms.DataAccessGrpc.Client/AuthAccess.cs
new file mode 100644
index 0000000..fa8321c
--- /dev/null
+++ b/HotelPms.DataAccessGrpc.Client/AuthAccess.cs
@@ -0,0 +1,62 @@
+using HotelPms.Data;
+using Grpc.Net.Client;
+using System;
+using System.Threading.Tasks;
+
+namespace HotelPms.DataAccessGrpc.Client
+{
+    public class AuthAccess : IDisposable
+    {
+        /// <summary>
+        /// チャネル
+        /// </summary>
+        public GrpcChannel Channel { get; private set; } = null;
+        public AuthCore.AuthCoreClient Client { get; private set; } = null;
+
+
+        public AuthAccess(GrpcChannel channel)
+        {
+            Channel = channel;
+            Client = new AuthCore.AuthCoreClient(Channel);
+        }
+
+        public void Dispose()
+        {
+
+        }
+
+        public async Task<LoginResult> LoginAsync(string loginID, string password)
+        {
+            return await Client.LoginAsync(new DataRequest
+            {
+                ActionType = 0,
+                Data = string.Empty,
+                CustomerID = "001",
+                LoginID = loginID,
+                Password = password,
+                SystemID = 1,
+                RefTables = string.Empty,
+                IP = "127.0.0.1",
+                MachineName = Environment.MachineName,
+                OS = Environment.OSVersion.ToString()
+            });
+        }
+
+        public async Task<LoginResult> LogoutAsync(string loginID)
+        {
+            return await Client.LoginAsync(new DataRequest
+            {
+                ActionType = 0,
+                Data = string.Empty,
+                CustomerID = "001",
+                LoginID = loginID,
+                Password = string.Empty,
+                SystemID = 1,
+                RefTables = string.Empty,
+                IP = "127.0.0.1",
+                MachineName = Environment.MachineName,
+                OS = Environment.OSVersion.ToString()
+            });
+        }
+    }
+}

--
Gitblit v1.10.0