Select Case e.DataCol.Name
Case "体重","身高"
e.DataRow("BMI") = e.DataRow("体重") / (e.DataRow("身高") *e.DataRow("身高") ) * 10000
End Select
If e.DataCol.name = "BMI"
If e.DataRow("BMI") < 0 OrElse e.DataRow("BMI") > 60
MessageBox.show("对不起,实测数据不合法,请重新输入!")
e.DataRow("BMI") = Nothing
Return
End If
End If
For Each r As Row In Tables("测试数据").rows
If r.isnull("年龄") = False And r.isnull("性别") = False And r.isnull("BMI") = False Then
Dim dr As DataRow = DataTables("BMI标准").find("性别 =\'" & r("性别") & "\' and 年龄下限 <= " & r("年龄") & " and 年龄上限 > " & r("年龄") & " and 数值下限 <= " & r("BMI") & " and 数值上限 > " & r("BMI") )
If dr IsNot Nothing
r("BMI评价") = dr("评价")
End If
End If
Next
For Each r As Row In Tables("测试数据").rows
If r.isnull("年龄") = False And r.isnull("性别") = False And r.isnull("握力") = False Then
Dim dr As DataRow = DataTables("握力标准").find("性别 =\'" & r("性别") & "\' and 年龄下限 <= " & r("年龄") & " and 年龄上限 > " & r("年龄") & " and 数值下限 <= " & r("握力") & " And 数值上限 > " & r("握力") )
If dr IsNot Nothing
r("握力评价") = dr("评价")
End If
End If
Next
For Each r As Row In Tables("测试数据").rows
If r.isnull("年龄") = False And r.isnull("性别") = False And r.isnull("腰围") = False Then
Dim dr As DataRow = DataTables("腰围标准").find("性别 =\'" & r("性别") & "\' and 年龄下限 <= " & r("年龄") & " and 年龄上限 > " & r("年龄") & " and 数值下限 <= " & r("腰围") & " And 数值上限 > " & r("腰围") )
If dr IsNot Nothing
r("腰围评价") = dr("评价")
End If
End If
Next
For Each r As Row In Tables("测试数据").rows
If r.isnull("年龄") = False And r.isnull("性别") = False And r.isnull("脉搏") = False Then
Dim dr As DataRow = DataTables("脉搏标准").find("性别 =\'" & r("性别") & "\' and 年龄下限 <= " & r("年龄") & " and 年龄上限 > " & r("年龄") & " and 数值下限 <= " & r("脉搏") & " And 数值上限 > " & r("脉搏") )
If dr IsNot Nothing
r("脉搏评价") = dr("评价")
End If
End If
Next
For Each r As Row In Tables("测试数据").rows
If r.isnull("年龄") = False And r.isnull("性别") = False And r.isnull("收缩压") = False Then
Dim dr As DataRow = DataTables("收缩压标准").find("性别 =\'" & r("性别") & "\' and 年龄下限 <= " & r("年龄") & " and 年龄上限 > " & r("年龄") & " and 数值下限 <= " & r("收缩压") & " And 数值上限 > " & r("收缩压") )
If dr IsNot Nothing
r("收缩压评价") = dr("评价")
End If
End If
Next
For Each r As Row In Tables("测试数据").rows
If r.isnull("年龄") = False And r.isnull("性别") = False And r.isnull("舒张压") = False Then
Dim dr As DataRow = DataTables("舒张压标准").find("性别 =\'" & r("性别") & "\' and 年龄下限 <= " & r("年龄") & " and 年龄上限 > " & r("年龄") & " and 数值下限 <= " & r("舒张压") & " And 数值上限 > " & r("舒张压") )
If dr IsNot Nothing
r("舒张压评价") = dr("评价")
End If
End If
Next
For Each r As Row In Tables("测试数据").rows
If r.isnull("年龄") = False And r.isnull("性别") = False And r.isnull("肌肉量") = False Then
Dim dr As DataRow = DataTables("肌肉量标准").find("性别 =\'" & r("性别") & "\' and 年龄下限 <= " & r("年龄") & " and 年龄上限 > " & r("年龄") & " and 数值下限 <= " & r("肌肉量") & " And 数值上限 > " & r("肌肉量") )
If dr IsNot Nothing
r("肌肉量评价") = dr("评价")
End If
End If
Next
For Each r As Row In Tables("测试数据").rows
If r.isnull("年龄") = False And r.isnull("性别") = False And r.isnull("骨量") = False Then
Dim dr As DataRow = DataTables("骨量标准").find("性别 =\'" & r("性别") & "\' and 年龄下限 <= " & r("年龄") & " and 年龄上限 > " & r("年龄") & " and 数值下限 <= " & r("骨量") & " And 数值上限 > " & r("骨量") )
If dr IsNot Nothing
r("骨量评价") = dr("评价")
End If
End If
Next
For Each r As Row In Tables("测试数据").rows
If r.isnull("年龄") = False And r.isnull("性别") = False And r.isnull("内脏脂肪") = False Then
Dim dr As DataRow = DataTables("内脏脂肪标准").find("性别 =\'" & r("性别") & "\' and 年龄下限 <= " & r("年龄") & " and 年龄上限 > " & r("年龄") & " and 数值下限 <= " & r("内脏脂肪") & " And 数值上限 > " & r("内脏脂肪") )
If dr IsNot Nothing
r("内脏脂肪评价") = dr("评价")
End If
End If
Next
For Each r As Row In Tables("测试数据").rows
If r.isnull("年龄") = False And r.isnull("性别") = False And r.isnull("基础代谢") = False Then
Dim dr As DataRow = DataTables("基础代谢标准").find("性别 =\'" & r("性别") & "\' and 年龄下限 <= " & r("年龄") & " and 年龄上限 > " & r("年龄") & " and 数值下限 <= " & r("基础代谢") & " And 数值上限 > " & r("基础代谢") )
If dr IsNot Nothing
r("基础代谢评价") = dr("评价")
End If
End If
Next
Select Case e.DataCol.Name
Case "年龄","体内年龄"
e.DataRow("体内年龄差值") = e.DataRow("年龄") - e.DataRow("体内年龄")
End Select
\'For Each r As Row In Tables("测试数据").rows
\'If r.isnull("年龄") = False And r.isnull("性别") = False And r.isnull("体内年龄差值") = False Then
\'Dim dr As DataRow = DataTables("体内年龄标准").find("性别 =\'" & r("性别") & "\' and 年龄下限 <= " & r("年龄") & " and 年龄上限 > " & r("年龄") & " and 数值 =\' " & r("体内年龄差值") )
\'If dr IsNot Nothing
\'r("体内年龄评价") = dr("评价")
\'End If
\'End If
\'Next
For Each r As Row In Tables("测试数据").rows
If r.isnull("年龄") = False And r.isnull("性别") = False And r.isnull("体水分") = False Then
Dim dr As DataRow = DataTables("体水分标准").find("性别 =\'" & r("性别") & "\' and 年龄下限 <= " & r("年龄") & " and 年龄上限 > " & r("年龄") & " and 数值下限 <= " & r("体水分") & " And 数值上限 > " & r("体水分") )
If dr IsNot Nothing
r("体水分评价") = dr("评价")
End If
End If
Next
For Each r As Row In Tables("测试数据").rows
If r.isnull("年龄") = False And r.isnull("性别") = False And r.isnull("睁眼单脚站立") = False Then
Dim dr As DataRow = DataTables("睁眼单脚站立标准").find("性别 =\'" & r("性别") & "\' and 年龄下限 <= " & r("年龄") & " and 年龄上限 > " & r("年龄") & " and 数值下限 <= " & r("睁眼单脚站立") & " And 数值上限 > " & r("睁眼单脚站立") )
If dr IsNot Nothing
r("睁眼单脚站立评价") = dr("评价")
End If
End If
Next
For Each r As Row In Tables("测试数据").rows
If r.isnull("年龄") = False And r.isnull("性别") = False And r.isnull("坐位体前屈") = False Then
Dim dr As DataRow = DataTables("坐位体前屈标准").find("性别 =\'" & r("性别") & "\' and 年龄下限 <= " & r("年龄") & " and 年龄上限 > " & r("年龄") & " and 数值下限 <= " & r("坐位体前屈") & " And 数值上限 > " & r("坐位体前屈") )
If dr IsNot Nothing
r("坐位体前屈评价") = dr("评价")
End If
End If
Next
For Each r As Row In Tables("测试数据").rows
If r.isnull("年龄") = False And r.isnull("性别") = False And r.isnull("三十秒反复坐起") = False Then
Dim dr As DataRow = DataTables("三十秒反复坐起标准").find("性别 =\'" & r("性别") & "\' and 年龄下限 <= " & r("年龄") & " and 年龄上限 > " & r("年龄") & " and 数值下限 <= " & r("三十秒反复坐起") & " And 数值上限 > " & r("三十秒反复坐起") )
If dr IsNot Nothing
r("三十秒反复坐起评价") = dr("评价")
End If
End If
Next
For Each r As Row In Tables("测试数据").rows
If r.isnull("年龄") = False And r.isnull("性别") = False And r.isnull("体脂率") = False Then
Dim dr As DataRow = DataTables("体脂率标准").find("性别 =\'" & r("性别") & "\' and 年龄下限 <= " & r("年龄") & " and 年龄上限 > " & r("年龄") & " and 数值下限 <= " & r("体脂率") & " And 数值上限 > " & r("体脂率") )
If dr IsNot Nothing
r("体脂率评价") = dr("评价")
End If
End If
Next
For Each r As Row In Tables("测试数据").rows
If r.isnull("年龄") = False And r.isnull("性别") = False And r.isnull("TUG单任务") = False Then
Dim dr As DataRow = DataTables("TUG单任务标准").find("性别 =\'" & r("性别") & "\' and 年龄下限 <= " & r("年龄") & " and 年龄上限 > " & r("年龄") & " and 数值下限 <= " & r("TUG单任务") & " And 数值上限 > " & r("TUG单任务") )
If dr IsNot Nothing
r("TUG单任务评价") = dr("评价")
End If
End If
Next
For Each r As Row In Tables("测试数据").rows
If r.isnull("年龄") = False And r.isnull("性别") = False And r.isnull("TUG双任务") = False Then
Dim dr As DataRow = DataTables("TUG双任务标准").find("性别 =\'" & r("性别") & "\' and 年龄下限 <= " & r("年龄") & " and 年龄上限 > " & r("年龄") & " and 数值下限 <= " & r("TUG双任务") & " And 数值上限 > " & r("TUG双任务") )
If dr IsNot Nothing
r("TUG双任务评价") = dr("评价")
End If
End If
Next
For Each r As Row In Tables("测试数据").rows
If r.isnull("年龄") = False And r.isnull("性别") = False And r.isnull("十米步行Fast") = False Then
Dim dr As DataRow = DataTables("十米步行Fast标准").find("性别 =\'" & r("性别") & "\' and 年龄下限 <= " & r("年龄") & " and 年龄上限 > " & r("年龄") & " and 数值下限 <= " & r("十米步行Fast") & " And 数值上限 > " & r("十米步行Fast") )
If dr IsNot Nothing
r("十米步行Fast评价") = dr("评价")
End If
End If
Next
For Each r As Row In Tables("测试数据").rows
If r.isnull("年龄") = False And r.isnull("性别") = False And r.isnull("六分钟步行") = False Then
Dim dr As DataRow = DataTables("六分钟步行标准").find("性别 =\'" & r("性别") & "\' and 年龄下限 <= " & r("年龄") & " and 年龄上限 > " & r("年龄") & " and 数值下限 <= " & r("六分钟步行") & " And 数值上限 > " & r("六分钟步行") )
If dr IsNot Nothing
r("六分钟步行评价") = dr("评价")
End If
End If
Next