Select Case e.DataCol.Name
Case "材料编号"
If e.DataRow.IsNull("材料编号") = False Then '如果已经输入订单编号
Dim dr As DataRow = DataTables("核算汇总").Find(CExp("材料编号='{0}' and 报价编号='{1}'",e.DataRow("材料编号"),e.DataRow("报价编号")))
If dr Is Nothing Then
Dim dr1 As DataRow = DataTables("核算汇总").AddNew()
dr1("材料编号") = e.DataRow("材料编号")
dr1("报价编号") = e.DataRow("报价编号")
End If
End If
End Select