#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;
|
}
|
}
|
}
|