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

📄 frmscc.frm

📁 学生选课管理系统 实用
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "Msflxgrd.ocx"
Begin VB.Form frmSc 
   BackColor       =   &H80000005&
   Caption         =   "选课管理"
   ClientHeight    =   7260
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   10740
   Icon            =   "frmScc.frx":0000
   MDIChild        =   -1  'True
   ScaleHeight     =   7260
   ScaleWidth      =   10740
   WindowState     =   2  'Maximized
   Begin VB.Frame Frame3 
      BackColor       =   &H80000005&
      BorderStyle     =   0  'None
      Caption         =   "Frame3"
      Height          =   6615
      Left            =   240
      TabIndex        =   0
      Top             =   360
      Width           =   10215
      Begin VB.Frame Frame1 
         BackColor       =   &H80000005&
         Caption         =   "管理选课信息(&N)"
         Height          =   2535
         Left            =   480
         TabIndex        =   3
         Top             =   240
         Width           =   9255
         Begin VB.ComboBox cobSno 
            Height          =   300
            Left            =   1800
            Style           =   2  'Dropdown List
            TabIndex        =   11
            Top             =   360
            Width           =   1455
         End
         Begin VB.ComboBox cobCno 
            Height          =   300
            Left            =   1800
            Style           =   2  'Dropdown List
            TabIndex        =   10
            Top             =   840
            Width           =   1455
         End
         Begin VB.TextBox TxtGrade 
            Height          =   270
            Left            =   1800
            TabIndex        =   9
            Text            =   "TxtGrade"
            Top             =   1320
            Width           =   1095
         End
         Begin VB.CommandButton cmdClear 
            BackColor       =   &H80000005&
            Caption         =   "清除(&C)"
            Height          =   375
            Left            =   7080
            Style           =   1  'Graphical
            TabIndex        =   8
            Top             =   360
            Width           =   1335
         End
         Begin VB.CommandButton cmdSave 
            BackColor       =   &H80000005&
            Caption         =   "修改(&S)"
            Height          =   375
            Left            =   7080
            Style           =   1  'Graphical
            TabIndex        =   7
            Top             =   840
            Width           =   1335
         End
         Begin VB.CommandButton cmdDel 
            BackColor       =   &H80000005&
            Caption         =   "删除(&D)"
            Height          =   375
            Left            =   7080
            Style           =   1  'Graphical
            TabIndex        =   6
            Top             =   1320
            Width           =   1335
         End
         Begin VB.CommandButton cmdExit 
            BackColor       =   &H80000005&
            Caption         =   "退出(&X)"
            Height          =   375
            Left            =   7080
            Style           =   1  'Graphical
            TabIndex        =   5
            Top             =   1800
            Width           =   1335
         End
         Begin VB.ComboBox cobGrade 
            Height          =   300
            Left            =   3480
            TabIndex        =   4
            Text            =   "cobGrade   "
            Top             =   1320
            Visible         =   0   'False
            Width           =   1455
         End
         Begin VB.Label Label1 
            BackColor       =   &H80000005&
            Caption         =   "学生学号"
            Height          =   255
            Left            =   600
            TabIndex        =   17
            Top             =   360
            Width           =   855
         End
         Begin VB.Label Label2 
            BackColor       =   &H80000005&
            Caption         =   "课程编号"
            Height          =   255
            Left            =   600
            TabIndex        =   16
            Top             =   840
            Width           =   855
         End
         Begin VB.Label Label3 
            BackColor       =   &H80000005&
            Caption         =   "成绩"
            Height          =   255
            Left            =   600
            TabIndex        =   15
            Top             =   1320
            Width           =   855
         End
         Begin VB.Label lbSname 
            BackColor       =   &H80000005&
            Caption         =   "lbSname"
            Height          =   255
            Left            =   3480
            TabIndex        =   14
            Top             =   360
            Width           =   3015
         End
         Begin VB.Label lbCname 
            BackColor       =   &H80000005&
            Caption         =   "lbCname"
            Height          =   255
            Left            =   3480
            TabIndex        =   13
            Top             =   840
            Width           =   3015
         End
         Begin VB.Label lbGrade 
            BackColor       =   &H80000005&
            Caption         =   "lbGrade"
            ForeColor       =   &H00808080&
            Height          =   255
            Left            =   1800
            TabIndex        =   12
            Top             =   1800
            Width           =   4575
         End
      End
      Begin VB.Frame Frame2 
         BackColor       =   &H80000005&
         Caption         =   "选课信息(&A)"
         Height          =   3255
         Left            =   480
         TabIndex        =   1
         Top             =   3120
         Width           =   9255
         Begin VB.TextBox TextJls 
            BorderStyle     =   0  'None
            Enabled         =   0   'False
            Height          =   270
            Left            =   960
            TabIndex        =   2
            Text            =   "TextJls"
            ToolTipText     =   "记录总数"
            Top             =   240
            Width           =   1815
         End
         Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
            Height          =   2415
            Left            =   1200
            TabIndex        =   18
            Top             =   600
            Width           =   6855
            _ExtentX        =   12091
            _ExtentY        =   4260
            _Version        =   393216
            Cols            =   4
            BackColor       =   16777088
            ForeColor       =   16711935
            BackColorFixed  =   16761024
            ForeColorSel    =   14737632
            BackColorBkg    =   16777215
            HighLight       =   2
            GridLinesFixed  =   1
            SelectionMode   =   1
            AllowUserResizing=   2
            BorderStyle     =   0
            Appearance      =   0
         End
      End
   End
End
Attribute VB_Name = "frmSc"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim scjl As New ADODB.Recordset
Dim rs As New ADODB.Recordset
Dim SQL As String
Dim strCno As String
Dim strSno As String
Dim strCname As String
Dim strSname As String
Dim strGrade As String
Dim gRow As Integer


Private Sub cmdClear_Click()

    Call Clear
    
End Sub

Private Sub Clear()

    cobGrade.Text = ""
    TxtGrade.Text = ""
    TextJls.Text = ""
    lbSname.Caption = ""
    lbCname.Caption = ""
    lbGrade.Caption = ""
    
    Call Data_Display
    
End Sub

Private Sub cmdDel_Click()
     Dim isOk As Integer
    
    If cobSno.Text = "" Or cobCno.Text = "" Then
    
        Call showMsg("学号和课程编号不能为空!", 1)
        
        cobSno.SetFocus
        Exit Sub
    End If
    
    isOk = MsgBox(vbCrLf & "您确定要删除" & lbSname.Caption & "的选课信息么?", vbOKCancel + vbQuestion, "确认操作")
    
    If isOk = vbOK Then
    
        '删除学生选课信息
        SQL = "delete from jc_sc where sno='" & cobSno.Text & "' and cno='" & cobCno.Text & "' "
        On Error GoTo errp
        cnn.Execute (SQL)
    
    End If
    
    Call Data_Display
    Exit Sub
errp:
    Call showMsg("操作失败 !", 0)
End Sub

Private Sub cmdExit_Click()

    Unload Me
    
End Sub


⌨️ 快捷键说明

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