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

📄 form9.vb

📁 学生信息管理系统
💻 VB
📖 第 1 页 / 共 3 页
字号:
        Me.TabPage3.Name = "TabPage3"
        Me.TabPage3.Size = New System.Drawing.Size(408, 231)
        Me.TabPage3.TabIndex = 2
        Me.TabPage3.Text = "修改课程"
        '
        'TextBox3
        '
        Me.TextBox3.Location = New System.Drawing.Point(176, 72)
        Me.TextBox3.Name = "TextBox3"
        Me.TextBox3.TabIndex = 7
        Me.TextBox3.Text = ""
        '
        'Label7
        '
        Me.Label7.Location = New System.Drawing.Point(24, 72)
        Me.Label7.Name = "Label7"
        Me.Label7.Size = New System.Drawing.Size(120, 16)
        Me.Label7.TabIndex = 6
        Me.Label7.Text = "修改后的课程名称:"
        '
        'Button6
        '
        Me.Button6.Location = New System.Drawing.Point(184, 152)
        Me.Button6.Name = "Button6"
        Me.Button6.TabIndex = 5
        Me.Button6.Text = "取消"
        '
        'Button5
        '
        Me.Button5.Location = New System.Drawing.Point(48, 152)
        Me.Button5.Name = "Button5"
        Me.Button5.TabIndex = 2
        Me.Button5.Text = "确认"
        '
        'ComboBox4
        '
        Me.ComboBox4.Location = New System.Drawing.Point(176, 16)
        Me.ComboBox4.Name = "ComboBox4"
        Me.ComboBox4.Size = New System.Drawing.Size(80, 20)
        Me.ComboBox4.TabIndex = 1
        '
        'Label6
        '
        Me.Label6.Location = New System.Drawing.Point(24, 16)
        Me.Label6.Name = "Label6"
        Me.Label6.Size = New System.Drawing.Size(128, 16)
        Me.Label6.TabIndex = 0
        Me.Label6.Text = "选择您要修改的课程:"
        '
        'TabPage4
        '
        Me.TabPage4.Controls.Add(Me.Button8)
        Me.TabPage4.Controls.Add(Me.Button7)
        Me.TabPage4.Controls.Add(Me.DataGrid1)
        Me.TabPage4.Location = New System.Drawing.Point(4, 21)
        Me.TabPage4.Name = "TabPage4"
        Me.TabPage4.Size = New System.Drawing.Size(408, 231)
        Me.TabPage4.TabIndex = 3
        Me.TabPage4.Text = "查询课程"
        '
        'Button8
        '
        Me.Button8.Location = New System.Drawing.Point(224, 184)
        Me.Button8.Name = "Button8"
        Me.Button8.Size = New System.Drawing.Size(104, 32)
        Me.Button8.TabIndex = 2
        Me.Button8.Text = "退出"
        '
        'Button7
        '
        Me.Button7.Location = New System.Drawing.Point(56, 184)
        Me.Button7.Name = "Button7"
        Me.Button7.Size = New System.Drawing.Size(104, 32)
        Me.Button7.TabIndex = 1
        Me.Button7.Text = "按照班级查询"
        '
        'DataGrid1
        '
        Me.DataGrid1.DataMember = ""
        Me.DataGrid1.DataSource = Me.DataView2
        Me.DataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText
        Me.DataGrid1.Location = New System.Drawing.Point(16, 16)
        Me.DataGrid1.Name = "DataGrid1"
        Me.DataGrid1.Size = New System.Drawing.Size(376, 144)
        Me.DataGrid1.TabIndex = 0
        '
        'TabPage5
        '
        Me.TabPage5.Controls.Add(Me.GroupBox2)
        Me.TabPage5.Controls.Add(Me.ComboBox7)
        Me.TabPage5.Controls.Add(Me.Label11)
        Me.TabPage5.Controls.Add(Me.Button9)
        Me.TabPage5.Controls.Add(Me.Button10)
        Me.TabPage5.Location = New System.Drawing.Point(4, 21)
        Me.TabPage5.Name = "TabPage5"
        Me.TabPage5.Size = New System.Drawing.Size(408, 231)
        Me.TabPage5.TabIndex = 4
        Me.TabPage5.Text = "设置某个班级所上课程"
        '
        'GroupBox2
        '
        Me.GroupBox2.Controls.Add(Me.TextBox5)
        Me.GroupBox2.Controls.Add(Me.ComboBox8)
        Me.GroupBox2.Controls.Add(Me.Label12)
        Me.GroupBox2.Controls.Add(Me.Label14)
        Me.GroupBox2.Controls.Add(Me.ComboBox9)
        Me.GroupBox2.Controls.Add(Me.Label13)
        Me.GroupBox2.Location = New System.Drawing.Point(96, 48)
        Me.GroupBox2.Name = "GroupBox2"
        Me.GroupBox2.Size = New System.Drawing.Size(200, 128)
        Me.GroupBox2.TabIndex = 10
        Me.GroupBox2.TabStop = False
        Me.GroupBox2.Text = "为班级设置课程"
        '
        'TextBox5
        '
        Me.TextBox5.Location = New System.Drawing.Point(80, 104)
        Me.TextBox5.Name = "TextBox5"
        Me.TextBox5.Size = New System.Drawing.Size(88, 21)
        Me.TextBox5.TabIndex = 7
        Me.TextBox5.Text = ""
        '
        'ComboBox8
        '
        Me.ComboBox8.Location = New System.Drawing.Point(80, 24)
        Me.ComboBox8.Name = "ComboBox8"
        Me.ComboBox8.Size = New System.Drawing.Size(88, 20)
        Me.ComboBox8.TabIndex = 4
        '
        'Label12
        '
        Me.Label12.Location = New System.Drawing.Point(8, 24)
        Me.Label12.Name = "Label12"
        Me.Label12.Size = New System.Drawing.Size(72, 16)
        Me.Label12.TabIndex = 3
        Me.Label12.Text = "课程号码:"
        '
        'Label14
        '
        Me.Label14.Location = New System.Drawing.Point(8, 64)
        Me.Label14.Name = "Label14"
        Me.Label14.Size = New System.Drawing.Size(72, 16)
        Me.Label14.TabIndex = 8
        Me.Label14.Text = "课程名称:"
        '
        'ComboBox9
        '
        Me.ComboBox9.Location = New System.Drawing.Point(80, 64)
        Me.ComboBox9.Name = "ComboBox9"
        Me.ComboBox9.Size = New System.Drawing.Size(88, 20)
        Me.ComboBox9.TabIndex = 9
        '
        'Label13
        '
        Me.Label13.Location = New System.Drawing.Point(8, 104)
        Me.Label13.Name = "Label13"
        Me.Label13.Size = New System.Drawing.Size(72, 16)
        Me.Label13.TabIndex = 6
        Me.Label13.Text = "任课老师:"
        '
        'ComboBox7
        '
        Me.ComboBox7.Location = New System.Drawing.Point(184, 16)
        Me.ComboBox7.Name = "ComboBox7"
        Me.ComboBox7.Size = New System.Drawing.Size(88, 20)
        Me.ComboBox7.TabIndex = 1
        '
        'Label11
        '
        Me.Label11.Location = New System.Drawing.Point(112, 16)
        Me.Label11.Name = "Label11"
        Me.Label11.Size = New System.Drawing.Size(48, 16)
        Me.Label11.TabIndex = 0
        Me.Label11.Text = "班级:"
        '
        'Button9
        '
        Me.Button9.Location = New System.Drawing.Point(104, 192)
        Me.Button9.Name = "Button9"
        Me.Button9.TabIndex = 2
        Me.Button9.Text = "确认"
        '
        'Button10
        '
        Me.Button10.Location = New System.Drawing.Point(216, 192)
        Me.Button10.Name = "Button10"
        Me.Button10.TabIndex = 5
        Me.Button10.Text = "取消"
        '
        'Form9
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
        Me.BackgroundImage = CType(resources.GetObject("$this.BackgroundImage"), System.Drawing.Image)
        Me.ClientSize = New System.Drawing.Size(440, 286)
        Me.Controls.Add(Me.TabControl1)
        Me.Name = "Form9"
        Me.Text = "课程管理系统"
        CType(Me.DataView1, System.ComponentModel.ISupportInitialize).EndInit()
        Me.TabControl1.ResumeLayout(False)
        Me.TabPage1.ResumeLayout(False)
        Me.TabPage2.ResumeLayout(False)
        Me.TabPage3.ResumeLayout(False)
        Me.TabPage4.ResumeLayout(False)
        CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DataView2, System.ComponentModel.ISupportInitialize).EndInit()
        Me.TabPage5.ResumeLayout(False)
        Me.GroupBox2.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub Form9_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If Not Class1.ds.Tables("D") Is Nothing Then
            Class1.ds.Tables("D").Clear()
        End If
        Class1.ada.SelectCommand.CommandText = "select * from 所有课程"
        Class1.ada.Fill(Class1.ds, "D")



        '添加课程
        If Not Class1.ds.Tables("C") Is Nothing Then
            Class1.ds.Tables("C").Clear()
        End If
        Class1.ada.SelectCommand.CommandText = "select * from 班级"
        Class1.ada.Fill(Class1.ds, "C")
        Dim m As Integer
        For m = 0 To Class1.ds.Tables("C").Rows.Count - 1
            ComboBox2.Items.Add(Class1.ds.Tables("C").Rows.Item(m).Item("班级号"))
        Next



        '删除课程
        Class1.ada.SelectCommand.CommandText = "select distinct 课程号码 from 所有课程"
        If Not Class1.ds.Tables("D") Is Nothing Then
            Class1.ds.Tables("D").Clear()
        End If
        Class1.ada.Fill(Class1.ds, "D")
        Dim i As Integer
        For i = 0 To Class1.ds.Tables("D").Rows.Count - 1
            ComboBox3.Items.Add(Class1.ds.Tables("D").Rows.Item(i).Item("课程号码"))
        Next



        '修改课程
        Class1.ada.SelectCommand.CommandText = "select distinct 课程号码 from 所有课程"
        If Not Class1.ds.Tables("D") Is Nothing Then
            Class1.ds.Tables("D").Clear()
        End If
        Class1.ada.Fill(Class1.ds, "D")
        Dim j As Integer
        For j = 0 To Class1.ds.Tables("D").Rows.Count - 1
            ComboBox4.Items.Add(Class1.ds.Tables("D").Rows.Item(j).Item("课程号码"))
        Next



        '按照班级查询课程资料
        If Not Class1.ds.Tables("D") Is Nothing Then
            Class1.ds.Tables("D").Clear()
        End If
        Class1.ada.SelectCommand.CommandText = "select * from 所有课程"
        Class1.ada.Fill(Class1.ds, "D")
        DataView2.Table = Class1.ds.Tables("D")



        '设置某个班级所上的课程
        If Not Class1.ds.Tables("C") Is Nothing Then
            Class1.ds.Tables("C").Clear()
        End If
        Class1.ada.SelectCommand.CommandText = "select * from 班级"
        Class1.ada.Fill(Class1.ds, "C")
        Dim k As Integer
        For k = 0 To Class1.ds.Tables("C").Rows.Count - 1
            ComboBox7.Items.Add(Class1.ds.Tables("C").Rows.Item(k).Item("班级号"))
        Next
        If Not Class1.ds.Tables("D") Is Nothing Then
            Class1.ds.Tables("D").Clear()
        End If
        Class1.ada.SelectCommand.CommandText = "select * from 所有课程"
        Class1.ada.Fill(Class1.ds, "D")

⌨️ 快捷键说明

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