Merge branch 'master' of http://www.scserverddns.top:13000/sc/SunlightCentralizedControlManagement
This commit is contained in:
commit
daeb6e77d7
1 file changed
+14
@@ -2,6 +2,7 @@
|
||||
using SunlightCentralizedControlManagement_SCCM_.UserClass;
|
||||
using SunlightCentralizedControlManagement_SCCM_.ViewModel;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
@@ -65,7 +66,20 @@ namespace SunlightCentralizedControlManagement_SCCM_.View
|
||||
{
|
||||
if (!string.IsNullOrEmpty(comboBoxMachine.Text))
|
||||
{
|
||||
DataRow dr = MainWindowViewModel.Machines.NewRow();//添加数据
|
||||
|
||||
dr["Name"] = comboBoxMachine.Text;
|
||||
dr["Group"] = TextMachineGroup;
|
||||
|
||||
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||
SQLiteHelpers.Open(); //打开数据库
|
||||
// SQLiteHelpers.InsertData("Machines", SQLiteHelpers.DataTableToDictionary(dr));
|
||||
// MainWindowViewModel.Machines = SQLiteHelpers.ExecuteDataSet("select * from Machines Order by id", null).Tables[0]; //读取表写入缓存
|
||||
SQLiteHelpers.Close();
|
||||
|
||||
|
||||
Griddata.ItemsSource = MainWindowViewModel.Machines.DefaultView;
|
||||
comboBoxMachine.Text = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user