Public Class frmUserSessions

    Dim progName
    Sub New(progName)
        InitializeComponent()
        Me.progName = progName
    End Sub


    Private Sub frmUserSessions_Load(sender As Object, e As EventArgs) Handles Me.Load
        dgv.SET_SQL("SELECT *  FROM [ADMIN].[dbo].[tblSessions] WHERE sess_progName='" & progName & "' AND sess_logout is null and sess_lastRm > DATEADD(SECOND, -30,  DATEADD(MINUTE, -1,  GETDATE())) order by sess_maName", "ADMIN")
    End Sub

    Private Sub frmUserSessions_Shown(sender As Object, e As EventArgs) Handles Me.Shown
        dgv.LOAD()
    End Sub

    Private Sub btn_Click(sender As Object, e As EventArgs) Handles btn.Click
        dgv.RELOAD()
    End Sub
End Class