老师好,我有两个问题
第1个问题,"考勤表"的datacolchanged事件设置了手工编号填充数据,但是在表"GZFFB"中出现了大量重复的数据,请问我应该如何修改代码?
第2个问题,请问在项目事件的datacolchanged事件中如何设置,让表"考勤表"和"GZFFB"同步更新呢? 谢谢
"考勤表"的datacolchanged事件设置,如下:
Dim Vals As List(Of String())
Vals = DataTables("考勤表").GetValues("时段|工号|ID|姓名|岗位|入职时间|日薪|天数|加班费|MPESA")
For i As Integer = 0 To Vals.Count - 1
Dim dr As DataRow = DataTables("GZFFB").AddNew()
dr("时段") = Vals(i)(0)
dr("工号") = Vals(i)(1)
dr("ID") = Vals(i)(2)
dr("姓名") = Vals(i)(3)
dr("岗位") = Vals(i)(4)
dr("入职时间") = Vals(i)(5)
dr("日薪") = Vals(i)(6)
dr("天数") = Vals(i)(7)
dr("加班费") = Vals(i)(8)
dr("MPESA") = Vals(i)(9)
Next