Dim bh As String = tbl.Current("hh") '将要做订单的商品的货号
Dim sdr As DataRow = DataTables("sp").Find("hh = '" & bh & "'") '该商品在sp表中的对应记录
Dim fws As String = sdr("jyfwsx") 'sp对应记录的jyfwsx
Dim fwq As String = DataTables("bqyzz").DataRows(0)("jyfwlb") '本企业的经营范围
Dim gdr As DataRow = Tables("cgdmxb").Current.DataRow. GetParentRow("cgddb") '采购订单明细表的对应父行
Dim ghm As String = gdr("ghs") 'cgddb中的对应行的ghs列
Dim hdr As DataRow = DataTables("ghszz").Find("ghsmc = '" & ghm & "'")
这些使用的返回值未必都有值,使用前都应该判断一下是否空值或空对象