Sub Cbo_SElect()
sql = "Select DISTINCT WHCode, ShelfCode from BCStkIssueSub"
da = New SqlDataAdapter(sql, cn)
dt_WHCode = New DataTable
da.Fill(dt_WHCode)
Dim dr As DataRow = dt_WHCode.NewRow
dr(0) = "--ระบุ--"
dr(1) = "--ระบุ--"
dt_WHCode.Rows.InsertAt(dr, 0)
If dt_WHCode.Rows.Count > 0 Then
With Cbo_WHCode
.DataSource = dt_WHCode
.DisplayMember = "WHCode"
End With
End If
sql = "Select DISTINCT WHCode, ShelfCode from BCStkIssueSub"
da = New SqlDataAdapter(sql, cn)
dt_ShelfCode = New DataTable
da.Fill(dt_ShelfCode)
Dim dr2 As DataRow = dt_ShelfCode.NewRow
dr2(0) = "--ระบุ--"
dr2(1) = "--ระบุ--"
dt_ShelfCode.Rows.InsertAt(dr, 0)
If dt_ShelfCode.Rows.Count > 0 Then
With Cbo_ShelfCode
.DataSource = dt_ShelfCode
.DisplayMember = "ShelfCode"
End With
End If
End Sub