📄 frmtermman.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 FrmTermMan
BorderStyle = 3 'Fixed Dialog
Caption = "学期信息管理"
ClientHeight = 2670
ClientLeft = 45
ClientTop = 330
ClientWidth = 4650
Icon = "FrmTermMan.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2670
ScaleWidth = 4650
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Cmd_Back
BackColor = &H80000004&
Cancel = -1 'True
Caption = "返 回"
Height = 400
Left = 3120
MouseIcon = "FrmTermMan.frx":0CCA
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 4
Top = 2040
Width = 1300
End
Begin VB.CommandButton Cmd_Del
BackColor = &H80000004&
Caption = "删 除"
Height = 400
Left = 3120
MouseIcon = "FrmTermMan.frx":0FD4
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 3
Top = 1440
Width = 1300
End
Begin VB.CommandButton Cmd_Modi
BackColor = &H80000004&
Caption = "修 改"
Height = 400
Left = 3120
MouseIcon = "FrmTermMan.frx":12DE
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 2
Top = 840
Width = 1300
End
Begin VB.CommandButton Cmd_Add
BackColor = &H80000004&
Caption = "添 加"
Default = -1 'True
Height = 400
Left = 3120
MouseIcon = "FrmTermMan.frx":15E8
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 1
Top = 240
Width = 1300
End
Begin MSDataListLib.DataList DataList1
Bindings = "FrmTermMan.frx":18F2
Height = 2370
Left = 225
TabIndex = 0
Top = 120
Width = 2655
_ExtentX = 4683
_ExtentY = 4180
_Version = 393216
ListField = "LessonName"
BoundColumn = "LessonId"
End
Begin MSAdodcLib.Adodc AdoTermList
Height = 330
Left = 0
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 = "AdoLessonList"
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
End
Attribute VB_Name = "FrmTermMan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Cmd_Add_Click()
'初始化frmtermedit信息
FrmTermEdit.txtTerm = ""
FrmTermEdit.Modify = False
FrmTermEdit.Show 1
AdoTermList.Refresh
End Sub
Private Sub Cmd_Back_Click()
Unload Me
End Sub
Private Sub Cmd_Del_Click()
If DataList1.Text = "" Then
MsgBox "请选择学期"
Exit Sub
End If
TmpId = Val(DataList1.BoundText)
If MsgBox("是否删除当前学期?", vbYesNo, "确认") = vbYes Then
Call MyTerm.Delete(TmpId)
MsgBox "删除完成"
AdoTermList.Refresh
End If
End Sub
Private Sub Cmd_Modi_Click()
If DataList1.Text = "" Then
MsgBox "请选择学期"
Exit Sub
End If
'初始化frmtermedit信息
FrmTermEdit.OriId = Val(DataList1.BoundText)
FrmTermEdit.txtTerm = DataList1.Text
FrmTermEdit.Modify = True
FrmTermEdit.Show 1
AdoTermList.Refresh
End Sub
Private Sub Form_Load()
'设置记录源
AdoTermList.ConnectionString = conn
AdoTermList.RecordSource = "SELECT * FROM Terms ORDER BY TermName"
AdoTermList.Refresh
' DataList1.RowSource = AdoTermList
DataList1.ListField = "TermName"
DataList1.BoundColumn = "TermId"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -