📄 play_manage.vb
字号:
Me.txt_birthday.Size = New System.Drawing.Size(80, 21)
Me.txt_birthday.TabIndex = 4
Me.txt_birthday.Text = ""
'
'txt_ability
'
Me.txt_ability.Location = New System.Drawing.Point(72, 48)
Me.txt_ability.Name = "txt_ability"
Me.txt_ability.Size = New System.Drawing.Size(64, 21)
Me.txt_ability.TabIndex = 3
Me.txt_ability.Text = ""
'
'label4
'
Me.label4.Location = New System.Drawing.Point(8, 48)
Me.label4.Name = "label4"
Me.label4.Size = New System.Drawing.Size(56, 16)
Me.label4.TabIndex = 2
Me.label4.Text = "能力"
'
'txt_position
'
Me.txt_position.Location = New System.Drawing.Point(72, 16)
Me.txt_position.Name = "txt_position"
Me.txt_position.Size = New System.Drawing.Size(72, 21)
Me.txt_position.TabIndex = 1
Me.txt_position.Text = ""
'
'label3
'
Me.label3.Location = New System.Drawing.Point(8, 24)
Me.label3.Name = "label3"
Me.label3.Size = New System.Drawing.Size(48, 16)
Me.label3.TabIndex = 0
Me.label3.Text = "位置"
'
'GroupBox3
'
Me.GroupBox3.Controls.Add(Me.Button4)
Me.GroupBox3.Controls.Add(Me.Button3)
Me.GroupBox3.Controls.Add(Me.Button2)
Me.GroupBox3.Controls.Add(Me.Button1)
Me.GroupBox3.Location = New System.Drawing.Point(264, 200)
Me.GroupBox3.Name = "GroupBox3"
Me.GroupBox3.Size = New System.Drawing.Size(216, 160)
Me.GroupBox3.TabIndex = 2
Me.GroupBox3.TabStop = False
Me.GroupBox3.Text = "操作"
'
'Button4
'
Me.Button4.Location = New System.Drawing.Point(40, 120)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(80, 24)
Me.Button4.TabIndex = 3
Me.Button4.Text = "刷新"
'
'Button3
'
Me.Button3.Location = New System.Drawing.Point(40, 88)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(80, 24)
Me.Button3.TabIndex = 2
Me.Button3.Text = "训练"
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(40, 56)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(80, 24)
Me.Button2.TabIndex = 1
Me.Button2.Text = "加薪"
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(40, 24)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(80, 24)
Me.Button1.TabIndex = 0
Me.Button1.Text = "转会"
'
'MainMenu1
'
Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem2})
'
'MenuItem1
'
Me.MenuItem1.Index = 0
Me.MenuItem1.Text = "球员"
'
'MenuItem2
'
Me.MenuItem2.Index = 1
Me.MenuItem2.Text = "阵型"
'
'SqlDataAdapter1
'
Me.SqlDataAdapter1.SelectCommand = Me.SqlSelectCommand1
Me.SqlDataAdapter1.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "Club", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("cid", "cid"), New System.Data.Common.DataColumnMapping("name", "name"), New System.Data.Common.DataColumnMapping("capital", "capital"), New System.Data.Common.DataColumnMapping("rank", "rank"), New System.Data.Common.DataColumnMapping("sid", "sid"), New System.Data.Common.DataColumnMapping("uid", "uid"), New System.Data.Common.DataColumnMapping("pid", "pid"), New System.Data.Common.DataColumnMapping("name1", "name1"), New System.Data.Common.DataColumnMapping("salary", "salary"), New System.Data.Common.DataColumnMapping("value", "value"), New System.Data.Common.DataColumnMapping("willingtosell", "willingtosell"), New System.Data.Common.DataColumnMapping("height", "height"), New System.Data.Common.DataColumnMapping("weight", "weight"), New System.Data.Common.DataColumnMapping("gender", "gender"), New System.Data.Common.DataColumnMapping("position", "position"), New System.Data.Common.DataColumnMapping("birthday", "birthday"), New System.Data.Common.DataColumnMapping("cid1", "cid1")})})
'
'SqlSelectCommand1
'
Me.SqlSelectCommand1.CommandText = "SELECT Club.cid, Club.name, Club.capital, Club.rank, Club.sid, Club.uid, Player.p" & _
"id, Player.name AS Expr1, Player.salary, Player.value, Player.willingtosell, Pla" & _
"yer.height, Player.weight, Player.gender, Player.position, Player.birthday, Play" & _
"er.cid AS Expr2 FROM Club INNER JOIN Player ON Club.cid = Player.cid"
Me.SqlSelectCommand1.Connection = Me.SqlConnection1
'
'SqlConnection1
'
Me.SqlConnection1.ConnectionString = "initial catalog=footballplayer_change;integrated security=SSPI;persist security i" & _
"nfo=False;user id=sa;workstation id=TJ-SONG;packet size=4096"
'
'DataSet11
'
Me.DataSet11.DataSetName = "DataSet1"
Me.DataSet11.Locale = New System.Globalization.CultureInfo("zh-CN")
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(24, 40)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(176, 56)
Me.Label1.TabIndex = 0
Me.Label1.Text = "阵形图"
'
'GroupBox4
'
Me.GroupBox4.Controls.Add(Me.Label1)
Me.GroupBox4.Location = New System.Drawing.Point(264, 24)
Me.GroupBox4.Name = "GroupBox4"
Me.GroupBox4.Size = New System.Drawing.Size(232, 144)
Me.GroupBox4.TabIndex = 3
Me.GroupBox4.TabStop = False
Me.GroupBox4.Text = "GroupBox4"
'
'play_manage
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.BackgroundImage = CType(resources.GetObject("$this.BackgroundImage"), System.Drawing.Image)
Me.ClientSize = New System.Drawing.Size(600, 401)
Me.Controls.Add(Me.GroupBox4)
Me.Controls.Add(Me.GroupBox3)
Me.Controls.Add(Me.GroupBox2)
Me.Controls.Add(Me.GroupBox1)
Me.Menu = Me.MainMenu1
Me.Name = "play_manage"
Me.Text = "club_manage"
Me.GroupBox1.ResumeLayout(False)
CType(Me.playerlist, System.ComponentModel.ISupportInitialize).EndInit()
Me.GroupBox2.ResumeLayout(False)
Me.GroupBox3.ResumeLayout(False)
CType(Me.DataSet11, System.ComponentModel.ISupportInitialize).EndInit()
Me.GroupBox4.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub GroupBox3_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox3.Enter
End Sub
Private Sub club_manage_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
filldatasetandview()
bindfields()
info_bind()
End Sub
Private Sub DataGrid1_Navigate(ByVal sender As System.Object, ByVal ne As System.Windows.Forms.NavigateEventArgs) Handles playerlist.Navigate
End Sub
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
Dim team As team = New team()
team.Show()
End Sub
Private Sub playerlist_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles playerlist.Click
selected = playerlist.CurrentRowIndex()
mycurrencymanager.Position = selected
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim tempset As DataSet = New DataSet()
Dim tempadapter As SqlDataAdapter = New SqlDataAdapter()
Dim myCommand As SqlCommand = New SqlCommand()
myCommand.CommandType = CommandType.StoredProcedure
myCommand.Connection = myconnection
myCommand.CommandText = "p_buying"
myCommand.Parameters.Add("@playername", txt_playname.Text)
myCommand.Parameters.Add("@uid", main.tempuid)
myCommand.Parameters.Add("@value", CDbl(txt_value.Text))
tempadapter.SelectCommand = myCommand
myconnection.Open()
Try
tempadapter.SelectCommand.ExecuteNonQuery()
Catch ex As Exception
MsgBox(ex.ToString)
End Try
'myadapter.SelectCommand.ExecuteNonQuery()
myconnection.Close()
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txt_ability.TextChanged
End Sub
Private Sub GroupBox2_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox2.Enter
End Sub
Private Sub txt_position_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txt_position.TextChanged
End Sub
Private Sub txt_playname_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txt_playname.TextChanged
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
temp_addsalary_pid = txt_pid.Text
Dim add_salary As New add_salary()
add_salary.ShowDialog()
Me.Dispose()
Dim play_manage As New play_manage()
play_manage.Show()
End Sub
Private Sub txt_pid_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txt_pid.TextChanged
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -