If e.DataCol.Name ="高锰酸盐指数L" Then
If e.NewValue.Contains("L") Then
e.DataRow("高锰酸盐指数") = val(e.NewValue) / 2
Else
e.DataRow("高锰酸盐指数") = e.NewValue
End If
End If
If e.DataCol.Name ="五日生化需氧量L" Then
If e.NewValue.Contains("L") Then
e.DataRow("五日生化需氧量") = val(e.NewValue) / 2
Else
e.DataRow("五日生化需氧量") = e.NewValue
End If
End If
If e.DataCol.Name ="氨氮L" Then
If e.NewValue.Contains("L") Then
e.DataRow("氨氮") = val(e.NewValue) / 2
Else
e.DataRow("氨氮") = e.NewValue
End If
End If
If e.DataCol.Name ="石油类L" Then
If e.NewValue.Contains("L") Then
e.DataRow("石油类") = val(e.NewValue) / 2
Else
e.DataRow("石油类") = e.NewValue
End If
End If
If e.DataCol.Name ="挥发酚L" Then
If e.NewValue.Contains("L") Then
e.DataRow("挥发酚") = val(e.NewValue) / 2
Else
e.DataRow("挥发酚") = e.NewValue
End If
End If
Select Case e.DataCol.Name
Case "溶解氧","高锰酸盐指数","五日生化需氧量","氨氮","石油类","挥发酚"
If e.DataRow.IsNull("溶解氧") = False AndAlso e.DataRow.IsNull("高锰酸盐指数") = False AndAlso e.DataRow.IsNull("五日生化需氧量") = False AndAlso e.DataRow.IsNull("氨氮") = False AndAlso e.DataRow.IsNull("石油类") = False AndAlso e.DataRow.IsNull("挥发酚") = False Then
Dim lb1, lb2, lb3, lb4, lb5, lb6 As Integer
If e.DataRow("溶解氧") < 2 Then
lb1 = 6
ElseIf e.DataRow("溶解氧") <3 Then
lb1 = 5
Else If e.DataRow("溶解氧") <5 Then
lb1 = 4
Else If e.DataRow("溶解氧") <6 Then
lb1 = 3
Else
lb1 = 2
End If
If e.DataRow("高锰酸盐指数") <= 4 Then
lb2 = 2
ElseIf e.DataRow("高锰酸盐指数") <= 6 Then
lb2 =3
Else If e.DataRow("高锰酸盐指数") <= 10 Then
lb2= 4
Else If e.DataRow("高锰酸盐指数") <= 15 Then
lb2 = 5
Else
lb2 = 6
End If
If e.DataRow("五日生化需氧量") <= 3 Then
lb3 = 2
ElseIf e.DataRow("五日生化需氧量") <= 4 Then
lb3 =3
ElseIf e.DataRow("五日生化需氧量") <= 6 Then
lb3 = 4
ElseIf e.DataRow("五日生化需氧量") <= 10 Then
lb3 = 5
Else
lb3 = 6
End If
If e.DataRow("氨氮") <=0.5 Then
lb4 =2
ElseIf e.DataRow("氨氮") <=1 Then
lb4 = 3
ElseIf e.DataRow("氨氮") <=1.5 Then
lb4 =4
ElseIf e.DataRow("氨氮") <=2 Then
lb4 = 5
Else
lb4 =6
End If
If e.DataRow("石油类") <= 0.05 Then
lb5 = 2
Else If e.DataRow("石油类") <= 0.5 Then
lb5 = 4
Else If e.DataRow("石油类") <= 1.0 Then
lb5 =5
Else
lb5 =6
End If
If e.DataRow("挥发酚") <= 0.002 Then
lb6 = 2
ElseIf e.DataRow("挥发酚") <= 0.005 Then
lb6 =3
ElseIf e.DataRow("挥发酚") <= 0.01 Then
lb6 = 4
ElseIf e.DataRow("挥发酚") <= 0.1 Then
lb6 = 5
Else
lb6 =6
End If
If lb1 > lb2 Then lb2 = lb1
If lb2 > lb3 Then lb3 = lb2
If lb3 > lb4 Then lb4 = lb3
If lb4 > lb5 Then lb5 = lb4
If lb5 > lb6 Then lb6 = lb5
Dim ary() As String = {"", "", "Ⅱ类", "Ⅲ类", "Ⅳ类", "Ⅴ类", "劣Ⅴ类"}
e.DataRow("断面类别") = ary(lb6)
End If
End Select