Compare commits
2
Commits
2e1835b5b1
...
792805e80b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
792805e80b | ||
|
|
daeb6e77d7 |
@@ -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