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] プロジェクトファイルを追加。

---
 ProtosExpan/Master/Hotel.cs |  266 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 266 insertions(+), 0 deletions(-)

diff --git a/ProtosExpan/Master/Hotel.cs b/ProtosExpan/Master/Hotel.cs
new file mode 100644
index 0000000..60db2d5
--- /dev/null
+++ b/ProtosExpan/Master/Hotel.cs
@@ -0,0 +1,266 @@
+using System;
+using System.Collections.Concurrent;
+using System.Collections.Generic;
+using System.Data.SqlClient;
+using System.Text;
+using HotelPms.Share.Data;
+using HotelPms.Share.Util;
+using Google.Protobuf.WellKnownTypes;
+using customTypes;
+
+namespace HotelPms.Data.Master
+{
+    /// ****************************** Description *******************************
+    /// ◇システム名称
+    ///  ホテルPMS
+    /// ◇概要
+    ///  
+    /// ◇履歴
+    ///  2021/05/14  コード作成ツール    自動作成
+    /// ****************************** Declarations ******************************
+    [Serializable()]
+    public partial class Hotel : RecordBase
+    {
+        #region  ★★★★★ Property ★★★★★
+
+        public static ConcurrentDictionary<string, int> PrimaryKey { get; } = new ConcurrentDictionary<string, int>();
+
+        #endregion
+
+        partial void OnConstruction()
+        {
+            if (PrimaryKey.Count == 0)
+            {
+               PrimaryKey.TryAdd("ID", 0); 
+
+            }
+        }
+
+        #region  ★★★★★ Function ★★★★★
+
+        public bool CompareTo(Hotel item)
+        {
+            if (ID.CompareTo(item.ID) != 0
+                || Name.CompareTo(item.Name) != 0
+                || HotelDate.CompareTo(item.HotelDate) != 0
+                || RoomCount.CompareTo(item.RoomCount) != 0
+                || ZipCode.CompareTo(item.ZipCode) != 0
+                || Prefecture.CompareTo(item.Prefecture) != 0
+                || Address2.CompareTo(item.Address2) != 0
+                || Address3.CompareTo(item.Address3) != 0
+                || Address4.CompareTo(item.Address4) != 0
+                || Tel.CompareTo(item.Tel) != 0
+                || Fax.CompareTo(item.Fax) != 0
+                || StartDate.CompareTo(item.StartDate) != 0
+                || CreateDate.CompareTo(item.CreateDate) != 0
+                || SumDate.CompareTo(item.SumDate) != 0
+                || CloseDate.CompareTo(item.CloseDate) != 0
+)
+            {
+                return false;
+            }
+            return true;
+        }
+
+
+        public override void CopyTo(object dest)
+        {
+            Hotel item = dest as Hotel;
+            item.ID = ID;
+            item.Name = Name;
+            item.HotelDate = HotelDate;
+            item.RoomCount = RoomCount;
+            item.ZipCode = ZipCode;
+            item.Prefecture = Prefecture;
+            item.Address2 = Address2;
+            item.Address3 = Address3;
+            item.Address4 = Address4;
+            item.Tel = Tel;
+            item.Fax = Fax;
+            item.StartDate = StartDate;
+            item.CreateDate = CreateDate;
+            item.SumDate = SumDate;
+            item.CloseDate = CloseDate;
+
+        }
+
+        public override void Clear()
+        {
+            ID = 0;
+            Name = string.Empty;
+            HotelDate = Date.Default;
+            RoomCount = 0;
+            ZipCode = string.Empty;
+            Prefecture = string.Empty;
+            Address2 = string.Empty;
+            Address3 = string.Empty;
+            Address4 = string.Empty;
+            Tel = string.Empty;
+            Fax = string.Empty;
+            StartDate = 0;
+            CreateDate = Date.Default;
+            SumDate = Date.Default;
+            CloseDate = 0;
+
+        }
+
+        public Hotel DeepClone()
+        {
+            Hotel item = new Hotel();
+            item.ID = ID;
+            item.Name = Name;
+            item.HotelDate = HotelDate;
+            item.RoomCount = RoomCount;
+            item.ZipCode = ZipCode;
+            item.Prefecture = Prefecture;
+            item.Address2 = Address2;
+            item.Address3 = Address3;
+            item.Address4 = Address4;
+            item.Tel = Tel;
+            item.Fax = Fax;
+            item.StartDate = StartDate;
+            item.CreateDate = CreateDate;
+            item.SumDate = SumDate;
+            item.CloseDate = CloseDate;
+
+            return item;
+        }
+
+        public override bool ConvertDataRow(System.Data.DataRow row)
+        {
+            ID = CConvert.ToInt(row["ID"],ID); 
+            Name = row["Name"].ToString(); 
+            HotelDate = new Date(row.IsNull("HotelDate") ? 0 : CConvert.ToDateInt((System.DateTime)row["HotelDate"])); 
+            RoomCount = CConvert.ToInt(row["RoomCount"],RoomCount); 
+            ZipCode = row["ZipCode"].ToString(); 
+            Prefecture = row["Prefecture"].ToString(); 
+            Address2 = row["Address2"].ToString(); 
+            Address3 = row["Address3"].ToString(); 
+            Address4 = row["Address4"].ToString(); 
+            Tel = row["Tel"].ToString(); 
+            Fax = row["Fax"].ToString(); 
+            StartDate = CConvert.ToInt(row["StartDate"],StartDate); 
+            CreateDate = new Date(row.IsNull("CreateDate") ? 0 : CConvert.ToDateInt((System.DateTime)row["CreateDate"])); 
+            SumDate = new Date(row.IsNull("SumDate") ? 0 : CConvert.ToDateInt((System.DateTime)row["SumDate"])); 
+            CloseDate = CConvert.ToInt(row["CloseDate"],CloseDate); 
+
+            return true;
+        }
+
+        public void ToDataRow(System.Data.DataRow row)
+        {
+            row["ID"] = ID;
+            row["Name"] = Name;
+            row["HotelDate"] = HotelDate.ToDateTime();
+            row["RoomCount"] = RoomCount;
+            row["ZipCode"] = ZipCode;
+            row["Prefecture"] = Prefecture;
+            row["Address2"] = Address2;
+            row["Address3"] = Address3;
+            row["Address4"] = Address4;
+            row["Tel"] = Tel;
+            row["Fax"] = Fax;
+            row["StartDate"] = StartDate;
+            row["CreateDate"] = CreateDate.ToDateTime();
+            row["SumDate"] = SumDate.ToDateTime();
+            row["CloseDate"] = CloseDate;
+
+        }
+
+        public void ConvertReader(SqlDataReader row)
+        {
+            ID = CConvert.ToInt(row["ID"],ID); 
+            Name = row["Name"].ToString(); 
+            HotelDate = new Date(row.IsNull("HotelDate") ? 0 : CConvert.ToDateInt((System.DateTime)row["HotelDate"])); 
+            RoomCount = CConvert.ToInt(row["RoomCount"],RoomCount); 
+            ZipCode = row["ZipCode"].ToString(); 
+            Prefecture = row["Prefecture"].ToString(); 
+            Address2 = row["Address2"].ToString(); 
+            Address3 = row["Address3"].ToString(); 
+            Address4 = row["Address4"].ToString(); 
+            Tel = row["Tel"].ToString(); 
+            Fax = row["Fax"].ToString(); 
+            StartDate = CConvert.ToInt(row["StartDate"],StartDate); 
+            CreateDate = new Date(row.IsNull("CreateDate") ? 0 : CConvert.ToDateInt((System.DateTime)row["CreateDate"])); 
+            SumDate = new Date(row.IsNull("SumDate") ? 0 : CConvert.ToDateInt((System.DateTime)row["SumDate"])); 
+            CloseDate = CConvert.ToInt(row["CloseDate"],CloseDate); 
+
+        }
+
+        public string AddSql()
+        {
+            return $@"INSERT INTO S_Hotel(ID,Name,HotelDate,RoomCount,ZipCode,Prefecture,Address2,Address3,Address4,Tel,Fax,StartDate,CreateDate,SumDate,CloseDate) VALUES({ID},N'{Name}',{HotelDate.ToSqlValue()},{RoomCount},N'{ZipCode}',N'{Prefecture}',N'{Address2}',N'{Address3}',N'{Address4}',N'{Tel}',N'{Fax}',{StartDate},{CreateDate.ToSqlValue()},{SumDate.ToSqlValue()},{CloseDate});";
+        }
+
+        public string UpdateSql()
+        {
+            return $@"UPDATE S_Hotel SET Name = N'{Name}',HotelDate = {HotelDate.ToSqlValue()},RoomCount = {RoomCount},ZipCode = N'{ZipCode}',Prefecture = N'{Prefecture}',Address2 = N'{Address2}',Address3 = N'{Address3}',Address4 = N'{Address4}',Tel = N'{Tel}',Fax = N'{Fax}',StartDate = {StartDate},CreateDate = {CreateDate.ToSqlValue()},SumDate = {SumDate.ToSqlValue()},CloseDate = {CloseDate} WHERE ID = {ID};";
+        }
+
+        public string ToText()
+        {
+            StringBuilder text = new StringBuilder();
+            text.AppendFormat("ID={0};", ID);
+            text.AppendFormat("Name={0};", Name);
+            text.AppendFormat("HotelDate={0};", HotelDate);
+            text.AppendFormat("RoomCount={0};", RoomCount);
+            text.AppendFormat("ZipCode={0};", ZipCode);
+            text.AppendFormat("Prefecture={0};", Prefecture);
+            text.AppendFormat("Address2={0};", Address2);
+            text.AppendFormat("Address3={0};", Address3);
+            text.AppendFormat("Address4={0};", Address4);
+            text.AppendFormat("Tel={0};", Tel);
+            text.AppendFormat("Fax={0};", Fax);
+            text.AppendFormat("StartDate={0};", StartDate);
+            text.AppendFormat("CreateDate={0};", CreateDate);
+            text.AppendFormat("SumDate={0};", SumDate);
+            text.AppendFormat("CloseDate={0};", CloseDate);
+
+            return text.ToString();
+        }
+
+        public override object GetField(string name)
+        {
+
+            if (name == "ID") { return ID; }
+            else if (name == "Name") { return Name; }
+            else if (name == "HotelDate") { return HotelDate; }
+            else if (name == "RoomCount") { return RoomCount; }
+            else if (name == "ZipCode") { return ZipCode; }
+            else if (name == "Prefecture") { return Prefecture; }
+            else if (name == "Address2") { return Address2; }
+            else if (name == "Address3") { return Address3; }
+            else if (name == "Address4") { return Address4; }
+            else if (name == "Tel") { return Tel; }
+            else if (name == "Fax") { return Fax; }
+            else if (name == "StartDate") { return StartDate; }
+            else if (name == "CreateDate") { return CreateDate; }
+            else if (name == "SumDate") { return SumDate; }
+            else if (name == "CloseDate") { return CloseDate; }
+            else { return null; }
+        }
+
+        public override bool SetField(string name, object value)
+        {
+
+            if (name == "ID") { ID = CConvert.ToInt(value); return true; }
+            else if (name == "Name") { Name = value.ToString(); return true; }
+            else if (name == "HotelDate") { HotelDate = new Date(CConvert.ToDateInt(value)); return true; }
+            else if (name == "RoomCount") { RoomCount = CConvert.ToInt(value); return true; }
+            else if (name == "ZipCode") { ZipCode = value.ToString(); return true; }
+            else if (name == "Prefecture") { Prefecture = value.ToString(); return true; }
+            else if (name == "Address2") { Address2 = value.ToString(); return true; }
+            else if (name == "Address3") { Address3 = value.ToString(); return true; }
+            else if (name == "Address4") { Address4 = value.ToString(); return true; }
+            else if (name == "Tel") { Tel = value.ToString(); return true; }
+            else if (name == "Fax") { Fax = value.ToString(); return true; }
+            else if (name == "StartDate") { StartDate = CConvert.ToInt(value); return true; }
+            else if (name == "CreateDate") { CreateDate = new Date(CConvert.ToDateInt(value)); return true; }
+            else if (name == "SumDate") { SumDate = new Date(CConvert.ToDateInt(value)); return true; }
+            else if (name == "CloseDate") { CloseDate = CConvert.ToInt(value); return true; }
+            else { return false; }
+        }
+
+        #endregion
+    }
+}
\ No newline at end of file

--
Gitblit v1.10.0