Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd88cca4c6 | ||
|
|
cb1e7a2e65 |
@@ -44,6 +44,7 @@ namespace SunlightAggregationManager.ViewModel
|
||||
|
||||
private static Timer? _timer;
|
||||
public static DataTable ChemicalStatistics = new DataTable();
|
||||
public static DataTable DBC_Machines = new DataTable();
|
||||
public static DataBase dataBase = new DataBase();
|
||||
public static UserClass.SqliteHelper SQLiteHelpers = null!; //定义数据库
|
||||
private readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\SunlightAggregationManager.db"; //数据库路径
|
||||
@@ -388,11 +389,14 @@ namespace SunlightAggregationManager.ViewModel
|
||||
private static int EXTime = 0;
|
||||
private static async void TimeTask(object? state)
|
||||
{
|
||||
if (EXTime >= 120)//1小时
|
||||
if (EXTime == 120)//1小时
|
||||
{
|
||||
EXTask();//统计配送消息
|
||||
EXTime = 0;
|
||||
}
|
||||
|
||||
DBC_Machines = await dataBase.ExecuteQueryAsync("SELECT *FROM [BatchDyeingCentral].[dbo].[Machines]");
|
||||
|
||||
EXTime++;
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user