📄 frmaddfg.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form FrmAddFg
Caption = "教师分工表修改"
ClientHeight = 5100
ClientLeft = 60
ClientTop = 345
ClientWidth = 8010
Icon = "FrmAddFg.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5100
ScaleWidth = 8010
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command1
Caption = "关闭"
Height = 375
Left = 240
TabIndex = 3
Top = 4320
Width = 975
End
Begin VB.CheckBox Check1
Caption = "允许修改"
ForeColor = &H00800080&
Height = 255
Left = 240
TabIndex = 2
Top = 3840
Width = 1215
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "FrmAddFg.frx":030A
Height = 3495
Left = 120
TabIndex = 0
Top = 120
Width = 7815
_ExtentX = 13785
_ExtentY = 6165
_Version = 393216
AllowUpdate = 0 'False
HeadLines = 1
RowHeight = 15
RowDividerStyle = 1
FormatLocked = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 11
BeginProperty Column00
DataField = "班级"
Caption = "班级"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = "班主任"
Caption = "班主任"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column02
DataField = "语文"
Caption = "语文"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column03
DataField = "数学"
Caption = "数学"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column04
DataField = "英语"
Caption = "英语"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column05
DataField = "物理"
Caption = "物理"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column06
DataField = "化学"
Caption = "化学"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column07
DataField = "政治"
Caption = "政治"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column08
DataField = "地理"
Caption = "地理"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column09
DataField = "历史"
Caption = "历史"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column10
DataField = "生物"
Caption = "生物"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
Locked = -1 'True
WrapText = -1 'True
ColumnWidth = 734.74
EndProperty
BeginProperty Column01
ColumnWidth = 1005.165
EndProperty
BeginProperty Column02
ColumnWidth = 1005.165
EndProperty
BeginProperty Column03
ColumnWidth = 1005.165
EndProperty
BeginProperty Column04
ColumnWidth = 1005.165
EndProperty
BeginProperty Column05
ColumnWidth = 1005.165
EndProperty
BeginProperty Column06
ColumnWidth = 1005.165
EndProperty
BeginProperty Column07
ColumnWidth = 1005.165
EndProperty
BeginProperty Column08
ColumnWidth = 1005.165
EndProperty
BeginProperty Column09
ColumnWidth = 1005.165
EndProperty
BeginProperty Column10
ColumnWidth = 1005.165
EndProperty
EndProperty
End
Begin VB.ListBox List1
Height = 1140
Left = 1560
TabIndex = 1
Top = 3840
Width = 6255
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 3480
Top = 2640
Visible = 0 'False
Width = 1815
_ExtentX = 3201
_ExtentY = 661
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
End
Attribute VB_Name = "FrmAddFg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs As ADODB.Recordset
Private Sub Check1_Click()
If Check1.Value = 1 Then
DataGrid1.AllowUpdate = True
DataGrid1.AllowDelete = True
Else
DataGrid1.AllowUpdate = False
DataGrid1.AllowDelete = False
End If
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub DataGrid1_Click()
If DataGrid1.SelText <> "" Then
rs.Open "select * from 教师表 where 姓名 like '%" & DataGrid1.SelText & "%'", Con, , , adCmdText
If rs.BOF And rs.EOF Then
List1.Clear
List1.AddItem "此教师没有加入可用信息"
Else
List1.Clear
List1.AddItem "姓名: " & rs!姓名
List1.AddItem "性别: " & rs!性别
List1.AddItem "出生年月: " & rs!出生年月
List1.AddItem "第一学历: " & rs!第一学历
List1.AddItem "获取时间: " & rs!一学历时间
List1.AddItem "最终学历: " & rs!最终学历
List1.AddItem "获取时间: " & rs!终学历时间
List1.AddItem "参加工作: " & rs!参加工作时间
List1.AddItem "职务: " & rs!职务
List1.AddItem "职称: " & rs!职称
List1.AddItem "联系电话: " & rs!联系电话
List1.AddItem "联系手机: " & rs!联系手机
List1.AddItem "家庭住址: " & rs!家庭住址
End If
rs.Close
End If
End Sub
Private Sub DataGrid1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
DataGrid1_Click
End If
End Sub
Private Sub Form_Load()
Set rs = New ADODB.Recordset
With Adodc1
.ConnectionString = Con.ConnectionString
.CommandType = adCmdTable
.RecordSource = "分工表"
End With
Adodc1.Refresh
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -