请问这样的代码有问题吗?为什么我修改了 "规格" 后, "生产排单" "改码记录" 二个表的 "规格" 都不反应了!
Select Case e.DataCol.Name
Case "规格"
Dim dr As DataRow = e.DataRow
If dr.IsNull("规格") Then
dr("规格转换") = Nothing
Else
dr("规格转换") = eval(dr("规格")) / 10000
End If
Case "针数","专数","针种"
Dim dr As DataRow = e.DataRow
If dr.IsNull("针数") Or dr.IsNull("专数") Or dr.IsNull("针种") Then
dr("挡车基数") = Nothing
Else
dr("挡车基数") = dr("针数") / dr("针种") * dr("专数")
End If
Case "挡车基数"
Dim Filter As String = "[产品ID] = '" & e.DataRow("产品ID") & "'"
DataTables("生产明细").ReplaceFor(e.DataCol.Name, e.NewValue, Filter)
DataTables("改码记录").ReplaceFor(e.DataCol.Name, e.NewValue, Filter)
DataTables("生产明细").Save()
DataTables("改码记录").Save()
Case "订单ID","客户","款号","颜色","缸号","品名","尺码","规格"
Dim Filter As String = "[产品ID] = '" & e.DataRow("产品ID") & "'"
DataTables("生产排单").ReplaceFor(e.DataCol.Name, e.NewValue, Filter)
DataTables("改码记录").ReplaceFor(e.DataCol.Name, e.NewValue, Filter)
DataTables("生产排单").Save()
DataTables("改码记录").Save()
Case "产品单价"
Dim Filter As String = "[产品ID] = '" & e.DataRow("产品ID") & "'"
DataTables("出货明细").ReplaceFor(e.DataCol.Name, e.NewValue, Filter)
DataTables("出货明细").Save()
End Select