更改大部分页面,更改各个扫码逻辑
This commit is contained in:
1 parent
2bd24f5316
commit
1670395816
34 files changed
+2420
-1425
No files matched your search
@@ -21,7 +21,7 @@ namespace WindowsFormsApp1.form
|
||||
|
||||
private void 查询_Click(object sender, EventArgs e)
|
||||
{
|
||||
GetInfo((int)comboBox1.SelectedValue);
|
||||
GetInfo();
|
||||
}
|
||||
|
||||
private void 保存_Click(object sender, EventArgs e)
|
||||
@@ -33,7 +33,7 @@ namespace WindowsFormsApp1.form
|
||||
if (result.Success)
|
||||
{
|
||||
MessageBox.Show("更新成功");
|
||||
GetInfo((int)comboBox1.SelectedValue);
|
||||
GetInfo();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -62,13 +62,6 @@ namespace WindowsFormsApp1.form
|
||||
return;
|
||||
}
|
||||
|
||||
var list = result_combox.Data.FindAll(a => Init.t_Lineplcs.Select(p => p.plcid).Contains(a.id));
|
||||
|
||||
// 绑定数据源到 ComboBox
|
||||
comboBox1.DataSource = list;
|
||||
comboBox1.DisplayMember = "plcname";
|
||||
comboBox1.ValueMember = "id";
|
||||
|
||||
var result1 = new List<object>
|
||||
{
|
||||
new {name = "read",value = "read"},
|
||||
@@ -134,7 +127,7 @@ namespace WindowsFormsApp1.form
|
||||
fLOW_Insert.dataid = selectid;
|
||||
fLOW_Insert.Operation = OperationType.Edit;
|
||||
fLOW_Insert.ShowDialog();
|
||||
GetInfo((int)comboBox1.SelectedValue);
|
||||
GetInfo();
|
||||
|
||||
}
|
||||
else if (e.ColumnIndex == 10)
|
||||
@@ -153,12 +146,12 @@ namespace WindowsFormsApp1.form
|
||||
{
|
||||
MessageBox.Show("删除失败");
|
||||
}
|
||||
GetInfo((int)comboBox1.SelectedValue);
|
||||
GetInfo();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void GetInfo(int plcid)
|
||||
public void GetInfo()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -166,7 +159,7 @@ namespace WindowsFormsApp1.form
|
||||
SQLiteHelper<t_plcaddress> sQLiteHelper = new db.SQLiteHelper<t_plcaddress>();
|
||||
SQLiteHelper<t_plc> sQLiteHelper1 = new db.SQLiteHelper<t_plc>();
|
||||
var result_plc = sQLiteHelper1.QueryAll();
|
||||
var result = sQLiteHelper.Query(a=>a.plcid == plcid);
|
||||
var result = sQLiteHelper.Query(a=>a.plcid == Init.t_Line.plcid);
|
||||
if (result.Success)
|
||||
{
|
||||
List<object> list = new List<object>();
|
||||
@@ -203,7 +196,7 @@ namespace WindowsFormsApp1.form
|
||||
{
|
||||
PlcAddress_Insert fLOW_Insert = new PlcAddress_Insert();
|
||||
fLOW_Insert.ShowDialog();
|
||||
GetInfo((int)comboBox1.SelectedValue);
|
||||
GetInfo();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user