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

📄 play_manage.vb

📁 大型数据库系统程序球员转会系统解决方案
💻 VB
📖 第 1 页 / 共 2 页
字号:
Imports System.Data
Imports System.Data.SqlClient
Imports System.IO
Public Class play_manage
    Inherits System.Windows.Forms.Form
    Dim myconnection As SqlConnection = New _
        SqlConnection("server=(local);database=footballplayer_change;" & _
        "uid=sa;pwd=sa;")
    Dim myadapter As SqlDataAdapter = New SqlDataAdapter("select * from player", myconnection)
    Dim myds As DataSet
    Dim mydv As DataView
    Dim mycurrencymanager As CurrencyManager

    Dim selected As Integer
    Public Shared temp_addsalary_pid As String


    Private Sub filldatasetandview()
        myds = New DataSet()
        Try
            myadapter.Fill(myds, "player")
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
        mydv = New DataView(myds.Tables("player"))
        mycurrencymanager = CType(Me.BindingContext(mydv), CurrencyManager)
    End Sub
    Private Sub bindfields()
        playerlist.DataSource = myds
        playerlist.DataMember = "player"
    End Sub
    Private Sub info_bind()
        txt_position.DataBindings.Clear()
        txt_position.DataBindings.Add("text", mydv, "position")
        txt_ability.DataBindings.Clear()
        txt_ability.DataBindings.Add("text", mydv, "ability")
        txt_birthday.DataBindings.Clear()
        txt_birthday.DataBindings.Add("text", mydv, "birthday")
        txt_playname.DataBindings.Clear()
        txt_playname.DataBindings.Add("text", mydv, "name")
        txt_value.DataBindings.Clear()
        txt_value.DataBindings.Add("text", mydv, "value")
        txt_pid.DataBindings.Clear()
        txt_pid.DataBindings.Add("text", mydv, "pid")
    End Sub

#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 GroupBox1 As System.Windows.Forms.GroupBox
    Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
    Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
    Friend WithEvents GroupBox4 As System.Windows.Forms.GroupBox
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents Button2 As System.Windows.Forms.Button
    Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
    Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
    Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem
    Friend WithEvents SqlDataAdapter1 As System.Data.SqlClient.SqlDataAdapter
    Friend WithEvents SqlSelectCommand1 As System.Data.SqlClient.SqlCommand
    Friend WithEvents SqlConnection1 As System.Data.SqlClient.SqlConnection
    Friend WithEvents DataSet11 As _3012_project.DataSet1
    Friend WithEvents playerlist As System.Windows.Forms.DataGrid
    Friend WithEvents txt_ability As System.Windows.Forms.TextBox
    Friend WithEvents label4 As System.Windows.Forms.Label
    Friend WithEvents txt_position As System.Windows.Forms.TextBox
    Friend WithEvents label3 As System.Windows.Forms.Label
    Friend WithEvents txt_birthday As System.Windows.Forms.TextBox
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents Button1 As System.Windows.Forms.Button
    Friend WithEvents Button3 As System.Windows.Forms.Button
    Friend WithEvents Label5 As System.Windows.Forms.Label
    Friend WithEvents Label6 As System.Windows.Forms.Label
    Friend WithEvents txt_value As System.Windows.Forms.TextBox
    Friend WithEvents txt_playname As System.Windows.Forms.TextBox
    Friend WithEvents Label7 As System.Windows.Forms.Label
    Friend WithEvents txt_pid As System.Windows.Forms.TextBox
    Friend WithEvents Button4 As System.Windows.Forms.Button
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(play_manage))
        Me.GroupBox1 = New System.Windows.Forms.GroupBox
        Me.playerlist = New System.Windows.Forms.DataGrid
        Me.GroupBox2 = New System.Windows.Forms.GroupBox
        Me.txt_pid = New System.Windows.Forms.TextBox
        Me.Label7 = New System.Windows.Forms.Label
        Me.txt_value = New System.Windows.Forms.TextBox
        Me.Label6 = New System.Windows.Forms.Label
        Me.txt_playname = New System.Windows.Forms.TextBox
        Me.Label5 = New System.Windows.Forms.Label
        Me.Label2 = New System.Windows.Forms.Label
        Me.txt_birthday = New System.Windows.Forms.TextBox
        Me.txt_ability = New System.Windows.Forms.TextBox
        Me.label4 = New System.Windows.Forms.Label
        Me.txt_position = New System.Windows.Forms.TextBox
        Me.label3 = New System.Windows.Forms.Label
        Me.GroupBox3 = New System.Windows.Forms.GroupBox
        Me.Button4 = New System.Windows.Forms.Button
        Me.Button3 = New System.Windows.Forms.Button
        Me.Button2 = New System.Windows.Forms.Button
        Me.Button1 = New System.Windows.Forms.Button
        Me.MainMenu1 = New System.Windows.Forms.MainMenu
        Me.MenuItem1 = New System.Windows.Forms.MenuItem
        Me.MenuItem2 = New System.Windows.Forms.MenuItem
        Me.SqlDataAdapter1 = New System.Data.SqlClient.SqlDataAdapter
        Me.SqlSelectCommand1 = New System.Data.SqlClient.SqlCommand
        Me.SqlConnection1 = New System.Data.SqlClient.SqlConnection
        Me.DataSet11 = New _3012_project.DataSet1
        Me.Label1 = New System.Windows.Forms.Label
        Me.GroupBox4 = New System.Windows.Forms.GroupBox
        Me.GroupBox1.SuspendLayout()
        CType(Me.playerlist, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.GroupBox2.SuspendLayout()
        Me.GroupBox3.SuspendLayout()
        CType(Me.DataSet11, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.GroupBox4.SuspendLayout()
        Me.SuspendLayout()
        '
        'GroupBox1
        '
        Me.GroupBox1.Controls.Add(Me.playerlist)
        Me.GroupBox1.Location = New System.Drawing.Point(8, 8)
        Me.GroupBox1.Name = "GroupBox1"
        Me.GroupBox1.Size = New System.Drawing.Size(240, 184)
        Me.GroupBox1.TabIndex = 0
        Me.GroupBox1.TabStop = False
        Me.GroupBox1.Text = "名单"
        '
        'playerlist
        '
        Me.playerlist.DataMember = ""
        Me.playerlist.HeaderForeColor = System.Drawing.SystemColors.ControlText
        Me.playerlist.Location = New System.Drawing.Point(24, 16)
        Me.playerlist.Name = "playerlist"
        Me.playerlist.Size = New System.Drawing.Size(208, 160)
        Me.playerlist.TabIndex = 0
        '
        'GroupBox2
        '
        Me.GroupBox2.Controls.Add(Me.txt_pid)
        Me.GroupBox2.Controls.Add(Me.Label7)
        Me.GroupBox2.Controls.Add(Me.txt_value)
        Me.GroupBox2.Controls.Add(Me.Label6)
        Me.GroupBox2.Controls.Add(Me.txt_playname)
        Me.GroupBox2.Controls.Add(Me.Label5)
        Me.GroupBox2.Controls.Add(Me.Label2)
        Me.GroupBox2.Controls.Add(Me.txt_birthday)
        Me.GroupBox2.Controls.Add(Me.txt_ability)
        Me.GroupBox2.Controls.Add(Me.label4)
        Me.GroupBox2.Controls.Add(Me.txt_position)
        Me.GroupBox2.Controls.Add(Me.label3)
        Me.GroupBox2.Location = New System.Drawing.Point(8, 192)
        Me.GroupBox2.Name = "GroupBox2"
        Me.GroupBox2.Size = New System.Drawing.Size(200, 208)
        Me.GroupBox2.TabIndex = 1
        Me.GroupBox2.TabStop = False
        Me.GroupBox2.Text = "球员详细信息"
        '
        'txt_pid
        '
        Me.txt_pid.Location = New System.Drawing.Point(88, 176)
        Me.txt_pid.Name = "txt_pid"
        Me.txt_pid.Size = New System.Drawing.Size(80, 21)
        Me.txt_pid.TabIndex = 11
        Me.txt_pid.Text = ""
        '
        'Label7
        '
        Me.Label7.Location = New System.Drawing.Point(16, 176)
        Me.Label7.Name = "Label7"
        Me.Label7.Size = New System.Drawing.Size(48, 16)
        Me.Label7.TabIndex = 10
        Me.Label7.Text = "球员号"
        '
        'txt_value
        '
        Me.txt_value.Location = New System.Drawing.Point(80, 144)
        Me.txt_value.Name = "txt_value"
        Me.txt_value.Size = New System.Drawing.Size(80, 21)
        Me.txt_value.TabIndex = 9
        Me.txt_value.Text = ""
        '
        'Label6
        '
        Me.Label6.Location = New System.Drawing.Point(8, 144)
        Me.Label6.Name = "Label6"
        Me.Label6.Size = New System.Drawing.Size(56, 16)
        Me.Label6.TabIndex = 8
        Me.Label6.Text = "身价"
        '
        'txt_playname
        '
        Me.txt_playname.Location = New System.Drawing.Point(72, 112)
        Me.txt_playname.Name = "txt_playname"
        Me.txt_playname.Size = New System.Drawing.Size(80, 21)
        Me.txt_playname.TabIndex = 7
        Me.txt_playname.Text = ""
        '
        'Label5
        '
        Me.Label5.Location = New System.Drawing.Point(16, 112)
        Me.Label5.Name = "Label5"
        Me.Label5.Size = New System.Drawing.Size(40, 16)
        Me.Label5.TabIndex = 6
        Me.Label5.Text = "姓名"
        '
        'Label2
        '
        Me.Label2.Location = New System.Drawing.Point(8, 72)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(48, 24)
        Me.Label2.TabIndex = 5
        Me.Label2.Text = "生日"
        '
        'txt_birthday
        '
        Me.txt_birthday.Location = New System.Drawing.Point(72, 80)
        Me.txt_birthday.Name = "txt_birthday"

⌨️ 快捷键说明

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