工艺页面及按钮操作记录

This commit is contained in:
sc committed 2025-05-21 00:18:33 +08:00
commit 2c75e8b0f9
9 files changed
+79 -12

No files matched your search

+19 -1
View File
@@ -17,6 +17,7 @@ namespace DyeingComputer.UserClass
{
private static SQLiteHelper SQLiteHelpers = null; //定义数据库
private readonly static string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
private readonly static string LOGAddress = Environment.CurrentDirectory + "\\DataBase\\LOG.db"; //数据库路径
public async static void DBlog(string Name ,string ID ,string Api,string MESSAGE)
{
@@ -36,7 +37,24 @@ namespace DyeingComputer.UserClass
API_LOG.Clear();
});
}
public async static void LOGlog(string WorkOrder, string TYPE, string Command, string MESSAGE)
{
await Task.Run(() =>
{
Dictionary<string, object> API_LOG = new Dictionary<string, object>();//缓存函数
API_LOG.Add("WorkOrder", WorkOrder);
API_LOG.Add("TYPE", TYPE);
API_LOG.Add("Command", Command);
API_LOG.Add("MESSAGE", MESSAGE);
API_LOG.Add("TIME", MainWindowViewModel.SYSTime);
SQLiteHelpers = new SQLiteHelper(LOGAddress); //数据库连接路径
SQLiteHelpers.Open(); //打开数据库
SQLiteHelpers.InsertData("OperationLog", API_LOG);//行插入
SQLiteHelpers.Close(); //关闭连接
API_LOG.Clear();
});
}
}
}