“法律服务人员维护”窗口,“保存”按钮:
Dim t As Table = e.Form.Controls("基层法律服务人员信息表").Table
t.Filter = "_Identify = " & t.Current("_Identify")
For Each c As Col In t.Cols
For Each ctl As WinForm.Control In e.Form.Controls
If ctl.Name.Contains(c.Name) Then
If c.IsBoolean Then
t.Current(c.Name) = e.Form.Controls(ctl.Name).Checked
Else
t.Current(c.Name) = e.Form.Controls(ctl.Name).Value
End If
End If
Next
Next
e.Form.Controls("基层法律服务人员信息表").Table.DataTable.Save
If Forms("导航窗口").Opened Then
Dim tv As WinForm.TreeView = Forms("导航窗口").Controls("TreeView3")
Forms("导航窗口").Controls("目录树刷新").PerformClick
Dim name As String = e.Form.Controls("基层法律服务人员信息表").Table.Current("姓名")
For Each nd As WinForm.TreeNode In tv.AllNodes
If nd.Name = name Then
tv.SelectedNode = nd
nd.EnsureVisible
End If
Next
End If