Save with SaveToolStripButton
Private Sub SaveToolStripButton_Click(sender As Object, e As EventArgs) Handles SaveToolStripButton.Click
Dim frm As Object = Me.ActiveMdiChild
If frm Is Nothing Then Return
Call frm.save()
End Sub
In form mdiChild
Public Class frmChangePassword
Public Sub Save()
Dim Query As String
Dim sDB = New sqlDB
Query = "insert jnsbrg(kelomp_brg,nm_jns_brg) VALUES ('"
Query = Query + txtKelomp_Brg.Text + "','" + txtNm_Jns_Brg.Text + "')"
sDB.executeSQL(Query)
MDIParent1.SaveToolStripButton.Enabled = False
MDIParent1.NewToolStripButton.Enabled = True
End Sub
End Class
No comments:
Post a Comment