欢迎来到虫虫下载站 | 资源下载 资源专辑 关于我们
虫虫下载站

frmquser.vb

需要在.net环境下运行需要安装框架
VB
字号:
Public Class FRMQUser
    Inherits System.Windows.Forms.Form

#Region " Windows 窗体设计器生成的代码 "

    Public Sub New()
        MyBase.New()

        '该调用是 Windows 窗体设计器所必需的。
        InitializeComponent()

        '在 InitializeComponent() 调用之后添加任何初始化

    End Sub

    '窗体重写处置以清理组件列表。
    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 Label1 As System.Windows.Forms.Label
    Friend WithEvents tbUName As System.Windows.Forms.TextBox
    Friend WithEvents btnIF As System.Windows.Forms.Button
    Friend WithEvents btnAll As System.Windows.Forms.Button
    Friend WithEvents DG As System.Windows.Forms.DataGrid
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.DG = New System.Windows.Forms.DataGrid()
        Me.Label1 = New System.Windows.Forms.Label()
        Me.tbUName = New System.Windows.Forms.TextBox()
        Me.btnIF = New System.Windows.Forms.Button()
        Me.btnAll = New System.Windows.Forms.Button()
        CType(Me.DG, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'DG
        '
        Me.DG.DataMember = ""
        Me.DG.HeaderForeColor = System.Drawing.SystemColors.ControlText
        Me.DG.Location = New System.Drawing.Point(8, 32)
        Me.DG.Name = "DG"
        Me.DG.Size = New System.Drawing.Size(456, 240)
        Me.DG.TabIndex = 0
        '
        'Label1
        '
        Me.Label1.Location = New System.Drawing.Point(8, 8)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(48, 16)
        Me.Label1.TabIndex = 1
        Me.Label1.Text = "用户名"
        '
        'tbUName
        '
        Me.tbUName.Location = New System.Drawing.Point(72, 6)
        Me.tbUName.Name = "tbUName"
        Me.tbUName.Size = New System.Drawing.Size(128, 21)
        Me.tbUName.TabIndex = 2
        Me.tbUName.Text = ""
        '
        'btnIF
        '
        Me.btnIF.Location = New System.Drawing.Point(384, 5)
        Me.btnIF.Name = "btnIF"
        Me.btnIF.TabIndex = 3
        Me.btnIF.Text = "条件查询"
        '
        'btnAll
        '
        Me.btnAll.Location = New System.Drawing.Point(280, 5)
        Me.btnAll.Name = "btnAll"
        Me.btnAll.TabIndex = 4
        Me.btnAll.Text = "全部查询"
        '
        'FRMQUser
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
        Me.ClientSize = New System.Drawing.Size(472, 273)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.btnAll, Me.btnIF, Me.tbUName, Me.Label1, Me.DG})
        Me.Name = "FRMQUser"
        Me.Text = "操作记录"
        CType(Me.DG, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub btnAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAll.Click
        Dim sqlStr3 As String = "select * from operaRecord"
        Dim dbopera3 As DbOpera = New DbOpera(sqlStr3)
        DG.DataSource = dbopera3.getDG().DataSource
    End Sub

    Private Sub FRMQUser_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim sqlStr3 As String = "select * from operaRecord"
        Dim dbopera3 As DbOpera = New DbOpera(sqlStr3)
        DG.DataSource = dbopera3.getDG().DataSource
        DG.NavigateTo(0, "marvin")
    End Sub

    Private Sub btnIF_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnIF.Click
        If tbUName.Text = "" Then
            MsgBox("输入用户名!", MsgBoxStyle.Exclamation, "OK")
            Exit Sub
        End If
        Dim sqlStr3 As String = "select * from operaRecord where uName='" & tbUName.Text & "'"
        Dim dbopera3 As DbOpera = New DbOpera(sqlStr3)
        DG.DataSource = dbopera3.getDG().DataSource
    End Sub
End Class

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -