Merge branch 'master' of http://www.scserverddns.top:13000/sc/SunlightCentralizedControlManagement
This commit is contained in:
commit
007e5cb414
21 files changed
+5857
-68
No files matched your search
@@ -1,6 +1,6 @@
|
||||
using System.Management;
|
||||
|
||||
namespace DyeingComputer.UserClass
|
||||
namespace SunlightCentralizedControlManagement_SCCM_.UserClass
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取硬件SN
|
||||
|
||||
+1
-24
@@ -1,18 +1,14 @@
|
||||
using DyeingComputer.ViewModel;
|
||||
using SunlightCentralizedControlManagement_SCCM_.ViewModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using static DyeingComputer.UserClass.SqliteHelper;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.TaskbarClock;
|
||||
|
||||
namespace DyeingComputer.UserClass
|
||||
{
|
||||
public class LogGing
|
||||
{
|
||||
private static SQLiteHelper SQLiteHelpers = null; //定义数据库
|
||||
private readonly static string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
|
||||
public static bool sqld=false;
|
||||
public static void LogGingDATA(string dat)
|
||||
{
|
||||
string logpath = System.Environment.CurrentDirectory + "\\Log";//日志文件目录
|
||||
@@ -47,24 +43,5 @@ namespace DyeingComputer.UserClass
|
||||
directoryInfo.Create();//创建日志路径
|
||||
}
|
||||
}
|
||||
public static void LogSQLDATA(string NAME, string api, string dat)
|
||||
{
|
||||
if (!sqld)
|
||||
{
|
||||
sqld = true;
|
||||
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||
string Log_time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
Dictionary<string, object> logsql = new Dictionary<string, object>();
|
||||
// 添加元素
|
||||
logsql.Add("NAME", NAME);
|
||||
logsql.Add("API", api);
|
||||
logsql.Add("MESSAGE", dat);
|
||||
logsql.Add("TIME", Log_time);
|
||||
SQLiteHelpers.Open(); //打开数据库
|
||||
SQLiteHelpers.InsertData("SERVER", logsql);//行插入
|
||||
SQLiteHelpers.Close(); //关闭连接
|
||||
sqld = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user