You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
Try
If txtClassNumber.Text = "" Then
MsgBox("Fadlan ku qor numberka classka ")
txtClassNumber.Focus()
Exit Sub
End If
If txtNumberofTables.Text = "" Then
MsgBox("Fadlan ku qor Tirada miisaska")
txtNumberofTables.Focus()
Exit Sub
End If
If txtNumberofChairs.Text = "" Then
MsgBox("Fadlan ku qor Tirada kuraasta")
txtNumberofChairs.Focus()
Exit Sub
End If
con = New OleDbConnection(cs)
con.Open()
Dim cb As String = "insert into [class] VALUES (" & txtClassNumber.Text & ",'" & txtNumberofTables.Text & "','" & txtNumberofChairs.Text & "')"
cmd = New OleDbCommand(cb)
cmd.Connection = con
cmd.ExecuteReader()
MessageBox.Show("Saved Successfully", "Record", MessageBoxButtons.OK, MessageBoxIcon.Information)
Reset()
Catch ex As Exception
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
Private Sub btnReset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReset.Click
Reset()
End Sub
Sub Reset()
txtClassNumber.Text = ""
txtNumberofTables.Text = ""
txtNumberofChairs.Text = ""
txtClassNumber.Focus()
End Sub
Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click
End
End Sub
End Class
The text was updated successfully, but these errors were encountered:
Imports System.Data.OleDb
Public Class frm_class
End Class
The text was updated successfully, but these errors were encountered: