using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ObjectModel.Backend
{
///
/// 日志
///
public class BMLogModel
{
///
/// 操作员
///
public string username;
///
/// 操作的数值备份
///
public long numBak;
///
/// 操作的具体数值
///
public long num;
///
/// 对谁操作
///
public int toObj;
///
/// 说明
///
public string memo;
///
/// 操作类型,1修改资产 2系统日志
///
public int lx;
///
/// 操作时间
///
public DateTime CreateTime;
public BMLogModel() { }
public BMLogModel(DataRow row) {
this.username = row["username"].ToString();
this.memo = row["memo"].ToString();
this.numBak = (long)row["numBak"];
this.num = (long)row["num"];
this.toObj = (int)row["toObj"];
this.lx = (int)row["lx"];
this.CreateTime = (DateTime)row["CreateTime"];
}
///
/// 获取保存日志SQL
///
///
public string GetInsertSql() {
return $"INSERT INTO [bm_log]( [username], [numBak], [num], [toObj], [memo], [lx]) VALUES ('{username}', {numBak}, {num}, {toObj}, '{memo}', {lx})";
}
}
}