Select Case e.DataCol.Name
Case "数量","仓库","存货名称","染料代号"
Dim fdr As DataRow = DataTables("盘点表").Find("存货名称 = '" & e.DataRow("存货名称") & "'")
For Each dr As DataRow In DataTables("盘点表").DataRows
dr("本月出库数量") = 0
dr("新厂借用数量") = 0
Next
If fdr IsNot Nothing Then
If e.DataRow("染料代号") = "A-1" OrElse e.DataRow("染料代号") = "A-2" OrElse e.DataRow("染料代号") = "A-3" OrElse e.DataRow("染料代号") = "A-6" OrElse e.DataRow("染料代号") Like "A*" = False Then
fdr("新厂借用数量") = DataTables("统计").Compute("sum(数量)","存货名称 ='" & e.DataRow("存货名称") & "' and 仓库 = '新厂'")
fdr("统计用量") = DataTables("统计").Compute("sum(数量)/1000","存货名称 ='" & e.DataRow("存货名称") & "' and 仓库 = '老厂'")
Else
fdr("统计用量") = DataTables("统计").Compute("sum(数量)","存货名称 ='" & e.DataRow("存货名称") & "' and 仓库 = '老厂'")
End If
End If
End Select
请问我的代码错在哪里?为什么电脑不能进行判断,都是除以1000,谢谢