有点甜老师: 我按照这些代码设计好了后,怎么运行起来很慢呢,大概有5~10s的延迟;
代码如下:
If e.DataCol.name = "桩号"
If e.DataRow.IsNull("桩号") Then
e.DataRow("整桩号") = Nothing
Else
If e.DataRow("桩号").length >= 2 Then
e.DataRow("整桩号") = (e.DataRow("桩号").substring(0, 2)) & (e.DataRow("行车方向")) & (e.DataRow("车道名称")) & (e.DataRow("车道号")) & ("号车道")
Else
e.DataRow("整桩号") = ("桩号错误") '赋值为空时填Nothing
End If
End If
End If
If e.DataCol.name = "左IRI"
If e.DataRow("左IRI") >= e.DataRow("右IRI") Then
e.DataRow("IRI") = e.DataRow("左IRI")
Else
e.DataRow("IRI") = e.DataRow("右IRI")
End If
End If
If e.DataCol.name = "左平整度"
If e.DataRow("左平整度") >= e.DataRow("右平整度") Then
e.DataRow("平整度") = e.DataRow("左平整度")
Else
e.DataRow("平整度") = e.DataRow("右平整度")
End If
End If
DataTables("平整度").ReplaceFor("设计值_平整度", DataTables("检测信息表").DataRows(0)("平整度设计值") )
If e.DataCol.name = "设计值_平整度" OrElse e.DataCol.name = "注释" Then
If e.DataRow("设计值_平整度") = Nothing Then
e.DataRow("单段判定_平整度") = "/"
Else
If e.DataRow("注释").length >= 1 Then
e.DataRow("单段判定_平整度") = e.DataRow("注释")
Else
If e.DataRow("平整度") > e.DataRow("设计值_平整度") Then
e.DataRow("单段判定_平整度") = "不合格"
Else
e.DataRow("单段判定_平整度") = "合格"
End If
End If
End If
End If
===============
If e.Col.Name = "设计值_平整度" Then
If e.Row ("设计值_平整度") = 0
e.Text = "/"
End If
End If