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.Data.Server/ProtosExpan/Master/ReportCol.cs | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 155 insertions(+), 0 deletions(-)
diff --git a/HotelPms.Data.Server/ProtosExpan/Master/ReportCol.cs b/HotelPms.Data.Server/ProtosExpan/Master/ReportCol.cs
new file mode 100644
index 0000000..da20b22
--- /dev/null
+++ b/HotelPms.Data.Server/ProtosExpan/Master/ReportCol.cs
@@ -0,0 +1,155 @@
+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;
+
+namespace HotelPms.Data.Master
+{
+ /// ****************************** Description *******************************
+ /// ◇システム名称
+ /// ホテルPMS
+ /// ◇概要
+ ///
+ /// ◇履歴
+ /// 2021/07/02 コード作成ツール 自動作成
+ /// ****************************** Declarations ******************************
+ [Serializable()]
+ public partial class ReportCol : RecordBase
+ {
+ #region ★★★★★ Property ★★★★★
+
+ public static ConcurrentDictionary<string, int> PrimaryKey { get; } = new ConcurrentDictionary<string, int>();
+
+ #endregion
+
+ partial void OnConstruction()
+ {
+ if (PrimaryKey.Count == 0)
+ {
+ PrimaryKey.TryAdd("SystemID", 0);
+ PrimaryKey.TryAdd("ReportID", 0);
+ PrimaryKey.TryAdd("ID", 0);
+
+ }
+ }
+
+ #region ★★★★★ Function ★★★★★
+
+
+ public override void CopyTo(object dest)
+ {
+ ReportCol item = dest as ReportCol;
+ item.SystemID = SystemID;
+ item.ReportID = ReportID;
+ item.ID = ID;
+ item.Name = Name;
+ item.Type = Type;
+ item.DispName = DispName;
+
+ }
+
+ public override void Clear()
+ {
+ SystemID = 0;
+ ReportID = 0;
+ ID = 0;
+ Name = string.Empty;
+ Type = 0;
+ DispName = string.Empty;
+
+ }
+
+ public ReportCol DeepClone()
+ {
+ ReportCol item = new ReportCol();
+ item.SystemID = SystemID;
+ item.ReportID = ReportID;
+ item.ID = ID;
+ item.Name = Name;
+ item.Type = Type;
+ item.DispName = DispName;
+
+ return item;
+ }
+
+ private Timestamp ToTimestamp(DateTime dateTime)
+ {
+ return Timestamp.FromDateTime(DateTime.SpecifyKind(dateTime, DateTimeKind.Utc));
+ }
+
+ public override bool ConvertDataRow(System.Data.DataRow row)
+ {
+ SystemID = CConvert.ToInt(row["SystemID"],SystemID);
+ ReportID = CConvert.ToInt(row["ReportID"],ReportID);
+ ID = CConvert.ToInt(row["ID"],ID);
+ Name = row["Name"].ToString();
+ Type = CConvert.ToInt(row["Type"],Type);
+ DispName = row["DispName"].ToString();
+
+ return true;
+ }
+
+ public void ToDataRow(System.Data.DataRow row)
+ {
+ row["SystemID"] = SystemID;
+ row["ReportID"] = ReportID;
+ row["ID"] = ID;
+ row["Name"] = Name;
+ row["Type"] = Type;
+ row["DispName"] = DispName;
+
+ }
+
+ public void ConvertReader(SqlDataReader row)
+ {
+ SystemID = CConvert.ToInt(row["SystemID"],SystemID);
+ ReportID = CConvert.ToInt(row["ReportID"],ReportID);
+ ID = CConvert.ToInt(row["ID"],ID);
+ Name = row["Name"].ToString();
+ Type = CConvert.ToInt(row["Type"],Type);
+ DispName = row["DispName"].ToString();
+
+ }
+
+ public string AddSql()
+ {
+ return $@"INSERT INTO S_ReportCol(SystemID,ReportID,ID,Name,Type,DispName) VALUES({SystemID},{ReportID},{ID},N'{Name}',{Type},N'{DispName}');";
+ }
+
+ public string UpdateSql()
+ {
+ return $@"UPDATE S_ReportCol SET Name = N'{Name}',Type = {Type},DispName = N'{DispName}' WHERE SystemID = {SystemID},ReportID = {ReportID},ID = {ID};";
+ }
+
+ public string ToText()
+ {
+ StringBuilder text = new StringBuilder();
+ text.AppendFormat("SystemID={0};", SystemID);
+ text.AppendFormat("ReportID={0};", ReportID);
+ text.AppendFormat("ID={0};", ID);
+ text.AppendFormat("Name={0};", Name);
+ text.AppendFormat("Type={0};", Type);
+ text.AppendFormat("DispName={0};", DispName);
+
+ return text.ToString();
+ }
+
+ public override object GetField(string name)
+ {
+
+ if (name.ToLower() == "SystemID".ToLower()) { return SystemID; }
+ else if (name.ToLower() == "ReportID".ToLower()) { return ReportID; }
+ else if (name.ToLower() == "ID".ToLower()) { return ID; }
+ else if (name.ToLower() == "Name".ToLower()) { return Name; }
+ else if (name.ToLower() == "Type".ToLower()) { return Type; }
+ else if (name.ToLower() == "DispName".ToLower()) { return DispName; }
+ else { return null; }
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
--
Gitblit v1.10.0