|
|
@@ -55,13 +55,20 @@ namespace HKCardManager.UserPages |
|
|
|
{ |
|
|
|
if (HKLibHelper.DelOrg(res)) |
|
|
|
{ |
|
|
|
Global.OrgTables.Clear(); |
|
|
|
Global.OrgTables = HKLibHelper.GetOrg(); |
|
|
|
this.Invoke(() => |
|
|
|
//Global.OrgTables.Clear(); |
|
|
|
//Global.OrgTables = HKLibHelper.GetOrg(); |
|
|
|
var result = HKLibHelper.GetOrg(); |
|
|
|
if (result != null) |
|
|
|
{ |
|
|
|
dataGridView1.DataSource = null; |
|
|
|
dataGridView1.DataSource = Global.OrgTables; |
|
|
|
}); |
|
|
|
this.Invoke(() => |
|
|
|
{ |
|
|
|
dataGridView1.DataSource = null; |
|
|
|
Global.OrgTables.Clear(); |
|
|
|
Global.OrgTables = result; |
|
|
|
dataGridView1.DataSource = Global.OrgTables; |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
MessageLogNotify.GetInstance.Show($"机构:【{dataGridView1.Rows[index].Cells[0].Value?.ToString()}】 删除成功"); |
|
|
|
} |
|
|
|
else |
|
|
@@ -113,13 +120,18 @@ namespace HKCardManager.UserPages |
|
|
|
|
|
|
|
if (HKLibHelper.AlterOrg(changeName, id)) |
|
|
|
{ |
|
|
|
Global.OrgTables.Clear(); |
|
|
|
Global.OrgTables = HKLibHelper.GetOrg(); |
|
|
|
this.Invoke(() => |
|
|
|
var result = HKLibHelper.GetOrg(); |
|
|
|
if (result != null) |
|
|
|
{ |
|
|
|
dataGridView1.DataSource = null; |
|
|
|
dataGridView1.DataSource = Global.OrgTables; |
|
|
|
}); |
|
|
|
this.Invoke(() => |
|
|
|
{ |
|
|
|
dataGridView1.DataSource = null; |
|
|
|
Global.OrgTables.Clear(); |
|
|
|
Global.OrgTables = result; |
|
|
|
dataGridView1.DataSource = Global.OrgTables; |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
MessageLogNotify.GetInstance.Show($"{name} 机构修改成功"); |
|
|
|
} |
|
|
|
else |
|
|
|