老师,测试下来是下面这段代码的2以后的代码有错。思路是:A表自动复制到B表,然后相关人员在B表操作代码2后的列,然后将在B表操作的列自动复制到A表对应的行的单位格(列)。请老师帮我处理一下,谢谢
If e.DataCol.Name = "sbzgb" AndAlso e.DataRow("sbzgb") = True Then
Dim dr As DataRow = DataTables("ZJsqB").AddNew
For Each dc As DataCol In DataTables("ZJsqB").DataCols
dr(dc.Name) = e.DataRow(dc.Name)
Next
End If
MessageBox.Show(1)
If e.DataCol.Name = "SQDbh" Then
MessageBox.Show(2)
e.DataRow("总工办") = DataTables("ZJSQB").Compute("总工办","[SQDBH] = '" & e.NewValue & "'")
MessageBox.Show(3)
e.DataRow("JTZGB1") = DataTables("ZJSQB").Compute("JTZGB1","[SQDBH] = '" & e.NewValue & "'")
e.DataRow("JTZGB2") = DataTables("ZJSQB").Compute("JTZGB2","[SQDBH] = '" & e.NewValue & "'")
e.DataRow("JTZGB3") = DataTables("ZJSQB").Compute("JTZGB3","[SQDBH] = '" & e.NewValue & "'")
e.DataRow("时间5") = DataTables("ZJSQB").Compute("时间5","[SQDBH] = '" & e.NewValue & "'")
e.DataRow("集团财务1") = DataTables("ZJSQB").Compute("集团财务1","[SQDBH] = '" & e.NewValue & "'")
e.DataRow("JTCWB1") = DataTables("ZJSQB").Compute("JTCWB1","[SQDBH] = '" & e.NewValue & "'")
e.DataRow("JTCWB2") = DataTables("ZJSQB").Compute("JTCWB2","[SQDBH] = '" & e.NewValue & "'")
e.DataRow("JTCWB3") = DataTables("ZJSQB").Compute("JTCWB3","[SQDBH] = '" & e.NewValue & "'")
e.DataRow("时间6") = DataTables("ZJSQB").Compute("时间6","[SQDBH] = '" & e.NewValue & "'")
e.DataRow("集团副总") = DataTables("ZJSQB").Compute("集团副总","[SQDBH] = '" & e.NewValue & "'")
e.DataRow("时间7") = DataTables("ZJSQB").Compute("时间7","[SQDBH] = '" & e.NewValue & "'")
e.DataRow("资金副总") = DataTables("ZJSQB").Compute("资金副总","[SQDBH] = '" & e.NewValue & "'")
e.DataRow("时间8") = DataTables("ZJSQB").Compute("时间8","[SQDBH] = '" & e.NewValue & "'")
e.DataRow("董事长1") = DataTables("ZJSQB").Compute("董事长1","[SQDBH] = '" & e.NewValue & "'")
e.DataRow("董事长2") = DataTables("ZJSQB").Compute("董事长2","[SQDBH] = '" & e.NewValue & "'")
e.DataRow("董事长3") = DataTables("ZJSQB").Compute("董事长3","[SQDBH] = '" & e.NewValue & "'")
e.DataRow("时间9") = DataTables("ZJSQB").Compute("时间9","[SQDBH] = '" & e.NewValue & "'")
e.DataRow("PZJE") = DataTables("ZJSQB").Compute("PZJE","[SQDBH] = '" & e.NewValue & "'")
e.DataRow("PZJE1") = DataTables("ZJSQB").Compute("PZJE1","[SQDBH] = '" & e.NewValue & "'")
e.DataRow("PZJE2") = DataTables("ZJSQB").Compute("PZJE2","[SQDBH] = '" & e.NewValue & "'")
End If