📄 frmmodifycourseinfo.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmModifycourseinfo
Caption = "修改课程信息"
ClientHeight = 5595
ClientLeft = 45
ClientTop = 345
ClientWidth = 7410
LinkTopic = "Form1"
ScaleHeight = 5595
ScaleWidth = 7410
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command1
Caption = "返回"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 5760
TabIndex = 11
Top = 4080
Width = 1215
End
Begin MSAdodcLib.Adodc Adodc1
Height = 495
Left = 360
Top = 2640
Width = 2295
_ExtentX = 4048
_ExtentY = 873
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= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=student"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "student"
OtherAttributes = ""
UserName = "sa"
Password = ""
RecordSource = "select * from course_Info order by course_No"
Caption = "查看记录"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Frame Frame3
Caption = "修改课程信息"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1092
Left = 240
TabIndex = 8
Top = 3720
Width = 4455
Begin VB.CommandButton updateCommand
Caption = "更新数据"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 720
TabIndex = 10
Top = 360
Width = 1455
End
Begin VB.CommandButton deleteCommand
Caption = "删除记录"
BeginProperty Font
Name = "楷体_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 2400
TabIndex = 9
Top = 360
Width = 1452
End
End
Begin VB.TextBox txtCourseno
DataField = "course_No"
DataSource = "Adodc1"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 1680
TabIndex = 3
Top = 840
Width = 1332
End
Begin VB.TextBox txtCoursename
DataField = "course_Name"
DataSource = "Adodc1"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 4800
TabIndex = 2
Top = 840
Width = 1332
End
Begin VB.TextBox txtCoursedes
DataField = "course_Des"
DataSource = "Adodc1"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1452
Left = 4800
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 1
Top = 1680
Width = 2412
End
Begin VB.ComboBox comboCoursetype
DataField = "course_Type"
DataSource = "Adodc1"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
Left = 1680
TabIndex = 0
Top = 1800
Width = 1332
End
Begin VB.Label Label1
Caption = "课程编号:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 7
Top = 960
Width = 1215
End
Begin VB.Label Label2
Caption = "课程名称:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3480
TabIndex = 6
Top = 960
Width = 1215
End
Begin VB.Label Label3
Caption = "课程类型:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 5
Top = 1800
Width = 1215
End
Begin VB.Label Label4
Caption = "课程描述:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3480
TabIndex = 4
Top = 1800
Width = 1215
End
End
Attribute VB_Name = "frmModifycourseinfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub deleteCommand_Click()
Dim TmpId As Integer
If Adodc1.Recordset.BOF = True Then
MsgBox "请选择记录"
Exit Sub
End If
TmpId = Adodc1.Recordset.Fields(0)
If MsgBox("是否删除当记录?", vbYesNo, "确认") = vbYes Then
Call MyCour.Delete(TmpId)
End If
Adodc1.Refresh
End Sub
Private Sub updateCommand_Click()
If Not Testtxt(txtCourseno.text) Then
MsgBox "请输入课程编号!", vbOKOnly + vbExclamation, "警告"
txtCourseno.SetFocus
Exit Sub
End If
If Not IsNumeric(Trim(txtCourseno.text)) Then
MsgBox "课程编号请输入数字!", vbOKOnly + vbExclamation, "警告"
txtCourseno.SetFocus
Exit Sub
End If
If Not Testtxt(txtCoursename.text) Then
MsgBox "请输入课程名称!", vbOKOnly + vbExclamation, "警告"
txtCoursename.SetFocus
Exit Sub
End If
If Not Testtxt(comboCoursetype.text) Then
MsgBox "请选择课程类型!", vbOKOnly + vbExclamation, "警告"
comboCoursetype.SetFocus
Exit Sub
End If
With MyCour
.course_No = Trim(txtCourseno)
.course_Name = Trim(txtCoursename)
.course_Type = Trim(comboCoursetype)
.course_Des = Trim(txtCoursedes)
Call .Update(CurCour.course_No)
End With
MsgBox "更新成功!", vbOKOnly + vbExclamation, "警告"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -