Dim s As String = "死亡1人,受伤-人,失踪22人"
Dim ss() As String = s.Split(",")
For Each a As String In ss
Dim b As String = Left(a, 2)
Dim c As String = a.Replace(b, "").Replace("人", "")
Output.Show(b & "人数=" & c)
Next
If e.DataCol.Name = "分组统计" Then
If e.DataRow("分组统计") = True Then
For Each dr1 As DataRow In DataTables("表11").select("分组统计 = true")
Dim dr2 As DataRow = DataTables("表12").find("项目编号='" & dr1("项目编号") & "'")
If dr2 Is Nothing Then
'’ Dim s As String = "死亡1人,受伤-人,失踪22人"
Dim s As String = dr1("战报主要情况")
Dim ss() As String = s.Split(",")
For Each a As String In ss
Dim b As String = Left(a, 2)
Dim c As String = a.Replace(b, "").Replace("人", "")
'’ Output.Show(b & "人数=" & c)
dr2 = DataTables("表12").AddNew()
dr2("项目编号") = dr1("项目编号")
dr2("死亡人数") = ss(0)
dr2("受伤人数") = ss(1)
dr2("失踪人数") = ss(2)
'’ 老师, 这里如何将数据C填到对应的列中?
Next
End If
Next
Else
DataTables("表12").deletefor("项目编号 = '" & e.DataRow("项目编号") & "'")
End If
End If
If dr2 Is Nothing Then
'’ Dim s As String = "死亡1人,受伤-人,失踪22人"
Dim s As String = dr1("战报主要情况")
Dim ss() As String = s.Split(",")
dr2 = DataTables("表12").AddNew()
dr2("项目编号") = dr1("项目编号") For Each a As String In ss
Dim b As String = Left(a, 2)
Dim c As String = a.Replace(b, "").Replace("人", "")
'’ Output.Show(b & "人数=" & c)
dr2(b & "人数") = c
Next