Dim cm As WinForm.ComboBox = e.Form.Controls("方案编号") Dim dr As DataRow = cm.SelectedItem If dr IsNot Nothing Then e.Form.Controls("客户名称").Value = dr("客户名称") e.Form.Controls("联系人").Value = dr("联系人") e.Form.Controls("联系电话").Value = dr("联系电话") End If
-- 作者:有点甜
-- 发布时间:2015/3/12 19:56:00
--
Dim cm As WinForm.ComboBox = e.Form.Controls("方案编号") Dim dr As DataRow = DataTables("表A").Find("方案编号 = \'" & cm.Text & "\'") If dr IsNot Nothing Then e.Form.Controls("客户名称").Value = dr("客户名称") e.Form.Controls("联系人").Value = dr("联系人") e.Form.Controls("联系电话").Value = dr("联系电话") End If