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 Item : 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(Item item)
|
{
|
if (ID.CompareTo(item.ID) != 0
|
|| Name.CompareTo(item.Name) != 0
|
|| EnName.CompareTo(item.EnName) != 0
|
|| Name2.CompareTo(item.Name2) != 0
|
|| ReceiptName.CompareTo(item.ReceiptName) != 0
|
|| RoomTypeID.CompareTo(item.RoomTypeID) != 0
|
|| PersonCount.CompareTo(item.PersonCount) != 0
|
|| Price.CompareTo(item.Price) != 0
|
|| DiscountRate.CompareTo(item.DiscountRate) != 0
|
|| DiscountSummary.CompareTo(item.DiscountSummary) != 0
|
|| DiscountID.CompareTo(item.DiscountID) != 0
|
|| ServiceIOType.CompareTo(item.ServiceIOType) != 0
|
|| ServiceRate.CompareTo(item.ServiceRate) != 0
|
|| TaxType.CompareTo(item.TaxType) != 0
|
|| TaxIOType.CompareTo(item.TaxIOType) != 0
|
|| BathTaxIOType.CompareTo(item.BathTaxIOType) != 0
|
|| AccTaxIOType.CompareTo(item.AccTaxIOType) != 0
|
|| SaleSectionID.CompareTo(item.SaleSectionID) != 0
|
|| SumSectionID.CompareTo(item.SumSectionID) != 0
|
|| Kind.CompareTo(item.Kind) != 0
|
|| NextDay.CompareTo(item.NextDay) != 0
|
|| AgentID.CompareTo(item.AgentID) != 0
|
|| AgentBranchID.CompareTo(item.AgentBranchID) != 0
|
|| PointFlg.CompareTo(item.PointFlg) != 0
|
|| PointInTax.CompareTo(item.PointInTax) != 0
|
|| PointRate.CompareTo(item.PointRate) != 0
|
|| PointPrice.CompareTo(item.PointPrice) != 0
|
|| PointSumType.CompareTo(item.PointSumType) != 0
|
|| Point.CompareTo(item.Point) != 0
|
|| DayUse.CompareTo(item.DayUse) != 0
|
|| ReceiptPrtType.CompareTo(item.ReceiptPrtType) != 0
|
|| LongStayFlg.CompareTo(item.LongStayFlg) != 0
|
|| RentalType.CompareTo(item.RentalType) != 0
|
|| TraderID.CompareTo(item.TraderID) != 0
|
|| TraderMemo.CompareTo(item.TraderMemo) != 0
|
|| PackFlg.CompareTo(item.PackFlg) != 0
|
|| SortID.CompareTo(item.SortID) != 0
|
|| Fraction.CompareTo(item.Fraction) != 0
|
|| InRoomSales.CompareTo(item.InRoomSales) != 0
|
|| MealType.CompareTo(item.MealType) != 0
|
|| UseType.CompareTo(item.UseType) != 0
|
|| PersonType.CompareTo(item.PersonType) != 0
|
|| Parking.CompareTo(item.Parking) != 0
|
|| HallFee.CompareTo(item.HallFee) != 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)
|
{
|
Item item = dest as Item;
|
item.ID = ID;
|
item.Name = Name;
|
item.EnName = EnName;
|
item.Name2 = Name2;
|
item.ReceiptName = ReceiptName;
|
item.RoomTypeID = RoomTypeID;
|
item.PersonCount = PersonCount;
|
item.Price = Price;
|
item.DiscountRate = DiscountRate;
|
item.DiscountSummary = DiscountSummary;
|
item.DiscountID = DiscountID;
|
item.ServiceIOType = ServiceIOType;
|
item.ServiceRate = ServiceRate;
|
item.TaxType = TaxType;
|
item.TaxIOType = TaxIOType;
|
item.BathTaxIOType = BathTaxIOType;
|
item.AccTaxIOType = AccTaxIOType;
|
item.SaleSectionID = SaleSectionID;
|
item.SumSectionID = SumSectionID;
|
item.Kind = Kind;
|
item.NextDay = NextDay;
|
item.AgentID = AgentID;
|
item.AgentBranchID = AgentBranchID;
|
item.PointFlg = PointFlg;
|
item.PointInTax = PointInTax;
|
item.PointRate = PointRate;
|
item.PointPrice = PointPrice;
|
item.PointSumType = PointSumType;
|
item.Point = Point;
|
item.DayUse = DayUse;
|
item.ReceiptPrtType = ReceiptPrtType;
|
item.LongStayFlg = LongStayFlg;
|
item.RentalType = RentalType;
|
item.TraderID = TraderID;
|
item.TraderMemo = TraderMemo;
|
item.PackFlg = PackFlg;
|
item.SortID = SortID;
|
item.Fraction = Fraction;
|
item.InRoomSales = InRoomSales;
|
item.MealType = MealType;
|
item.UseType = UseType;
|
item.PersonType = PersonType;
|
item.Parking = Parking;
|
item.HallFee = HallFee;
|
item.UpdateDate = UpdateDate;
|
item.UpdateLoginID = UpdateLoginID;
|
item.UpdatePcName = UpdatePcName;
|
item.UpdateID = UpdateID;
|
|
}
|
|
public override void Clear()
|
{
|
ID = string.Empty;
|
Name = string.Empty;
|
EnName = string.Empty;
|
Name2 = string.Empty;
|
ReceiptName = string.Empty;
|
RoomTypeID = 0;
|
PersonCount = 0;
|
Price = 0;
|
DiscountRate = 0;
|
DiscountSummary = 0;
|
DiscountID = 0;
|
ServiceIOType = 0;
|
ServiceRate = 0;
|
TaxType = 0;
|
TaxIOType = 0;
|
BathTaxIOType = 0;
|
AccTaxIOType = 0;
|
SaleSectionID = 0;
|
SumSectionID = 0;
|
Kind = 0;
|
NextDay = false;
|
AgentID = 0;
|
AgentBranchID = 0;
|
PointFlg = false;
|
PointInTax = false;
|
PointRate = 0;
|
PointPrice = 0;
|
PointSumType = 0;
|
Point = 0;
|
DayUse = false;
|
ReceiptPrtType = 0;
|
LongStayFlg = false;
|
RentalType = 0;
|
TraderID = 0;
|
TraderMemo = string.Empty;
|
PackFlg = false;
|
SortID = 0;
|
Fraction = 0;
|
InRoomSales = false;
|
MealType = 0;
|
UseType = 0;
|
PersonType = 0;
|
Parking = false;
|
HallFee = false;
|
UpdateDate = CConvert.ToTimestamp(DateTime.MinValue);
|
UpdateLoginID = 0;
|
UpdatePcName = string.Empty;
|
UpdateID = 0;
|
|
}
|
|
public Item DeepClone()
|
{
|
Item item = new Item();
|
item.ID = ID;
|
item.Name = Name;
|
item.EnName = EnName;
|
item.Name2 = Name2;
|
item.ReceiptName = ReceiptName;
|
item.RoomTypeID = RoomTypeID;
|
item.PersonCount = PersonCount;
|
item.Price = Price;
|
item.DiscountRate = DiscountRate;
|
item.DiscountSummary = DiscountSummary;
|
item.DiscountID = DiscountID;
|
item.ServiceIOType = ServiceIOType;
|
item.ServiceRate = ServiceRate;
|
item.TaxType = TaxType;
|
item.TaxIOType = TaxIOType;
|
item.BathTaxIOType = BathTaxIOType;
|
item.AccTaxIOType = AccTaxIOType;
|
item.SaleSectionID = SaleSectionID;
|
item.SumSectionID = SumSectionID;
|
item.Kind = Kind;
|
item.NextDay = NextDay;
|
item.AgentID = AgentID;
|
item.AgentBranchID = AgentBranchID;
|
item.PointFlg = PointFlg;
|
item.PointInTax = PointInTax;
|
item.PointRate = PointRate;
|
item.PointPrice = PointPrice;
|
item.PointSumType = PointSumType;
|
item.Point = Point;
|
item.DayUse = DayUse;
|
item.ReceiptPrtType = ReceiptPrtType;
|
item.LongStayFlg = LongStayFlg;
|
item.RentalType = RentalType;
|
item.TraderID = TraderID;
|
item.TraderMemo = TraderMemo;
|
item.PackFlg = PackFlg;
|
item.SortID = SortID;
|
item.Fraction = Fraction;
|
item.InRoomSales = InRoomSales;
|
item.MealType = MealType;
|
item.UseType = UseType;
|
item.PersonType = PersonType;
|
item.Parking = Parking;
|
item.HallFee = HallFee;
|
item.UpdateDate = UpdateDate;
|
item.UpdateLoginID = UpdateLoginID;
|
item.UpdatePcName = UpdatePcName;
|
item.UpdateID = UpdateID;
|
|
return item;
|
}
|
|
public override bool ConvertDataRow(System.Data.DataRow row)
|
{
|
ID = row["ID"].ToString();
|
Name = row["Name"].ToString();
|
EnName = row["EnName"].ToString();
|
Name2 = row["Name2"].ToString();
|
ReceiptName = row["ReceiptName"].ToString();
|
RoomTypeID = CConvert.ToInt(row["RoomTypeID"],RoomTypeID);
|
PersonCount = CConvert.ToInt(row["PersonCount"],PersonCount);
|
Price = CConvert.ToDecimal(row["Price"]);
|
DiscountRate = CConvert.ToDecimal(row["DiscountRate"]);
|
DiscountSummary = CConvert.ToDecimal(row["DiscountSummary"]);
|
DiscountID = CConvert.ToInt(row["DiscountID"],DiscountID);
|
ServiceIOType = CConvert.ToInt(row["ServiceIOType"],ServiceIOType);
|
ServiceRate = CConvert.ToDecimal(row["ServiceRate"]);
|
TaxType = CConvert.ToInt(row["TaxType"],TaxType);
|
TaxIOType = CConvert.ToInt(row["TaxIOType"],TaxIOType);
|
BathTaxIOType = CConvert.ToInt(row["BathTaxIOType"],BathTaxIOType);
|
AccTaxIOType = CConvert.ToInt(row["AccTaxIOType"],AccTaxIOType);
|
SaleSectionID = CConvert.ToInt(row["SaleSectionID"],SaleSectionID);
|
SumSectionID = CConvert.ToInt(row["SumSectionID"],SumSectionID);
|
Kind = CConvert.ToInt(row["Kind"],Kind);
|
NextDay = CConvert.ToBool(row["NextDay"]);
|
AgentID = CConvert.ToInt(row["AgentID"],AgentID);
|
AgentBranchID = CConvert.ToInt(row["AgentBranchID"],AgentBranchID);
|
PointFlg = CConvert.ToBool(row["PointFlg"]);
|
PointInTax = CConvert.ToBool(row["PointInTax"]);
|
PointRate = CConvert.ToDecimal(row["PointRate"]);
|
PointPrice = CConvert.ToInt(row["PointPrice"],PointPrice);
|
PointSumType = CConvert.ToInt(row["PointSumType"],PointSumType);
|
Point = CConvert.ToInt(row["Point"],Point);
|
DayUse = CConvert.ToBool(row["DayUse"]);
|
ReceiptPrtType = CConvert.ToInt(row["ReceiptPrtType"],ReceiptPrtType);
|
LongStayFlg = CConvert.ToBool(row["LongStayFlg"]);
|
RentalType = CConvert.ToInt(row["RentalType"],RentalType);
|
TraderID = CConvert.ToInt(row["TraderID"],TraderID);
|
TraderMemo = row["TraderMemo"].ToString();
|
PackFlg = CConvert.ToBool(row["PackFlg"]);
|
SortID = CConvert.ToInt(row["SortID"],SortID);
|
Fraction = CConvert.ToInt(row["Fraction"],Fraction);
|
InRoomSales = CConvert.ToBool(row["InRoomSales"]);
|
MealType = CConvert.ToInt(row["MealType"],MealType);
|
UseType = CConvert.ToInt(row["UseType"],UseType);
|
PersonType = CConvert.ToInt(row["PersonType"],PersonType);
|
Parking = CConvert.ToBool(row["Parking"]);
|
HallFee = CConvert.ToBool(row["HallFee"]);
|
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["EnName"] = EnName;
|
row["Name2"] = Name2;
|
row["ReceiptName"] = ReceiptName;
|
row["RoomTypeID"] = RoomTypeID;
|
row["PersonCount"] = PersonCount;
|
row["Price"] = Price.ToDecimal();
|
row["DiscountRate"] = DiscountRate.ToDecimal();
|
row["DiscountSummary"] = DiscountSummary.ToDecimal();
|
row["DiscountID"] = DiscountID;
|
row["ServiceIOType"] = ServiceIOType;
|
row["ServiceRate"] = ServiceRate.ToDecimal();
|
row["TaxType"] = TaxType;
|
row["TaxIOType"] = TaxIOType;
|
row["BathTaxIOType"] = BathTaxIOType;
|
row["AccTaxIOType"] = AccTaxIOType;
|
row["SaleSectionID"] = SaleSectionID;
|
row["SumSectionID"] = SumSectionID;
|
row["Kind"] = Kind;
|
row["NextDay"] = NextDay;
|
row["AgentID"] = AgentID;
|
row["AgentBranchID"] = AgentBranchID;
|
row["PointFlg"] = PointFlg;
|
row["PointInTax"] = PointInTax;
|
row["PointRate"] = PointRate.ToDecimal();
|
row["PointPrice"] = PointPrice;
|
row["PointSumType"] = PointSumType;
|
row["Point"] = Point;
|
row["DayUse"] = DayUse;
|
row["ReceiptPrtType"] = ReceiptPrtType;
|
row["LongStayFlg"] = LongStayFlg;
|
row["RentalType"] = RentalType;
|
row["TraderID"] = TraderID;
|
row["TraderMemo"] = TraderMemo;
|
row["PackFlg"] = PackFlg;
|
row["SortID"] = SortID;
|
row["Fraction"] = Fraction;
|
row["InRoomSales"] = InRoomSales;
|
row["MealType"] = MealType;
|
row["UseType"] = UseType;
|
row["PersonType"] = PersonType;
|
row["Parking"] = Parking;
|
row["HallFee"] = HallFee;
|
row["UpdateDate"] = UpdateDate.ToDateTime();
|
row["UpdateLoginID"] = UpdateLoginID;
|
row["UpdatePcName"] = UpdatePcName;
|
row["UpdateID"] = UpdateID;
|
|
}
|
|
public void ConvertReader(DbDataReader row)
|
{
|
int i = 0;
|
ID = (row.IsDBNull(i) ? string.Empty : row.GetString(i)); i++;
|
Name = (row.IsDBNull(i) ? string.Empty : row.GetString(i)); i++;
|
EnName = (row.IsDBNull(i) ? string.Empty : row.GetString(i)); i++;
|
Name2 = (row.IsDBNull(i) ? string.Empty : row.GetString(i)); i++;
|
ReceiptName = (row.IsDBNull(i) ? string.Empty : row.GetString(i)); i++;
|
RoomTypeID = (int)(row.IsDBNull(i) ? 0 : row.GetInt16(i)); i++;
|
PersonCount = (int)(row.IsDBNull(i) ? 0 : row.GetInt16(i)); i++;
|
Price = (decimal)(row.IsDBNull(i) ? 0M : row.GetDecimal(i)); i++;
|
DiscountRate = (decimal)(row.IsDBNull(i) ? 0M : row.GetDecimal(i)); i++;
|
DiscountSummary = (decimal)(row.IsDBNull(i) ? 0M : row.GetDecimal(i)); i++;
|
DiscountID = (int)(row.IsDBNull(i) ? 0 : row.GetInt32(i)); i++;
|
ServiceIOType = (byte)(row.IsDBNull(i) ? 0x00 : row.GetByte(i)); i++;
|
ServiceRate = (decimal)(row.IsDBNull(i) ? 0M : row.GetDecimal(i)); i++;
|
TaxType = (byte)(row.IsDBNull(i) ? 0x00 : row.GetByte(i)); i++;
|
TaxIOType = (byte)(row.IsDBNull(i) ? 0x00 : row.GetByte(i)); i++;
|
BathTaxIOType = (byte)(row.IsDBNull(i) ? 0x00 : row.GetByte(i)); i++;
|
AccTaxIOType = (byte)(row.IsDBNull(i) ? 0x00 : row.GetByte(i)); i++;
|
SaleSectionID = (int)(row.IsDBNull(i) ? 0 : row.GetInt16(i)); i++;
|
SumSectionID = (int)(row.IsDBNull(i) ? 0 : row.GetInt16(i)); i++;
|
Kind = (byte)(row.IsDBNull(i) ? 0x00 : row.GetByte(i)); i++;
|
NextDay = (bool)(row.IsDBNull(i) ? false : row.GetBoolean(i)); i++;
|
AgentID = (int)(row.IsDBNull(i) ? 0 : row.GetInt32(i)); i++;
|
AgentBranchID = (int)(row.IsDBNull(i) ? 0 : row.GetInt32(i)); i++;
|
PointFlg = (bool)(row.IsDBNull(i) ? false : row.GetBoolean(i)); i++;
|
PointInTax = (bool)(row.IsDBNull(i) ? false : row.GetBoolean(i)); i++;
|
PointRate = (decimal)(row.IsDBNull(i) ? 0M : row.GetDecimal(i)); i++;
|
PointPrice = (int)(row.IsDBNull(i) ? 0 : row.GetInt32(i)); i++;
|
PointSumType = (byte)(row.IsDBNull(i) ? 0x00 : row.GetByte(i)); i++;
|
Point = (int)(row.IsDBNull(i) ? 0 : row.GetInt32(i)); i++;
|
DayUse = (bool)(row.IsDBNull(i) ? false : row.GetBoolean(i)); i++;
|
ReceiptPrtType = (byte)(row.IsDBNull(i) ? 0x00 : row.GetByte(i)); i++;
|
LongStayFlg = (bool)(row.IsDBNull(i) ? false : row.GetBoolean(i)); i++;
|
RentalType = (byte)(row.IsDBNull(i) ? 0x00 : row.GetByte(i)); i++;
|
TraderID = (int)(row.IsDBNull(i) ? 0 : row.GetInt32(i)); i++;
|
TraderMemo = (row.IsDBNull(i) ? string.Empty : row.GetString(i)); i++;
|
PackFlg = (bool)(row.IsDBNull(i) ? false : row.GetBoolean(i)); i++;
|
SortID = (int)(row.IsDBNull(i) ? 0 : row.GetInt32(i)); i++;
|
Fraction = (byte)(row.IsDBNull(i) ? 0x00 : row.GetByte(i)); i++;
|
InRoomSales = (bool)(row.IsDBNull(i) ? false : row.GetBoolean(i)); i++;
|
MealType = (byte)(row.IsDBNull(i) ? 0x00 : row.GetByte(i)); i++;
|
UseType = (byte)(row.IsDBNull(i) ? 0x00 : row.GetByte(i)); i++;
|
PersonType = (byte)(row.IsDBNull(i) ? 0x00 : row.GetByte(i)); i++;
|
Parking = (bool)(row.IsDBNull(i) ? false : row.GetBoolean(i)); i++;
|
HallFee = (bool)(row.IsDBNull(i) ? false : row.GetBoolean(i)); i++;
|
UpdateDate = CConvert.ToTimestamp(row.IsDBNull(i) ? DateTime.MinValue : row.GetDateTime(i)); i++;
|
UpdateLoginID = (int)(row.IsDBNull(i) ? 0 : row.GetInt32(i)); i++;
|
UpdatePcName = (row.IsDBNull(i) ? string.Empty : row.GetString(i)); i++;
|
UpdateID = (int)(row.IsDBNull(i) ? 0 : row.GetInt32(i)); i++;
|
|
}
|
|
public string AddSql()
|
{
|
return $@"INSERT INTO M_Item(ID,Name,EnName,Name2,ReceiptName,RoomTypeID,PersonCount,Price,DiscountRate,DiscountSummary,DiscountID,ServiceIOType,ServiceRate,TaxType,TaxIOType,BathTaxIOType,AccTaxIOType,SaleSectionID,SumSectionID,Kind,NextDay,AgentID,AgentBranchID,PointFlg,PointInTax,PointRate,PointPrice,PointSumType,Point,DayUse,ReceiptPrtType,LongStayFlg,RentalType,TraderID,TraderMemo,PackFlg,SortID,Fraction,InRoomSales,MealType,UseType,PersonType,Parking,HallFee,UpdateDate,UpdateLoginID,UpdatePcName,UpdateID) VALUES(N'{ID}',N'{Name}',N'{EnName}',N'{Name2}',N'{ReceiptName}',{RoomTypeID},{PersonCount},{(Price == null ? "0" : Price.ToSqlValue())},{(DiscountRate == null ? "0" : DiscountRate.ToSqlValue())},{(DiscountSummary == null ? "0" : DiscountSummary.ToSqlValue())},{DiscountID},{ServiceIOType},{(ServiceRate == null ? "0" : ServiceRate.ToSqlValue())},{TaxType},{TaxIOType},{BathTaxIOType},{AccTaxIOType},{SaleSectionID},{SumSectionID},{Kind},{(NextDay ? 1 : 0)},{AgentID},{AgentBranchID},{(PointFlg ? 1 : 0)},{(PointInTax ? 1 : 0)},{(PointRate == null ? "0" : PointRate.ToSqlValue())},{PointPrice},{PointSumType},{Point},{(DayUse ? 1 : 0)},{ReceiptPrtType},{(LongStayFlg ? 1 : 0)},{RentalType},{TraderID},N'{TraderMemo}',{(PackFlg ? 1 : 0)},{SortID},{Fraction},{(InRoomSales ? 1 : 0)},{MealType},{UseType},{PersonType},{(Parking ? 1 : 0)},{(HallFee ? 1 : 0)},GETDATE(),{UpdateLoginID},N'{UpdatePcName}',{UpdateID});";
|
}
|
|
public string UpdateSql()
|
{
|
return $@"UPDATE M_Item SET Name = N'{Name}',EnName = N'{EnName}',Name2 = N'{Name2}',ReceiptName = N'{ReceiptName}',RoomTypeID = {RoomTypeID},PersonCount = {PersonCount},Price = {(Price == null ? "0" : Price.ToSqlValue())},DiscountRate = {(DiscountRate == null ? "0" : DiscountRate.ToSqlValue())},DiscountSummary = {(DiscountSummary == null ? "0" : DiscountSummary.ToSqlValue())},DiscountID = {DiscountID},ServiceIOType = {ServiceIOType},ServiceRate = {(ServiceRate == null ? "0" : ServiceRate.ToSqlValue())},TaxType = {TaxType},TaxIOType = {TaxIOType},BathTaxIOType = {BathTaxIOType},AccTaxIOType = {AccTaxIOType},SaleSectionID = {SaleSectionID},SumSectionID = {SumSectionID},Kind = {Kind},NextDay = {(NextDay ? 1 : 0)},AgentID = {AgentID},AgentBranchID = {AgentBranchID},PointFlg = {(PointFlg ? 1 : 0)},PointInTax = {(PointInTax ? 1 : 0)},PointRate = {(PointRate == null ? "0" : PointRate.ToSqlValue())},PointPrice = {PointPrice},PointSumType = {PointSumType},Point = {Point},DayUse = {(DayUse ? 1 : 0)},ReceiptPrtType = {ReceiptPrtType},LongStayFlg = {(LongStayFlg ? 1 : 0)},RentalType = {RentalType},TraderID = {TraderID},TraderMemo = N'{TraderMemo}',PackFlg = {(PackFlg ? 1 : 0)},SortID = {SortID},Fraction = {Fraction},InRoomSales = {(InRoomSales ? 1 : 0)},MealType = {MealType},UseType = {UseType},PersonType = {PersonType},Parking = {(Parking ? 1 : 0)},HallFee = {(HallFee ? 1 : 0)},UpdateDate = GETDATE(),UpdateLoginID = {UpdateLoginID},UpdatePcName = N'{UpdatePcName}',UpdateID = {UpdateID} WHERE ID = N'{ID}';";
|
}
|
|
public string ToText()
|
{
|
StringBuilder text = new StringBuilder();
|
text.AppendFormat("ID={0};", ID);
|
text.AppendFormat("Name={0};", Name);
|
text.AppendFormat("EnName={0};", EnName);
|
text.AppendFormat("Name2={0};", Name2);
|
text.AppendFormat("ReceiptName={0};", ReceiptName);
|
text.AppendFormat("RoomTypeID={0};", RoomTypeID);
|
text.AppendFormat("PersonCount={0};", PersonCount);
|
text.AppendFormat("Price={0};", Price);
|
text.AppendFormat("DiscountRate={0};", DiscountRate);
|
text.AppendFormat("DiscountSummary={0};", DiscountSummary);
|
text.AppendFormat("DiscountID={0};", DiscountID);
|
text.AppendFormat("ServiceIOType={0};", ServiceIOType);
|
text.AppendFormat("ServiceRate={0};", ServiceRate);
|
text.AppendFormat("TaxType={0};", TaxType);
|
text.AppendFormat("TaxIOType={0};", TaxIOType);
|
text.AppendFormat("BathTaxIOType={0};", BathTaxIOType);
|
text.AppendFormat("AccTaxIOType={0};", AccTaxIOType);
|
text.AppendFormat("SaleSectionID={0};", SaleSectionID);
|
text.AppendFormat("SumSectionID={0};", SumSectionID);
|
text.AppendFormat("Kind={0};", Kind);
|
text.AppendFormat("NextDay={0};", NextDay);
|
text.AppendFormat("AgentID={0};", AgentID);
|
text.AppendFormat("AgentBranchID={0};", AgentBranchID);
|
text.AppendFormat("PointFlg={0};", PointFlg);
|
text.AppendFormat("PointInTax={0};", PointInTax);
|
text.AppendFormat("PointRate={0};", PointRate);
|
text.AppendFormat("PointPrice={0};", PointPrice);
|
text.AppendFormat("PointSumType={0};", PointSumType);
|
text.AppendFormat("Point={0};", Point);
|
text.AppendFormat("DayUse={0};", DayUse);
|
text.AppendFormat("ReceiptPrtType={0};", ReceiptPrtType);
|
text.AppendFormat("LongStayFlg={0};", LongStayFlg);
|
text.AppendFormat("RentalType={0};", RentalType);
|
text.AppendFormat("TraderID={0};", TraderID);
|
text.AppendFormat("TraderMemo={0};", TraderMemo);
|
text.AppendFormat("PackFlg={0};", PackFlg);
|
text.AppendFormat("SortID={0};", SortID);
|
text.AppendFormat("Fraction={0};", Fraction);
|
text.AppendFormat("InRoomSales={0};", InRoomSales);
|
text.AppendFormat("MealType={0};", MealType);
|
text.AppendFormat("UseType={0};", UseType);
|
text.AppendFormat("PersonType={0};", PersonType);
|
text.AppendFormat("Parking={0};", Parking);
|
text.AppendFormat("HallFee={0};", HallFee);
|
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 == "EnName") { return EnName; }
|
else if (name == "Name2") { return Name2; }
|
else if (name == "ReceiptName") { return ReceiptName; }
|
else if (name == "RoomTypeID") { return RoomTypeID; }
|
else if (name == "PersonCount") { return PersonCount; }
|
else if (name == "Price") { return Price; }
|
else if (name == "DiscountRate") { return DiscountRate; }
|
else if (name == "DiscountSummary") { return DiscountSummary; }
|
else if (name == "DiscountID") { return DiscountID; }
|
else if (name == "ServiceIOType") { return ServiceIOType; }
|
else if (name == "ServiceRate") { return ServiceRate; }
|
else if (name == "TaxType") { return TaxType; }
|
else if (name == "TaxIOType") { return TaxIOType; }
|
else if (name == "BathTaxIOType") { return BathTaxIOType; }
|
else if (name == "AccTaxIOType") { return AccTaxIOType; }
|
else if (name == "SaleSectionID") { return SaleSectionID; }
|
else if (name == "SumSectionID") { return SumSectionID; }
|
else if (name == "Kind") { return Kind; }
|
else if (name == "NextDay") { return NextDay; }
|
else if (name == "AgentID") { return AgentID; }
|
else if (name == "AgentBranchID") { return AgentBranchID; }
|
else if (name == "PointFlg") { return PointFlg; }
|
else if (name == "PointInTax") { return PointInTax; }
|
else if (name == "PointRate") { return PointRate; }
|
else if (name == "PointPrice") { return PointPrice; }
|
else if (name == "PointSumType") { return PointSumType; }
|
else if (name == "Point") { return Point; }
|
else if (name == "DayUse") { return DayUse; }
|
else if (name == "ReceiptPrtType") { return ReceiptPrtType; }
|
else if (name == "LongStayFlg") { return LongStayFlg; }
|
else if (name == "RentalType") { return RentalType; }
|
else if (name == "TraderID") { return TraderID; }
|
else if (name == "TraderMemo") { return TraderMemo; }
|
else if (name == "PackFlg") { return PackFlg; }
|
else if (name == "SortID") { return SortID; }
|
else if (name == "Fraction") { return Fraction; }
|
else if (name == "InRoomSales") { return InRoomSales; }
|
else if (name == "MealType") { return MealType; }
|
else if (name == "UseType") { return UseType; }
|
else if (name == "PersonType") { return PersonType; }
|
else if (name == "Parking") { return Parking; }
|
else if (name == "HallFee") { return HallFee; }
|
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 = value.ToString(); return true; }
|
else if (name == "Name") { Name = value.ToString(); return true; }
|
else if (name == "EnName") { EnName = value.ToString(); return true; }
|
else if (name == "Name2") { Name2 = value.ToString(); return true; }
|
else if (name == "ReceiptName") { ReceiptName = value.ToString(); return true; }
|
else if (name == "RoomTypeID") { RoomTypeID = CConvert.ToInt(value); return true; }
|
else if (name == "PersonCount") { PersonCount = CConvert.ToInt(value); return true; }
|
else if (name == "Price") { Price = CConvert.ToDecimal(value); return true; }
|
else if (name == "DiscountRate") { DiscountRate = CConvert.ToDecimal(value); return true; }
|
else if (name == "DiscountSummary") { DiscountSummary = CConvert.ToDecimal(value); return true; }
|
else if (name == "DiscountID") { DiscountID = CConvert.ToInt(value); return true; }
|
else if (name == "ServiceIOType") { ServiceIOType = CConvert.ToInt(value); return true; }
|
else if (name == "ServiceRate") { ServiceRate = CConvert.ToDecimal(value); return true; }
|
else if (name == "TaxType") { TaxType = CConvert.ToInt(value); return true; }
|
else if (name == "TaxIOType") { TaxIOType = CConvert.ToInt(value); return true; }
|
else if (name == "BathTaxIOType") { BathTaxIOType = CConvert.ToInt(value); return true; }
|
else if (name == "AccTaxIOType") { AccTaxIOType = CConvert.ToInt(value); return true; }
|
else if (name == "SaleSectionID") { SaleSectionID = CConvert.ToInt(value); return true; }
|
else if (name == "SumSectionID") { SumSectionID = CConvert.ToInt(value); return true; }
|
else if (name == "Kind") { Kind = CConvert.ToInt(value); return true; }
|
else if (name == "NextDay") { NextDay = CConvert.ToBool(value); return true; }
|
else if (name == "AgentID") { AgentID = CConvert.ToInt(value); return true; }
|
else if (name == "AgentBranchID") { AgentBranchID = CConvert.ToInt(value); return true; }
|
else if (name == "PointFlg") { PointFlg = CConvert.ToBool(value); return true; }
|
else if (name == "PointInTax") { PointInTax = CConvert.ToBool(value); return true; }
|
else if (name == "PointRate") { PointRate = CConvert.ToDecimal(value); return true; }
|
else if (name == "PointPrice") { PointPrice = CConvert.ToInt(value); return true; }
|
else if (name == "PointSumType") { PointSumType = CConvert.ToInt(value); return true; }
|
else if (name == "Point") { Point = CConvert.ToInt(value); return true; }
|
else if (name == "DayUse") { DayUse = CConvert.ToBool(value); return true; }
|
else if (name == "ReceiptPrtType") { ReceiptPrtType = CConvert.ToInt(value); return true; }
|
else if (name == "LongStayFlg") { LongStayFlg = CConvert.ToBool(value); return true; }
|
else if (name == "RentalType") { RentalType = CConvert.ToInt(value); return true; }
|
else if (name == "TraderID") { TraderID = CConvert.ToInt(value); return true; }
|
else if (name == "TraderMemo") { TraderMemo = value.ToString(); return true; }
|
else if (name == "PackFlg") { PackFlg = CConvert.ToBool(value); return true; }
|
else if (name == "SortID") { SortID = CConvert.ToInt(value); return true; }
|
else if (name == "Fraction") { Fraction = CConvert.ToInt(value); return true; }
|
else if (name == "InRoomSales") { InRoomSales = CConvert.ToBool(value); return true; }
|
else if (name == "MealType") { MealType = CConvert.ToInt(value); return true; }
|
else if (name == "UseType") { UseType = CConvert.ToInt(value); return true; }
|
else if (name == "PersonType") { PersonType = CConvert.ToInt(value); return true; }
|
else if (name == "Parking") { Parking = CConvert.ToBool(value); return true; }
|
else if (name == "HallFee") { HallFee = CConvert.ToBool(value); 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
|
}
|