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.Share/Data/Script/ResourceFile.cs |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/HotelPms.Share/Data/Script/ResourceFile.cs b/HotelPms.Share/Data/Script/ResourceFile.cs
new file mode 100644
index 0000000..bcf8c81
--- /dev/null
+++ b/HotelPms.Share/Data/Script/ResourceFile.cs
@@ -0,0 +1,35 @@
+using System.Text;
+using System.Reflection;
+using System.IO;
+using HotelPms.Share.Util;
+
+namespace HotelPms.Share.Data.Script;
+
+public class ResourceFile
+{
+    public enum ResType : int
+    { 
+        SP_GetCreateTableScript = 0,
+        SP_CloseDBConnect,
+    }
+
+    public static string GetName(ResType type)
+    {
+        string name = string.Empty;
+        switch (type)
+        { 
+            case ResType.SP_GetCreateTableScript:
+            case ResType.SP_CloseDBConnect:
+                name = string.Format("HotelPms.Share.Data.Script.MsSql.{0}.sql", type.ToString());
+                break;
+        }
+        return name;
+    }
+
+    public static string GetScript(ResType type)
+    {
+        Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(GetName(type));
+        byte[] data = CConvert.ToBytes(stream);
+        return Encoding.Default.GetString(data);
+    }
+}

--
Gitblit v1.10.0