If e.DataCol.Name = "成品编码" orelse e.DataCol.Name = "库位" Then If e.DataRow.isnull("成品编码") = false andalso e.DataRow.isnull("库位") = false Then Dim dr As DataRow dr = DataTables("配件库存表").SQLFind("[材料编码] = '" & e.DataRow("成品编码") & "'and [库位] = '" & e.DataRow("库位") & "'")