📄 frmshowmaxau.vb
字号:
Imports System.Data.SqlClientPublic Class frmShowMaxAu Inherits library.frmBase#Region " Windows 窗体设计器生成的代码 " Public Sub New() MyBase.New() '该调用是 Windows 窗体设计器所必需的。 InitializeComponent() '在 InitializeComponent() 调用之后添加任何初始化 End Sub '窗体重写 dispose 以清理组件列表。 Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Windows 窗体设计器所必需的 Private components As System.ComponentModel.IContainer '注意: 以下过程是 Windows 窗体设计器所必需的 '可以使用 Windows 窗体设计器修改此过程。 '不要使用代码编辑器修改它。 Friend WithEvents dbg As System.Windows.Forms.DataGrid
Friend WithEvents btnGet As System.Windows.Forms.Button
Friend WithEvents btnExit As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.dbg = New System.Windows.Forms.DataGrid
Me.btnGet = New System.Windows.Forms.Button
Me.btnExit = New System.Windows.Forms.Button
CType(Me.dbg, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'dbg
'
Me.dbg.AllowNavigation = False
Me.dbg.BackColor = System.Drawing.SystemColors.Info
Me.dbg.BackgroundColor = System.Drawing.SystemColors.Control
Me.dbg.CaptionVisible = False
Me.dbg.DataMember = ""
Me.dbg.Dock = System.Windows.Forms.DockStyle.Top
Me.dbg.ForeColor = System.Drawing.Color.Red
Me.dbg.HeaderForeColor = System.Drawing.SystemColors.ControlText
Me.dbg.Location = New System.Drawing.Point(0, 0)
Me.dbg.Name = "dbg"
Me.dbg.ReadOnly = True
Me.dbg.Size = New System.Drawing.Size(714, 336)
Me.dbg.TabIndex = 0
Me.dbg.TabStop = False
'
'btnGet
'
Me.btnGet.Location = New System.Drawing.Point(260, 352)
Me.btnGet.Name = "btnGet"
Me.btnGet.Size = New System.Drawing.Size(80, 24)
Me.btnGet.TabIndex = 1
Me.btnGet.Text = "获取"
'
'btnExit
'
Me.btnExit.Location = New System.Drawing.Point(380, 352)
Me.btnExit.Name = "btnExit"
Me.btnExit.TabIndex = 2
Me.btnExit.Text = "退出"
'
'frmShowMaxAu
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.ClientSize = New System.Drawing.Size(714, 387)
Me.Controls.Add(Me.btnExit)
Me.Controls.Add(Me.btnGet)
Me.Controls.Add(Me.dbg)
Me.Name = "frmShowMaxAu"
Me.Text = "显示所有超期的读者信息"
CType(Me.dbg, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub#End Region Private Sub btnGet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGet.Click
Dim cn As New SqlConnection(cnstr)
Dim cmd As SqlCommand
Dim da As SqlDataAdapter
Dim ds As New DataSet
cn = New SqlConnection(cnstr)
cmd = New SqlCommand
With cmd
.CommandType = CommandType.StoredProcedure
.CommandText = "SelectMaxDateAuList"
.Connection = cn
End With
da = New SqlDataAdapter(cmd)
Try
da.Fill(ds)
Me.dbg.DataSource = ds.Tables(0)
Catch ex As Exception
MessageBox.Show(ex.Message, "error", MessageBoxButtons.OK, MessageBoxIcon.Stop)
Finally
cn.Close()
If Not cn Is Nothing Then
cn.Dispose()
End If
End Try
End Sub
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
Me.DialogResult = DialogResult.OK
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -