If e.DataRow("是否异常") = "异常" Then
Select Case e.DataCol.name
Case "生产调度令号"
Dim dr As DataRow = DataTables("电装顾客财产异常处理").Find("生产调度令号 = '" & e.NewValue & "'")
If dr Is Nothing Then
dr = DataTables("电装顾客财产异常处理").AddNew()
dr("生产调度令号") = e.DataRow("生产调度令号")
dr("客户单位") = e.DataRow("客户单位")
dr("姓名") = e.DataRow("姓名")
dr("类别") = e.DataRow("类别")
dr("财产名称") = e.DataRow("财产名称")
dr("型号规格") = e.DataRow("型号规格")
dr("单位") = e.DataRow("单位")
Else
dr("生产调度令号") = e.DataRow("生产调度令号")
End If
Case "客户单位","姓名","类别","财产名称","型号规格","单位"
Dim dr As DataRow = DataTables("电装顾客财产异常处理").Find("生产调度令号 = '" & e.DataRow("生产调度令号") & "'")
If dr IsNot Nothing Then
dr(e.DataCol.Name) = e.DataRow(e.DataCol.Name)
End If
End Select
End If