Forms("游戏个人数据").Controls("TabControl1").SelectedIndex = vars("page")
Tables("游戏个人数据_龙源宝藏").AllowEdit = True
If Tables("龙源宝藏").Rows.Count > 0 Then
Dim r As Row = Tables("龙源宝藏").current
Tables("游戏个人数据_龙源宝藏").Filter = "学生编号 = '"& r("学生编号") &"'" '筛选印章数据
Tables("游戏个人数据_宝藏消费").Filter = "学生编号 = '"& r("学生编号") &"'" '筛选消费数据
Tables("游戏个人数据_成长勋章").Filter = "学生编号 = '"& r("学生编号") &"'"
Tables("游戏个人数据_金币借贷").Filter = "学生编号 = '"& r("学生编号") &"'"
Tables("游戏个人数据_龙源宝藏").Sort = "日期 DESC"
Tables("游戏个人数据_宝藏消费").Sort = "日期 DESC"
Tables("游戏个人数据_成长勋章").Sort = "日期 DESC"
'-----------精确定位行--------------------------
If Tables("游戏个人数据_龙源宝藏").Rows.count > 0 Then
Dim wz As Integer = Tables("游戏个人数据_龙源宝藏").FindRow("流水号 = '" & r("流水号") & "'")
If wz >=0 Then
Tables("游戏个人数据_龙源宝藏").Position = wz
End If
End If
'-----------精确定位行--------------------------
Dim dr2 As DataRow = DataTables("学生信息").find("学生编号 = '"& r("学生编号") &"'")
Dim zp As WinForm.PictureBox = e.Form.Controls("照片")
zp.ImageFile = dr2("照片")
Dim yqyz As WinForm.TextBox = e.Form.Controls("运气印章")
Dim dqyz As WinForm.TextBox = e.Form.Controls("当前印章")
Dim dqjb As WinForm.TextBox = e.Form.Controls("当前金币")
Dim jblj As WinForm.TextBox = e.Form.Controls("金币累计")
Dim xflj As WinForm.TextBox = e.Form.Controls("消费累计")
Dim jbye As WinForm.TextBox = e.Form.Controls("金币余额")
Dim qjtf As WinForm.TextBox = e.Form.Controls("请假退费")
Dim tfye As WinForm.TextBox = e.Form.Controls("托费余额")
Dim sum As Integer = 0
Dim sum2 As Integer = 0
'--------------计算当前学生的有效印章数量----------------------
Dim drs As List(Of DataRow) = DataTables("龙源宝藏").Select("学生编号 = '"& r("学生编号") &"' And 印章有效 = 1")
If drs.Count > 0 Then
For Each dr As DataRow In drs
Dim yxyz As Integer = dr("路队") + dr("用餐") + dr("午休") + dr("作业") + dr("运气") + dr("惩罚") + dr("印章补差")
sum = sum + yxyz
Next
End If
dqyz.value = sum
'--------------计算当前学生的有效印章数量----------------------
'--------------计算当前学生的有效运气印章数量----------------------
Dim drs2 As List(Of DataRow) = DataTables("龙源宝藏").Select("学生编号 = '"& r("学生编号") &"' And 运气有效 = 1")
If drs2.Count > 0 Then
For Each dr As DataRow In drs2
Dim yxyq As Integer = dr("路队") + dr("用餐") + dr("午休") + dr("作业") + dr("惩罚") + dr("印章补差")
sum2 = sum2 + yxyq
Next
End If
yqyz.value = sum2
'--------------计算当前学生的有效运气印章数量----------------------
'--------------窗口累计金币赋值----------------
jblj.value = dr2("累计获得金币")
dqjb.value = dr2("金币")
End If