⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmbooksort.vb

📁 The Management Information System of Library using .NET
💻 VB
📖 第 1 页 / 共 2 页
字号:
Public Class frmbooksort
    Inherits System.Windows.Forms.Form
    Public strPubConnection As String
#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 dbgbooksort As System.Windows.Forms.DataGrid
    Friend WithEvents SqlSelectCommand1 As System.Data.SqlClient.SqlCommand
    Friend WithEvents SqlInsertCommand1 As System.Data.SqlClient.SqlCommand
    Friend WithEvents SqlUpdateCommand1 As System.Data.SqlClient.SqlCommand
    Friend WithEvents SqlDeleteCommand1 As System.Data.SqlClient.SqlCommand
    Friend WithEvents cnlib2004 As System.Data.SqlClient.SqlConnection
    Friend WithEvents dabooksort As System.Data.SqlClient.SqlDataAdapter
    Friend WithEvents Dsbooksort1 As library.dsbooksort
    Friend WithEvents btnSave2 As System.Windows.Forms.Button
    Friend WithEvents txtBooksort As library.mytextbox
    Friend WithEvents txtBookmark As library.mytextbox
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
    Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
    Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
    Friend WithEvents btnDelete As System.Windows.Forms.Button
    Friend WithEvents btnReset As System.Windows.Forms.Button
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.dbgbooksort = New System.Windows.Forms.DataGrid
        Me.Dsbooksort1 = New library.dsbooksort
        Me.SqlSelectCommand1 = New System.Data.SqlClient.SqlCommand
        Me.cnlib2004 = New System.Data.SqlClient.SqlConnection
        Me.SqlInsertCommand1 = New System.Data.SqlClient.SqlCommand
        Me.SqlUpdateCommand1 = New System.Data.SqlClient.SqlCommand
        Me.SqlDeleteCommand1 = New System.Data.SqlClient.SqlCommand
        Me.dabooksort = New System.Data.SqlClient.SqlDataAdapter
        Me.txtBooksort = New library.mytextbox
        Me.txtBookmark = New library.mytextbox
        Me.btnSave2 = New System.Windows.Forms.Button
        Me.GroupBox1 = New System.Windows.Forms.GroupBox
        Me.GroupBox2 = New System.Windows.Forms.GroupBox
        Me.GroupBox3 = New System.Windows.Forms.GroupBox
        Me.btnDelete = New System.Windows.Forms.Button
        Me.btnReset = New System.Windows.Forms.Button
        CType(Me.dbgbooksort, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.Dsbooksort1, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.GroupBox1.SuspendLayout()
        Me.GroupBox2.SuspendLayout()
        Me.GroupBox3.SuspendLayout()
        Me.SuspendLayout()
        '
        'dbgbooksort
        '
        Me.dbgbooksort.AllowNavigation = False
        Me.dbgbooksort.AllowSorting = False
        Me.dbgbooksort.BackColor = System.Drawing.SystemColors.Info
        Me.dbgbooksort.BackgroundColor = System.Drawing.SystemColors.ControlLightLight
        Me.dbgbooksort.CaptionVisible = False
        Me.dbgbooksort.ColumnHeadersVisible = False
        Me.dbgbooksort.DataMember = "booksort"
        Me.dbgbooksort.DataSource = Me.Dsbooksort1
        Me.dbgbooksort.Dock = System.Windows.Forms.DockStyle.Fill
        Me.dbgbooksort.HeaderForeColor = System.Drawing.SystemColors.ControlText
        Me.dbgbooksort.Location = New System.Drawing.Point(3, 17)
        Me.dbgbooksort.Name = "dbgbooksort"
        Me.dbgbooksort.ParentRowsVisible = False
        Me.dbgbooksort.ReadOnly = True
        Me.dbgbooksort.Size = New System.Drawing.Size(242, 220)
        Me.dbgbooksort.TabIndex = 5
        '
        'Dsbooksort1
        '
        Me.Dsbooksort1.DataSetName = "dsbooksort"
        Me.Dsbooksort1.Locale = New System.Globalization.CultureInfo("zh-CN")
        '
        'SqlSelectCommand1
        '
        Me.SqlSelectCommand1.CommandText = "SELECT Book_sort, Sort_remarks FROM booksort"
        Me.SqlSelectCommand1.Connection = Me.cnlib2004
        '
        'SqlInsertCommand1
        '
        Me.SqlInsertCommand1.CommandText = "INSERT INTO booksort(Book_sort, Sort_remarks) VALUES (@Book_sort, @Sort_remarks);" & _
        " SELECT Book_sort, Sort_remarks FROM booksort WHERE (Book_sort = @Book_sort)"
        Me.SqlInsertCommand1.Connection = Me.cnlib2004
        Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Book_sort", System.Data.SqlDbType.NVarChar, 50, "Book_sort"))
        Me.SqlInsertCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Sort_remarks", System.Data.SqlDbType.NVarChar, 4000, "Sort_remarks"))
        '
        'SqlUpdateCommand1
        '
        Me.SqlUpdateCommand1.CommandText = "UPDATE booksort SET Book_sort = @Book_sort, Sort_remarks = @Sort_remarks WHERE (B" & _
        "ook_sort = @Original_Book_sort) AND (Sort_remarks = @Original_Sort_remarks OR @O" & _
        "riginal_Sort_remarks IS NULL AND Sort_remarks IS NULL); SELECT Book_sort, Sort_r" & _
        "emarks FROM booksort WHERE (Book_sort = @Book_sort)"
        Me.SqlUpdateCommand1.Connection = Me.cnlib2004
        Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Book_sort", System.Data.SqlDbType.NVarChar, 50, "Book_sort"))
        Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Sort_remarks", System.Data.SqlDbType.NVarChar, 4000, "Sort_remarks"))
        Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_Book_sort", System.Data.SqlDbType.NVarChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Book_sort", System.Data.DataRowVersion.Original, Nothing))
        Me.SqlUpdateCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_Sort_remarks", System.Data.SqlDbType.NVarChar, 4000, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Sort_remarks", System.Data.DataRowVersion.Original, Nothing))
        '
        'SqlDeleteCommand1
        '
        Me.SqlDeleteCommand1.CommandText = "DELETE FROM booksort WHERE (Book_sort = @Original_Book_sort) AND (Sort_remarks = " & _
        "@Original_Sort_remarks OR @Original_Sort_remarks IS NULL AND Sort_remarks IS NUL" & _
        "L)"
        Me.SqlDeleteCommand1.Connection = Me.cnlib2004
        Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_Book_sort", System.Data.SqlDbType.NVarChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Book_sort", System.Data.DataRowVersion.Original, Nothing))
        Me.SqlDeleteCommand1.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Original_Sort_remarks", System.Data.SqlDbType.NVarChar, 4000, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Sort_remarks", System.Data.DataRowVersion.Original, Nothing))
        '
        'dabooksort
        '
        Me.dabooksort.DeleteCommand = Me.SqlDeleteCommand1
        Me.dabooksort.InsertCommand = Me.SqlInsertCommand1
        Me.dabooksort.SelectCommand = Me.SqlSelectCommand1
        Me.dabooksort.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "booksort", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("Book_sort", "Book_sort"), New System.Data.Common.DataColumnMapping("Sort_remarks", "Sort_remarks")})})
        Me.dabooksort.UpdateCommand = Me.SqlUpdateCommand1
        '
        'txtBooksort
        '
        Me.txtBooksort.Dock = System.Windows.Forms.DockStyle.Fill
        Me.txtBooksort.Location = New System.Drawing.Point(3, 17)
        Me.txtBooksort.Name = "txtBooksort"
        Me.txtBooksort.Size = New System.Drawing.Size(178, 21)
        Me.txtBooksort.TabIndex = 0
        Me.txtBooksort.Text = ""
        '
        'txtBookmark
        '
        Me.txtBookmark.Dock = System.Windows.Forms.DockStyle.Fill
        Me.txtBookmark.Location = New System.Drawing.Point(3, 17)
        Me.txtBookmark.Multiline = True
        Me.txtBookmark.Name = "txtBookmark"
        Me.txtBookmark.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
        Me.txtBookmark.Size = New System.Drawing.Size(178, 140)
        Me.txtBookmark.TabIndex = 1
        Me.txtBookmark.Text = ""
        '
        'btnSave2
        '
        Me.btnSave2.Location = New System.Drawing.Point(256, 224)
        Me.btnSave2.Name = "btnSave2"
        Me.btnSave2.Size = New System.Drawing.Size(56, 23)
        Me.btnSave2.TabIndex = 2
        Me.btnSave2.Text = "添加"
        '
        'GroupBox1
        '
        Me.GroupBox1.Controls.Add(Me.dbgbooksort)
        Me.GroupBox1.Location = New System.Drawing.Point(0, 8)
        Me.GroupBox1.Name = "GroupBox1"
        Me.GroupBox1.Size = New System.Drawing.Size(248, 240)
        Me.GroupBox1.TabIndex = 6
        Me.GroupBox1.TabStop = False
        Me.GroupBox1.Text = "图书分类信息"
        '
        'GroupBox2
        '
        Me.GroupBox2.Controls.Add(Me.txtBooksort)
        Me.GroupBox2.Location = New System.Drawing.Point(256, 8)
        Me.GroupBox2.Name = "GroupBox2"
        Me.GroupBox2.Size = New System.Drawing.Size(184, 48)
        Me.GroupBox2.TabIndex = 7
        Me.GroupBox2.TabStop = False
        Me.GroupBox2.Text = "图书类型"
        '
        'GroupBox3
        '
        Me.GroupBox3.Controls.Add(Me.txtBookmark)

⌨️ 快捷键说明

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