老大,第一个我有保存代码:
Dim s1 As String = e.Form.Controls("DropBox1").Value
Dim s2 As String = e.Form.Controls("TextBox1").Value
If s1 ="" Then
MessageBox.Show("请输入旧卡卡号!","提示!")
Return
End If
If s2 ="" Then
MessageBox.Show("请输入要换的新卡卡号!","提示!")
Return
End If
Dim dr As DataRow
dr = DataTables("会员资料").Find("会员卡号 ='" & s1 & "'")
If dr IsNot Nothing Then
dr("会员卡号") = dr("会员卡号").Replace(s1,s2)
MessageBox.Show("已经成功更换了卡号!","提示!")
DataTables("会员换卡").Save()
e.Form.Close()
End If
所以应该保存了.