1、Dim cm As WinForm.ComboBox = e.Form.Controls("ComboBox2")
If cm.SelectedItem IsNot Nothing Then
Dim dr As DataRow = cm.SelectedItem
e.Form.Controls("ComboBox2").Value = dr("工程名称")
e.Form.Controls("ComboBox3").value = dr("工程编号")
End If
2、新增按钮事件
DataTables("订单").Save
Dim max As Integer = DataTables("订单").Compute("max([_Identify])")
Tables("订单").Filter = "[_Identify] > " & max