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

📄 frmarrangeedit.frm

📁 学生管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form FrmArrangeEdit 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "编辑课程安排"
   ClientHeight    =   3510
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5040
   Icon            =   "FrmArrangeEdit.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3510
   ScaleWidth      =   5040
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Cmd_OK 
      Caption         =   "确 定"
      Default         =   -1  'True
      Height          =   400
      Left            =   1020
      MouseIcon       =   "FrmArrangeEdit.frx":0CCA
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   9
      Top             =   3000
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Cancel 
      Cancel          =   -1  'True
      Caption         =   "取 消"
      Height          =   400
      Left            =   2730
      MouseIcon       =   "FrmArrangeEdit.frx":0FD4
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   8
      Top             =   3000
      Width           =   1300
   End
   Begin VB.Frame Frame1 
      Height          =   2655
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   4815
      Begin MSDataListLib.DataCombo DataCombo1 
         Bindings        =   "FrmArrangeEdit.frx":12DE
         Height          =   330
         Left            =   1200
         TabIndex        =   12
         Top             =   1245
         Width           =   3375
         _ExtentX        =   5953
         _ExtentY        =   582
         _Version        =   393216
         Style           =   2
         Text            =   "DataCombo1"
      End
      Begin VB.ComboBox ComboType 
         Height          =   300
         ItemData        =   "FrmArrangeEdit.frx":12F6
         Left            =   1200
         List            =   "FrmArrangeEdit.frx":1300
         Style           =   2  'Dropdown List
         TabIndex        =   3
         Top             =   1740
         Width           =   975
      End
      Begin VB.TextBox txtHours 
         Height          =   300
         Left            =   1200
         MaxLength       =   100
         TabIndex        =   2
         Top             =   2220
         Width           =   975
      End
      Begin VB.TextBox txtTeacher 
         Height          =   300
         Left            =   3600
         MaxLength       =   50
         TabIndex        =   1
         Top             =   1740
         Width           =   975
      End
      Begin MSAdodcLib.Adodc AdoLesson 
         Height          =   330
         Left            =   1800
         Top             =   0
         Visible         =   0   'False
         Width           =   2415
         _ExtentX        =   4260
         _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         =   "AdoLesson"
         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 Label7 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "班级名称"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   240
         TabIndex        =   14
         Top             =   840
         Width           =   720
      End
      Begin VB.Label lblClass 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "班级名称"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   1200
         TabIndex        =   13
         Top             =   840
         Width           =   720
      End
      Begin VB.Label lblTerm 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "学期名称"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   1200
         TabIndex        =   11
         Top             =   360
         Width           =   720
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "学期名称"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   240
         TabIndex        =   10
         Top             =   360
         Width           =   720
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         BackColor       =   &H00FFC0C0&
         BackStyle       =   0  'Transparent
         Caption         =   "课程类型"
         Height          =   180
         Left            =   240
         TabIndex        =   7
         Top             =   1800
         Width           =   720
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "课时设置"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   240
         TabIndex        =   6
         Top             =   2280
         Width           =   720
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "授课教师"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   2640
         TabIndex        =   5
         Top             =   1800
         Width           =   720
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "课程名称"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   180
         Left            =   240
         TabIndex        =   4
         Top             =   1320
         Width           =   720
      End
   End
End
Attribute VB_Name = "FrmArrangeEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public OriId As Long
Public TermId As Long
Public ClassId As Long
Public LessonId As Long
Public Modify As Boolean

Private Sub Cmd_Cancel_Click()
  Unload Me
End Sub

Private Sub Cmd_OK_Click()
  '判断是否输入了课程名称
  If Val(DataCombo1.BoundText) <= 0 Then
    MsgBox "请选择课程名称"
    DataCombo1.SetFocus
    Exit Sub
  End If
  '把用户录入的数据赋值到MyLesson对象的成员变量中
  With MyArrange
  .TermId = TermId
  .LessonId = Val(DataCombo1.BoundText)
  .Class_Id = ClassId
  .LessonType = Trim(ComboType.Text)
  .Teacher = MakeStr(txtTeacher)
  .Hours = Val(txtHours)
  '根据变量Modify决定是插入新数据,还是更新已有的数据
  If Modify = False Then
    .Insert
  Else
    Call .Update(OriId)
  End If
  End With
  MsgBox "编辑完成"
  '关闭窗口
  Unload Me
End Sub

Private Sub Form_Load()
  '设置记录源
  AdoLesson.ConnectionString = conn
  AdoLesson.RecordSource = "SELECT * FROM Lessons ORDER BY LessonName"
  AdoLesson.Refresh
  DataCombo1.ListField = "LessonName"
  DataCombo1.BoundColumn = "LessonId"
  DataCombo1.BoundText = LessonId
End Sub

⌨️ 快捷键说明

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