830指令添加信息项目
This commit is contained in:
commit
37435ca60c
3 files changed
+10
-4
No files matched your search
@@ -69,7 +69,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
private SQLiteHelper SQLiteHelpers = null; //定义数据库
|
||||
private readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\SCCM.db"; //数据库路径
|
||||
public static DataTable Machines = new DataTable(); //设备表缓存
|
||||
public static DataRow MachinesROW;
|
||||
// public static DataRow MachinesROW;
|
||||
public static DataTable USER_data = new DataTable();
|
||||
public static UserControls.info[] inf = new UserControls.info[999]; //定义总览信息卡
|
||||
public static int ERR_c = 0;//错误计数器
|
||||
@@ -96,7 +96,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
USER_data = SQLiteHelpers.ExecuteDataSet("select * from USER order by Name desc", null).Tables[0];
|
||||
SQLiteHelpers.Close();
|
||||
|
||||
MachinesROW = Machines.NewRow();
|
||||
// MachinesROW = Machines.NewRow();
|
||||
|
||||
USERCapacity(App.USER_Purview);//App.USER_Purview);
|
||||
CountDown();
|
||||
@@ -327,6 +327,8 @@ namespace SunlightCentralizedControlManagement_SCCM_.ViewModel
|
||||
MachiensTcpClient[i] = new TcpClient();
|
||||
DataRow dt = machinesdata[i];
|
||||
Updata_Machines(Machines, "State", "ID='" + Convert.ToInt16(dt["ID"]) + "'", "800");
|
||||
Updata_Machines(Machines, "Temperature", "ID='" + Convert.ToInt16(dt["ID"]) + "'", "0.0");
|
||||
Updata_Machines(Machines, "WaterLevel", "ID='" + Convert.ToInt16(dt["ID"]) + "'", "0");
|
||||
_ = AsyncTcpClient.TcpClient(MachiensTcpClient[i] //建立tcp连接
|
||||
, Selet_Machines(Machines, "IP", "ID='" + Convert.ToInt16(dt["ID"]) + "'").ToString()
|
||||
, Selet_Machines(Machines, "PORT", "ID='" + Convert.ToInt16(dt["ID"]) + "'").ToString());
|
||||
|
||||
Reference in new issue
Block a user