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/RoomViewTab.cs | 177 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 177 insertions(+), 0 deletions(-)
diff --git a/ProtosExpan/Master/RoomViewTab.cs b/ProtosExpan/Master/RoomViewTab.cs
new file mode 100644
index 0000000..07b847e
--- /dev/null
+++ b/ProtosExpan/Master/RoomViewTab.cs
@@ -0,0 +1,177 @@
+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;
+using System.Data.Common;
+
+namespace HotelPms.Data.Master
+{
+ /// ****************************** Description *******************************
+ /// ◇システム名称
+ /// ホテルPMS
+ /// ◇概要
+ ///
+ /// ◇履歴
+ /// 2021/05/14 コード作成ツール 自動作成
+ /// ****************************** Declarations ******************************
+ [Serializable()]
+ public partial class RoomViewTab : 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(RoomViewTab item)
+ {
+ if (ID.CompareTo(item.ID) != 0
+ || Name.CompareTo(item.Name) != 0
+ || UpdateDate.CompareTo(item.UpdateDate) != 0
+ || UpdateLoginID.CompareTo(item.UpdateLoginID) != 0
+ || UpdatePcName.CompareTo(item.UpdatePcName) != 0
+ || UpdateID.CompareTo(item.UpdateID) != 0
+)
+ {
+ return false;
+ }
+ return true;
+ }
+
+
+ public override void CopyTo(object dest)
+ {
+ RoomViewTab item = dest as RoomViewTab;
+ item.ID = ID;
+ item.Name = Name;
+ item.UpdateDate = UpdateDate;
+ item.UpdateLoginID = UpdateLoginID;
+ item.UpdatePcName = UpdatePcName;
+ item.UpdateID = UpdateID;
+
+ }
+
+ public override void Clear()
+ {
+ ID = 0;
+ Name = string.Empty;
+ UpdateDate = CConvert.ToTimestamp(DateTime.MinValue);
+ UpdateLoginID = 0;
+ UpdatePcName = string.Empty;
+ UpdateID = 0;
+
+ }
+
+ public RoomViewTab DeepClone()
+ {
+ RoomViewTab item = new RoomViewTab();
+ item.ID = ID;
+ item.Name = Name;
+ item.UpdateDate = UpdateDate;
+ item.UpdateLoginID = UpdateLoginID;
+ item.UpdatePcName = UpdatePcName;
+ item.UpdateID = UpdateID;
+
+ return item;
+ }
+
+ public override bool ConvertDataRow(System.Data.DataRow row)
+ {
+ ID = CConvert.ToInt(row["ID"],ID);
+ Name = row["Name"].ToString();
+ UpdateDate = CConvert.ToTimestamp(row.IsNull("UpdateDate") ? DateTime.MinValue : (System.DateTime)row["UpdateDate"]);
+ UpdateLoginID = CConvert.ToInt(row["UpdateLoginID"],UpdateLoginID);
+ UpdatePcName = row["UpdatePcName"].ToString();
+ UpdateID = CConvert.ToInt(row["UpdateID"],UpdateID);
+
+ return true;
+ }
+
+ public void ToDataRow(System.Data.DataRow row)
+ {
+ row["ID"] = ID;
+ row["Name"] = Name;
+ row["UpdateDate"] = UpdateDate.ToDateTime();
+ row["UpdateLoginID"] = UpdateLoginID;
+ row["UpdatePcName"] = UpdatePcName;
+ row["UpdateID"] = UpdateID;
+
+ }
+
+ public void ConvertReader(DbDataReader row)
+ {
+ ID = CConvert.ToInt(row["ID"],ID);
+ Name = row["Name"].ToString();
+ UpdateDate = CConvert.ToTimestamp(row.IsNull("UpdateDate") ? DateTime.MinValue : (System.DateTime)row["UpdateDate"]);
+ UpdateLoginID = CConvert.ToInt(row["UpdateLoginID"],UpdateLoginID);
+ UpdatePcName = row["UpdatePcName"].ToString();
+ UpdateID = CConvert.ToInt(row["UpdateID"],UpdateID);
+
+ }
+
+ public string AddSql()
+ {
+ return $@"INSERT INTO M_RoomViewTab(ID,Name,UpdateDate,UpdateLoginID,UpdatePcName,UpdateID) VALUES({ID},N'{Name}',GETDATE(),{UpdateLoginID},N'{UpdatePcName}',{UpdateID});";
+ }
+
+ public string UpdateSql()
+ {
+ return $@"UPDATE M_RoomViewTab SET Name = N'{Name}',UpdateDate = GETDATE(),UpdateLoginID = {UpdateLoginID},UpdatePcName = N'{UpdatePcName}',UpdateID = {UpdateID} WHERE ID = {ID};";
+ }
+
+ public string ToText()
+ {
+ StringBuilder text = new StringBuilder();
+ text.AppendFormat("ID={0};", ID);
+ text.AppendFormat("Name={0};", Name);
+ text.AppendFormat("UpdateDate={0};", UpdateDate);
+ text.AppendFormat("UpdateLoginID={0};", UpdateLoginID);
+ text.AppendFormat("UpdatePcName={0};", UpdatePcName);
+ text.AppendFormat("UpdateID={0};", UpdateID);
+
+ return text.ToString();
+ }
+
+ public override object GetField(string name)
+ {
+
+ if (name == "ID") { return ID; }
+ else if (name == "Name") { return Name; }
+ else if (name == "UpdateDate") { return UpdateDate; }
+ else if (name == "UpdateLoginID") { return UpdateLoginID; }
+ else if (name == "UpdatePcName") { return UpdatePcName; }
+ else if (name == "UpdateID") { return UpdateID; }
+ 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 == "UpdateDate") { UpdateDate = CConvert.ToTimestamp(CConvert.ToDateTime(value)); return true; }
+ else if (name == "UpdateLoginID") { UpdateLoginID = CConvert.ToInt(value); return true; }
+ else if (name == "UpdatePcName") { UpdatePcName = value.ToString(); return true; }
+ else if (name == "UpdateID") { UpdateID = CConvert.ToInt(value); return true; }
+ else { return false; }
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
--
Gitblit v1.10.0