Imports System.Data.SqlClient
Public Class FrmOutofStock
    'Public Sub loaddata()
    '    Try
    '        Call opencon()
    '        Dim myd As New SqlDataAdapter
    '        With myd
    '            .SelectCommand = New SqlCommand
    '            .SelectCommand.CommandText = "SELECT category ,SUM(qty)As qty FROM stock GROUP BY category HAVING SUM(qty) < 1 "
    '            .SelectCommand.Connection = con
    '        End With

    '        Dim dt2 As New DataTable

    '        myd.Fill(dt2)
    '        dtgv.DataSource = dt2

    '        Call closecon()

    '    Catch ex As Exception
    '        MsgBox(ex.Message)
    '    End Try

    'End Sub
    Private Sub FrmOutofStock_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Call loadtype()

    End Sub
End Class