?? frmarrangeedit.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 + -