If e.DataCol.Name = "派单日期"
Dim Filter As String = "[进料表编号] = '" & e.DataRow("进料表编号") & "'"
Dim drs As List(Of DataRow) = DataTables("角钢进料表明细").Select(Filter)
For Each dr2 As DataRow In drs
dr2("派单日期") = e.DataRow("派单日期")
Next
End If
把这段删除了,并做了一下修改
角钢进料台账
Select Case e.DataCol.name
Case "进料表编号"
If e.DataRow.IsNull("进料表编号") Then
DataTables("角钢进料表明细").DeleteFor("进料表编号='" & e.DataRow("进料表编号") & "'")
e.DataRow("状态_发料完成") = False
e.DataRow("状态_U8出库") = False
Else
If e.OldValue Is Nothing
Dim ndr As Row = Tables("角钢进料表明细").AddNew
ndr("进料表编号") = e.DataRow("进料表编号")
ndr("工程名称") = e.DataRow("工程名称")
ndr("塔型") = e.DataRow("塔型")
ndr("材料标准") = e.DataRow("材料标准")
ndr("仓储配料员") = e.DataRow("仓储配料员")
ndr("审核") = e.DataRow("审核")
ndr("编制人") = e.DataRow("编制人")
ndr.Move(0)
End If
If e.DataRow.GetChildRows("角钢进料表明细").Count > 0
Dim cnt As Integer = DataTables("角钢进料表明细").Compute("count(进料表编号)","进料表编号='" & e.NewValue & "' and (U8出库=false and 处置_重派=false)")
e.DataRow("状态_U8出库") = (cnt=0)
cnt = DataTables("角钢进料表明细").Compute("count(进料表编号)","进料表编号='" & e.NewValue & "' and (未发数量 > 0 or 未发数量 is null)")
e.DataRow("状态_发料完成") = (cnt=0)
End If
End If
End Select
角钢进料表明细
If e.DataCol.Name = "进料表编号" Then
If e.NewValue Is Nothing Then
e.DataRow("工程名称") = Nothing
e.DataRow("塔型") = Nothing
e.DataRow("仓储配料员") = Nothing
e.DataRow("审核") = Nothing
e.DataRow("编制人") = Nothing
Else
Dim dr3 As DataRow
dr3 = DataTables("角钢进料台账").Find("[进料表编号] = '" & e.NewValue & "'")
If dr3 IsNot Nothing
e.DataRow("工程名称") = dr3("工程名称")
e.DataRow("塔型") = dr3("塔型")
e.DataRow("仓储配料员") = dr3("仓储配料员")
e.DataRow("审核") = dr3("审核")
e.DataRow("编制人") = dr3("编制人")
End If
End If
End If
还需要怎么修改?