Dim deathTime As String = e.Form.Controls("deathTime").Value
If deathTime= "" Then
Messagebox.show("请填写死亡时间!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Return
End If
Dim dr1 As DataRow=Tables("person").Current.DataRow()
Dim dr2 As DataRow = Tables("history").Current.DataRow()
For Each dc As DataCol In DataTables("person").DataCols
dr2(dc.Name) = dr1(dc.name)
Next
With Tables("history")
If .Current IsNot Nothing Then
.Current.Save()
End If
End With
DataTables("history").load
With Tables("person")
If .Current IsNot Nothing Then
.Current.Delete
End If
End With
Tables("person").Save
e.Form.close
老师,您看我这段代码有啥问题么?
1、在修改窗口如果把状态换成死亡的话,就跳到附加信息页面,这是导入历史库按钮的代码?每次导入都空的,而且还把人员库的也删除了