Dim bxr As WinForm.TextBox = e.Form.Controls("被选人")
Dim mr As WinForm.CheckBox = e.Form.Controls("默认")
Dim qj As WinForm.CheckBox = e.Form.Controls("请假")
Dim rq As WinForm.DateTimePicker = e.Form.Controls("日期")
Dim ld As WinForm.ComboBox = e.Form.Controls("路队")
Dim yc As WinForm.ComboBox = e.Form.Controls("用餐")
Dim wx As WinForm.ComboBox = e.Form.Controls("午休")
Dim zy As WinForm.ComboBox = e.Form.Controls("作业")
Dim tdyz As WinForm.ComboBox = e.Form.Controls("团队印章")
Dim cf As WinForm.ComboBox = e.Form.Controls("惩罚")
Dim yq As WinForm.ComboBox = e.Form.Controls("运气")
Dim sm As WinForm.TextBox = e.Form.Controls("说明")
If bxr.value IsNot Nothing Then
Dim Multi As String = bxr.value
Dim vls() As String = Multi.split(",")
Dim lsh As String = Format(today,"yyyyMMdd") \'生成编号的前6位,4位年,2位月.2位日期
For Each vl As String In vls
Dim dr As DataRow = DataTables("学生信息").Find("姓名 = \'" & vl & "\'")
If dr IsNot Nothing Then
Dim dr2 As DataRow = DataTables("龙源宝藏").Find("流水号 = \'" & dr("学生编号") & "-" & lsh & "\'")
If dr2 IsNot Nothing Then
dr2("路队") = ld.value
dr2("用餐") = yc.value
dr2("午休") = wx.value
dr2("作业") = zy.value
dr2("团队印章") = tdyz.value
dr2("惩罚") = cf.value
dr2("运气") = yq.value
dr2("说明") = sm.value
Else
Dim r As Row = Tables("龙源宝藏").AddNew
r("姓名") = dr("姓名")
r("单位") = dr("单位")
r("学生编号") = dr("学生编号")
r("日期") = Today
r("流水号") = dr("学生编号") & "-" & lsh
r("路队") = ld.value
r("用餐") = yc.value
r("午休") = wx.value
r("作业") = zy.value
r("团队印章") = tdyz.value
r("惩罚") = cf.value
r("运气") = yq.value
r("说明") = sm.value
End If
End If
Next
End If