-- 代码
请老师看看,点击“到货”没反应,“外观尺寸检查记录”不生成行,不知道什么原因
Select Case e.DataCol.name
Case "到货"
If e.DataRow("到货") = False Then
DataTables("外观尺寸检查记录").DeleteFor("编号=\'" & e.DataRow("编号") & "\'")
Else
For i As Integer = 1 To e.DataRow("到货_数量")
Dim dr3 As Row = Tables("外观尺寸检查记录").AddNew()
dr3("预算编号") = e.DataRow("预算编号")
dr3("项目名称") = e.DataRow("项目名称")
dr3("编号") = e.DataRow("编号")
dr3("材料名称") = e.DataRow("材料名称")
dr3("材质") = e.DataRow("材质")
dr3("规格_公称mm") = e.DataRow("规格_公称mm")
dr3("规格_长mm") = e.DataRow("规格_长mm")
dr3("规格_宽mm") = e.DataRow("规格_宽mm")
dr3("采购_单位") = e.DataRow("采购_单位")
dr3("采购_数量") = e.DataRow("采购_数量")
dr3("到货_数量") = "1"
dr3("采购_重量Kg") = e.DataRow("采购_重量Kg") / e.DataRow("采购_数量")
dr3("代号") = "Y"
dr3.Move(0)
Next
End If
End Select
Select Case e.DataCol.Name
Case "预算编号","项目名称","材料名称","材质","规格_公称mm","规格_长mm","规格_宽mm","采购_单位","采购_数量","采购_重量Kg"
Dim Filter As String = "[编号] = \'" & e.DataRow("编号") & "\'"
Dim drs As List(Of DataRow) = DataTables("外观尺寸检查记录").Select(Filter)
For Each dr4 As DataRow In drs
dr4(e.DataCol.Name) = e.NewValue
Next
End Select