
Public Class Form1
 
    Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        With frm_Login
            .Show()
            .Focus()
            .PasswordTextBox.Clear()
            .UsernameTextBox.Clear()


        End With
    End Sub


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'MsgBox(DISPLAYDATE(Now, "yyyy-M-d"))
        btnAdmit.Visible = False
        btnStation.Visible = False
        btnDischarge.Visible = False
        btnRooms.Visible = False
        btnPatient.Visible = False
        btnPhysician.Visible = False
        btnManageUser.Visible = False
        btnDiagnosis.Visible = False
        btnReport.Visible = False

    End Sub


  
   
    Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click
        With frm_Login
            If btnLogin.Text = "Login" Then
                .Show()
                .Focus()
                .PasswordTextBox.Clear()
                .UsernameTextBox.Clear()

            Else
                btnAdmit.Visible = False
                btnStation.Visible = False
                btnDischarge.Visible = False
                btnRooms.Visible = False
                btnPatient.Visible = False
                btnPhysician.Visible = False
                btnManageUser.Visible = False
                btnDiagnosis.Visible = False
                btnReport.Visible = False
                btnLogin.Text = "Login"
                lbluser.Text = ""
            End If

        End With
    End Sub

    Private Sub btnAdmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdmit.Click
        With frmEr
            .Show()
            .Focus()

        End With
    End Sub

    Private Sub btnStation_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStation.Click
        With frmStation1
            .lblstation.Text = 1
            .Show()
            .Focus()
        End With
    End Sub

    Private Sub btnDischarge_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDischarge.Click
        With frmDischargeSum
            .Show()
            .Focus()
        End With
    End Sub

    Private Sub btnRooms_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRooms.Click
        With frmRoom
            .Show()
            .Focus()
        End With
    End Sub

    Private Sub btnPhysician_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPhysician.Click
        Try
            With frmPhysician
                .Show()
                .Focus()
            End With
        Catch ex As Exception

        End Try
    End Sub

    Private Sub btnPatient_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPatient.Click
        With frmPatient
            .Show()
            .Focus()

        End With
    End Sub

    Private Sub btnDiagnosis_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDiagnosis.Click
        Try
            With frmDiagnosis
                .Show()
                .Focus()
            End With
        Catch ex As Exception

        End Try
    End Sub

    Private Sub btnManageUser_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnManageUser.Click
        With frm_adduser
            .Show()
            .Focus()
        End With
    End Sub

    Private Sub btnReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReport.Click
        Try
            With frmInventory
                .Show()
                .Focus()

            End With
        Catch ex As Exception

        End Try
    End Sub
End Class
