ホテル管理システム
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
using HotelPms.Data;
using HotelPms.Data.Master;
using HotelPms.Share.Data;
using HotelPms.Share.IO;
using System.Data;
 
namespace HotelPms.DataAccessDirect.Server
{
    /// <summary>
    /// データベース制御(サーバー側)
    /// 未使用
    /// </summary>
    public class DemoAccess : DataAccessDirectBase, IDisposable
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="access"></param>
        public DemoAccess(DataAccess access)
        {
            TableName = "M_Demo";
            DBAccess = access;
        }
 
        public void Dispose()
        {
        }
 
        public DataResult Add(Demo data)
        {
            throw new NotImplementedException();
        }
 
        public bool Exists(int pID)
        {
            throw new NotImplementedException();
        }
 
        public Demo GetItem(int pID)
        {
            throw new NotImplementedException();
        }
 
        public DataTable GetMasterGridData(string where)
        {
            throw new NotImplementedException();
        }
 
        /// <summary>
        /// データ削除
        /// </summary>
        /// <param name="where"></param>
        /// <returns></returns>
        public DataResult Remove(string where)
        {
            DataResult result = new DataResult() { ErrNo = 0, ErrData = string.Empty };
            string sql = $"DELETE FROM {TableName} WHERE {where}";
            OperationLog.Instance.WriteLog($"Sql生成:{sql}");
            if (DBAccess.ExecuteNonQuery(sql) == -1)
            {
                result.ErrNo = DBAccess.ErrNo;
                result.ErrData = DBAccess.ErrInfo;
            }
            OperationLog.Instance.WriteLog($"更新:{result.ToString()}");
            return result;
        }
 
        public DataResult Update(Demo data)
        {
            throw new NotImplementedException();
        }
    }
}