Select Case e.DataCol.name Case "销档","泵车信息_车型","单价_时段","单价_位置" Dim filter As String = "1=1" If e.DataRow.IsNull("销档") Then filter &= " and 销档编号 is null" Else filter &= " and 销档编号 = '" & e.DataRow("销档") & "'" End If If e.DataRow.IsNull("泵车信息_车型") Then filter &= " and 泵送费用_车型 is null" Else filter &= " and 泵送费用_车型 = '" & e.DataRow("泵车信息_车型") & "'" End If If e.DataRow.IsNull("单价_时段") Then filter &= " and 泵送费用_时段 is null" Else filter &= " and 泵送费用_时段 = '" & e.DataRow("单价_时段") & "'" End If If e.DataRow.IsNull("单价_位置") Then filter &= " and 泵送费用_位置 is null" Else filter &= " and 泵送费用_位置 = '" & e.DataRow("单价_位置") & "'" End If Dim fdr = DataTables("销售档案").find(filter) If fdr IsNot Nothing Then e.DataRow("单价_价") = fdr("泵送费用_单价") e.DataRow("台班方量") = fdr("泵送费用_台班方量") End If End Select
|