If e.DataCol.Name = "采购ID" orelse e.DataCol.Name = "物资编号" Then Dim dr As DataRow = DataTables("入库明细").Find("采购ID = '" & e.DataRow("采购ID") & "' and 物资编号 = '" & e.DataRow("物资编号") & "'") If dr IsNot Nothing Then e.DataRow("已交重量") = dr("入库重量") End If End If