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

📄 coureadd.frm

📁 主要用于学生的各方面信息的管理
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form AddSub 
   Caption         =   "添加课程"
   ClientHeight    =   6330
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   8355
   LinkTopic       =   "Form5"
   ScaleHeight     =   6330
   ScaleWidth      =   8355
   StartUpPosition =   3  '窗口缺省
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   3360
      Top             =   120
      Visible         =   0   'False
      Width           =   1215
      _ExtentX        =   2143
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.CommandButton Command5 
      BackColor       =   &H00C0E0FF&
      Caption         =   "退出"
      Height          =   975
      Left            =   3720
      MaskColor       =   &H0080C0FF&
      Style           =   1  'Graphical
      TabIndex        =   21
      Top             =   4080
      Width           =   375
   End
   Begin VB.Frame Frame1 
      Caption         =   "添加"
      Height          =   2655
      Left            =   360
      TabIndex        =   5
      Top             =   3120
      Width           =   3255
      Begin VB.CommandButton Command2 
         BackColor       =   &H00C0E0FF&
         Caption         =   "退出添加"
         Height          =   375
         Left            =   840
         Style           =   1  'Graphical
         TabIndex        =   8
         Top             =   1680
         Width           =   1455
      End
      Begin VB.CommandButton Command1 
         BackColor       =   &H00C0E0FF&
         Caption         =   "确认添加"
         Height          =   375
         Left            =   840
         Style           =   1  'Graphical
         TabIndex        =   7
         Top             =   840
         Width           =   1455
      End
      Begin VB.Label Label7 
         BackStyle       =   0  'Transparent
         Caption         =   "添加"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000080&
         Height          =   495
         Left            =   240
         TabIndex        =   19
         Top             =   360
         Width           =   1095
      End
      Begin VB.Image Image2 
         Height          =   3585
         Left            =   0
         Picture         =   "coureAdd.frx":0000
         Top             =   0
         Width           =   4080
      End
   End
   Begin VB.ComboBox Combo2 
      Height          =   300
      ItemData        =   "coureAdd.frx":23C7
      Left            =   1680
      List            =   "coureAdd.frx":23DA
      TabIndex        =   17
      Top             =   2160
      Width           =   1815
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   1680
      TabIndex        =   16
      Top             =   1320
      Width           =   1815
   End
   Begin VB.TextBox Text6 
      Height          =   270
      Left            =   5640
      TabIndex        =   15
      Top             =   480
      Width           =   2055
   End
   Begin VB.TextBox Text5 
      Height          =   1695
      Left            =   5640
      TabIndex        =   14
      Top             =   1080
      Width           =   2055
   End
   Begin VB.TextBox Text2 
      Height          =   270
      Left            =   1680
      TabIndex        =   13
      Top             =   480
      Width           =   1815
   End
   Begin VB.CommandButton Command4 
      BackColor       =   &H00C0E0FF&
      Caption         =   "退出删除"
      Height          =   375
      Left            =   5280
      Style           =   1  'Graphical
      TabIndex        =   12
      Top             =   5040
      Width           =   1575
   End
   Begin VB.Frame Frame2 
      Caption         =   "删除"
      Height          =   2655
      Left            =   4320
      TabIndex        =   6
      Top             =   3120
      Width           =   3495
      Begin VB.CommandButton Command3 
         BackColor       =   &H00C0E0FF&
         Caption         =   "确认删除"
         Height          =   375
         Left            =   960
         Style           =   1  'Graphical
         TabIndex        =   11
         Top             =   1320
         Width           =   1575
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Left            =   1320
         TabIndex        =   10
         Top             =   600
         Width           =   1815
      End
      Begin VB.Label Label8 
         BackStyle       =   0  'Transparent
         Caption         =   "删除"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000080&
         Height          =   615
         Left            =   240
         TabIndex        =   20
         Top             =   120
         Width           =   1335
      End
      Begin VB.Label Label6 
         BackStyle       =   0  'Transparent
         Caption         =   "输入课程编号"
         Height          =   375
         Left            =   120
         TabIndex        =   9
         Top             =   600
         Width           =   1215
      End
      Begin VB.Image Image3 
         Height          =   5895
         Left            =   -360
         Picture         =   "coureAdd.frx":23ED
         Top             =   0
         Width           =   8310
      End
   End
   Begin MSComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   375
      Left            =   0
      TabIndex        =   18
      Top             =   5955
      Width           =   8355
      _ExtentX        =   14737
      _ExtentY        =   661
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   4
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   6
            Alignment       =   1
            TextSave        =   "2005-1-4"
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   5
            Alignment       =   1
            TextSave        =   "8:34"
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Alignment       =   1
            Object.Width           =   7038
            MinWidth        =   7038
            Text            =   "学生管理系统"
            TextSave        =   "学生管理系统"
         EndProperty
         BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Alignment       =   1
         EndProperty
      EndProperty
   End
   Begin MSAdodcLib.Adodc Adodc2 
      Height          =   330
      Left            =   0
      Top             =   0
      Width           =   1215
      _ExtentX        =   2143
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "课程类型"
      Height          =   375
      Left            =   360
      TabIndex        =   4
      Top             =   1320
      Width           =   1575
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "课程描述"
      Height          =   375
      Left            =   4080
      TabIndex        =   3
      Top             =   1440
      Width           =   1575
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "学分"
      Height          =   375
      Left            =   360
      TabIndex        =   2
      Top             =   2160
      Width           =   1575
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "课程名"
      Height          =   375
      Left            =   4080
      TabIndex        =   1
      Top             =   480
      Width           =   1575
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "课程编号"
      Height          =   375
      Left            =   360
      TabIndex        =   0
      Top             =   480
      Width           =   1575
   End
   Begin VB.Image Image1 
      Height          =   5895
      Left            =   0
      Picture         =   "coureAdd.frx":5280
      Top             =   0
      Width           =   8310
   End
End
Attribute VB_Name = "AddSub"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Not IsNumeric(Text2.Text) Then
MsgBox ("id必须为数字整形")
Text2.Text = ""
Text2.SetFocus
Else
If Not Adodc1.Recordset.EOF Then
Adodc1.Recordset.MoveLast
End If
Adodc1.Recordset.AddNew
If Text2.Text <> "" Then Adodc1.Recordset.Fields("sub_id") = Text2.Text
If Text6.Text <> "" Then Adodc1.Recordset.Fields("sub_name") = Text6.Text
If Combo1.Text <> "" Then Adodc1.Recordset.Fields("sub_type") = Combo1.Text
If Combo2.Text <> "" Then Adodc1.Recordset.Fields("sub_record") = Combo2.Text
If Text5.Text <> "" Then Adodc1.Recordset.Fields("sub_describ") = Text5.Text
Adodc1.Recordset.Update
MsgBox ("恭喜!添加成功")
End If
End Sub

Private Sub Command2_Click()
Text2.Text = ""
Text6.Text = ""
Combo1.Text = ""
Combo2.Text = ""
Text5.Text = ""
End Sub

Private Sub Command3_Click()

If Text1.Text = "" Then
MsgBox ("请输入编号")
Text1.SetFocus
Else
Adodc2.RecordSource = "select * from Manage_subject where sub_id=" & Trim(Text1.Text)
Adodc2.Refresh
If Adodc2.Recordset.RecordCount = 0 Then
MsgBox ("对不起,没有你输入的书籍ID")
Else
Adodc2.Recordset.Delete
MsgBox ("恭喜!删除成功")
End If
End If
End Sub

Private Sub Command4_Click()
Text1.Text = ""
Text2.SetFocus
End Sub

Private Sub Command5_Click()
Unload Me

End Sub

Private Sub Form_Load()
Adodc1.ConnectionString = cnn()
Adodc1.RecordSource = "select * from Manage_subject"
Adodc1.Refresh

Adodc2.ConnectionString = cnn()

Combo1.AddItem ("选修")
Combo1.AddItem ("必修")
End Sub

⌨️ 快捷键说明

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