ホテル管理システム
ogi
yesterday 1a1c8e71fcd14858f595029f089b2d4a00202b32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
namespace HotelPms.Share.Data;
 
/// <summary>
/// テーブルFacilityMstに対応するクラスです。
/// </summary>
[Serializable()]
public class DBConnectItem
{
    private string hostName = string.Empty;
    public string HostName
    {
        get { return hostName; }
        set { hostName = value; }
    }
    private string dBName = string.Empty;
 
    public string DBName
    {
        get { return dBName; }
        set { dBName = value; }
    }
    private string userID = string.Empty;
 
    public string UserID
    {
        get { return userID; }
        set { userID = value; }
    }
    private string password = string.Empty;
 
    public string Password
    {
        get { return password; }
        set { password = value; }
    }
 
    /// <summary>
    /// ※SqlServerでは使わない 1433となる
    /// </summary>
    public int Port { get; set; } = 5432;
 
    private object tag = null;
 
    public object Tag
    {
        get { return tag; }
        set { tag = value; }
    }
 
    public DBConnectItem()
    { 
    }
 
    public DBConnectItem(string hostName, string dBName, string userID, string password)
        : this(hostName, dBName, userID, password, 5432)
    { }
 
    public DBConnectItem(string hostName, string dBName, string userID, string password, int port)
        : this(hostName, dBName, userID, password, port, null)
    { }
 
    public DBConnectItem(string hostName, string dBName, string userID, string password, int port, object tag)
    {
        this.hostName = hostName;
        this.dBName = dBName;
        this.userID = userID;
        this.password = password;
        Port = port;
        this.tag = tag;
    }
 
    public virtual DBConnectItem Clone()
    {
        return new DBConnectItem()
        {
            HostName = this.hostName,
            DBName = this.dBName,
            UserID = this.userID,
            Password = this.password,
            Tag = this.tag
        }; 
    }
}