Professional Documents
Culture Documents
COMMUNITY
FACILITIES
SYSTEM CODES
LOGIN.vb
Imports MySql.Data.MySqlClient
Public Class Login
Private Sub TextBox1_Enter(sender As Object, e As EventArgs) Handles
TextBoxusername.Enter
Dim username As String = TextBoxusername.Text
If username.Trim().ToLower() = "username" Or username.Trim() = "" Then
TextBoxusername.Text = ""
TextBoxusername.ForeColor = Color.Black
End If
End Sub
TextBoxusername.Text = "username"
TextBoxusername.ForeColor = Color.DarkGray
End If
End Sub
TextBoxpassword.Text = ""
TextBoxpassword.ForeColor = Color.Black
TextBoxpassword.UseSystemPasswordChar = True
End If
End Sub
TextBoxpassword.Text = "Password"
TextBoxpassword.ForeColor = Color.DarkGray
TextBoxpassword.UseSystemPasswordChar = False
End If
End Sub
End If
adapter.SelectCommand = command
adapter.Fill(table)
End Sub
End Sub
End Class
REGISTER.vb
Imports MySql.Data.MySqlClient
Public Class Register
adapter.SelectCommand = command
adapter.Fill(table)
Return True
Else
Return False
End If
End Function
Else
Dim conn As New MY_CONNECTION()
Dim command As New MySqlCommand("INSERT INTO `users`(`firstname`, `lastname`,
`username`, `email`, `password`) VALUES (@fn, @ln,@usn, @email, @pass)",
conn.getConnection)
conn.openConnection()
If command.ExecuteNonQuery() = 1 Then
End If
End If
End Sub
Private Sub LinkLabel1_LinkClicked(sender As Object, e As
LinkLabelLinkClickedEventArgs)
Me.Hide()
Dim lform As New Login()
lform.Show()
End Sub
Private Sub Firstname_Enter(sender As Object, e As EventArgs) Handles Firstname.Enter
LabelFn.ForeColor = Color.Red
End Sub
End Class
MAINFORM.vb
Public Class Mainform
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Me.Hide()
Dim lform As New San_juan_medical()
lform.Show()
End Sub
Sub openConnection()
Sub closeConnection()
End Sub
End Sub
Else
Dim conn As New MY_CONNECTION()
Dim command As New MySqlCommand("INSERT INTO `csmc_schedule`(`Full name`,
`Contact no`, `Full Address`, `Email Address`, `Message`) VALUES (@Flname, @cont, @Adds,
@Eadds, @message)", conn.getConnection)
conn.openConnection()
If command.ExecuteNonQuery() = 1 Then
MessageBox.Show("Your form is under review Please wait the email of the
hospital in you submited Email Account", " Registration Successfully ",
MessageBoxButtons.OK, MessageBoxIcon.Information)
conn.closeConnection()
Else
End If
Imports MySql.Data.MySqlClient
Public Class SJM_sched_form
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim FLname1 As String = TextBoxFullname1.Text
Dim Cont1 As String = TextBoxContact1.Text
Dim Adds1 As String = TextBoxAddress1.Text
Dim Eadd1 As String = TextBoxEmailAdd1.Text
Dim messages1 As String = TextBoxMessage1.Text
Else
Dim conn As New MY_CONNECTION()
Dim command As New MySqlCommand("INSERT INTO `sjm_schedule form`(`Full name`,
`Contact no`, `Full Address`, `Email Address`, `Message`) VALUES (@flname1, @Cont1,
@Adds1, @Eadds1, @message1)", conn.getConnection)
conn.openConnection()
If command.ExecuteNonQuery() = 1 Then
MessageBox.Show("Your form is under review Please wait the email of the
hospital in you submited Email Account", " Registration Successfully ",
MessageBoxButtons.OK, MessageBoxIcon.Information)
conn.closeConnection()
Else
MessageBox.Show("Registration Denied Please Check The Form", "Missing
data", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
conn.closeConnection()
End If
Imports MySql.Data.MySqlClient
Public Class STMDP_sched_form
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim FLname2 As String = TextBoxFullname2.Text
Dim Cont2 As String = TextBoxContact2.Text
Dim Adds2 As String = TextBoxAddress2.Text
Dim Eadd2 As String = TextBoxEmailAdd2.Text
Dim messages2 As String = TextBoxMessage2.Text
Else
Dim conn As New MY_CONNECTION()
Dim command As New MySqlCommand("INSERT INTO `stmdp_schedule fom`(`Full
name`, `Contact no`, `Full Address`, `Email Address`, `Message`) VALUES (@flname2,
@Cont2, @Adds2, @Eadds2, @message2)", conn.getConnection)
conn.openConnection()
If command.ExecuteNonQuery() = 1 Then
MessageBox.Show("Your form is under review Please wait the email of the
hospital in you submited Email Account", " Registration Successfully ",
MessageBoxButtons.OK, MessageBoxIcon.Information)
conn.closeConnection()
Else