1
yhj
2024-07-24 5e5d945e91568b973faa27d8ab0bcef99fc4a6c5
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#region
 
using System;
using System.Collections;
 
#endregion
 
namespace CSFrameworkV5.Common
{
    /// <summary>
    ///     数据操作日志的实体类
    /// </summary>
    public class LogDataDef
    {
        private IList _Details; //明细
        private string _DocNo;
        private string _GUID32;
        private int _isid;
        private bool _IsMaster;
        private string _KeyFieldName;
        private DateTime _LogDate;
        private string _LogUser;
        private LogDataType _OPType;
        private string _TableName;
 
        public LogDataDef()
        {
            _GUID32 = Guid.NewGuid().ToStringEx().Replace("-", "");
            _Details = new ArrayList();
        }
 
        public IList Details => _Details;
 
        public string DocNo
        {
            get => _DocNo;
            set => _DocNo = value;
        }
 
        public string GUID32
        {
            get => _GUID32;
            set => _GUID32 = value;
        }
 
        public bool HasDetail => _Details.Count > 0;
 
        public int isid
        {
            get => _isid;
            set => _isid = value;
        }
 
        public bool IsMaster
        {
            get => _IsMaster;
            set => _IsMaster = value;
        }
 
        public string KeyFieldName
        {
            get => _KeyFieldName;
            set => _KeyFieldName = value;
        }
 
        public DateTime LogDate
        {
            get => _LogDate;
            set => _LogDate = value;
        }
 
        public string LogUser
        {
            get => _LogUser;
            set => _LogUser = value;
        }
 
        public LogDataType OPType
        {
            get => _OPType;
            set => _OPType = value;
        }
 
        public string TableName
        {
            get => _TableName;
            set => _TableName = value;
        }
 
        public void AppendDetail(string tableName, string fieldName,
            string oldValue, string newValue)
        {
            var dtl = new LogDataDefDtl();
            dtl.GUID32 = GUID32;
            dtl.TableName = tableName;
            dtl.FieldName = fieldName;
            dtl.OldValue = oldValue;
            dtl.NewValue = newValue;
            _Details.Add(dtl);
        }
    }
 
    /// <summary>
    ///     数据操作日志的明细表实体类
    /// </summary>
    public class LogDataDefDtl
    {
        private string _FieldName;
        private string _GUID32;
        private int _isid;
        private string _NewValue;
        private string _OldValue;
        private string _TableName;
 
        public string FieldName
        {
            get => _FieldName;
            set => _FieldName = value;
        }
 
        public string GUID32
        {
            get => _GUID32;
            set => _GUID32 = value;
        }
 
        public int isid
        {
            get => _isid;
            set => _isid = value;
        }
 
        public string NewValue
        {
            get => _NewValue;
            set => _NewValue = value;
        }
 
        public string OldValue
        {
            get => _OldValue;
            set => _OldValue = value;
        }
 
        public string TableName
        {
            get => _TableName;
            set => _TableName = value;
        }
    }
}