第一:
If e.DataCol.name= "实际入库数量" OrElse e.DataCol.name= "数量" Then
If e.DataRow("实际入库数量")<e.DataRow("数量") Then
e.DataRow("长短款")= "短款"
Else If e.DataRow("实际入库数量")>e.DataRow("数量") Then
e.DataRow("长短款")= "长款"
Else
e.DataRow("长短款")= ""
End If
End If
想在以上代码上加个条件,当"数量"为空时,输入实际入库数量后,"长短款"也为空。
第二:
If e.DataCol.name= "入库日期" OrElse e.DataCol.name= "交货日期" Then
If e.DataRow.Isnull("入库日期") = False Then
If e.DataRow("入库日期")<e.DataRow("交货日期") Then
e.DataRow("及时")= "是"
e.DataRow("是否及时")= True
Else If e.DataRow("入库日期")>e.DataRow("交货日期") Then
e.DataRow("不及时")= "是"
End If
End If
End If
加个条件:当"交货日期"为空时,输入入库日期后,"是否及时" "及时""不及时"三列都为空。。