Imports System.Data
Imports System.Data.sqlClient
Imports Gates.DA
Imports Gates.BL
Public Class ctrQuerybyPN
Dim _DBTrans As DBTransaction
Dim _BL As Gates.BL.Common
Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button1.Click
Dim connec As String = Gates.BL.clxMain.CONNECTIONSTRING
Dim reDS As New DataSet
'_DBTrans = New DBTransaction(connec)
_BL = New Common(connec)
reDS = _BL.QueryByPN(TextBox1.Text)
DataGridView1.DataSource = reDS.Tables(0)
DataGridView1.Enabled = True
End Sub End Class
原文链接:https://www.f2er.com/vb/257888.html