?? frminquiresinfo.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmInquiresinfo
BorderStyle = 1 'Fixed Single
Caption = "查詢學籍信息"
ClientHeight = 5985
ClientLeft = 30
ClientTop = 330
ClientWidth = 8580
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 5985
ScaleWidth = 8580
Begin VB.CommandButton Cmddel
Caption = "刪除"
Height = 375
Left = 5760
TabIndex = 20
Top = 5040
Width = 975
End
Begin VB.CommandButton Cmdupdate
Caption = "修改"
Height = 375
Left = 4320
TabIndex = 19
Top = 5040
Width = 975
End
Begin VB.TextBox txtsex
DataField = "student_Sex"
DataSource = "Adodc1"
Height = 375
Left = 1440
TabIndex = 18
Top = 1440
Width = 735
End
Begin VB.TextBox txtName
DataField = "student_Name"
DataSource = "Adodc1"
Height = 372
Left = 5880
TabIndex = 8
Top = 840
Width = 1692
End
Begin VB.TextBox txtBorndate
DataField = "born_Date"
DataSource = "Adodc1"
Height = 372
Left = 5880
TabIndex = 7
Top = 1440
Width = 1692
End
Begin VB.TextBox txtTel
DataField = "tele_Number"
DataSource = "Adodc1"
Height = 372
Left = 5880
TabIndex = 6
Top = 2040
Width = 1692
End
Begin VB.TextBox txtRudate
DataField = "ru_Date"
DataSource = "Adodc1"
Height = 372
Left = 1440
TabIndex = 5
Top = 2520
Width = 1692
End
Begin VB.TextBox txtAddress
DataField = "address"
DataSource = "Adodc1"
Height = 852
Left = 5880
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 4
Top = 2640
Width = 2172
End
Begin VB.TextBox txtComment
DataField = "comment"
DataSource = "Adodc1"
Height = 1572
Left = 1440
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 3
Top = 3120
Width = 2532
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 372
Left = 7200
TabIndex = 2
Top = 5040
Width = 1092
End
Begin VB.TextBox txtSID
DataField = "student_ID"
DataSource = "Adodc1"
Height = 372
Left = 1440
TabIndex = 1
Top = 840
Width = 1695
End
Begin VB.TextBox txtClassno
DataField = "class_NO"
DataSource = "Adodc1"
Height = 372
Left = 1440
TabIndex = 0
Top = 1920
Width = 1695
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 2400
Top = 5040
Width = 1695
_ExtentX = 2990
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 2
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = 16777215
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=student"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=student"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = "sa"
Password = ""
RecordSource = "select * from student_Info order by student_ID"
Caption = "查看"
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 Label1
Alignment = 2 'Center
Caption = "學號"
Height = 255
Left = 120
TabIndex = 17
Top = 840
Width = 1095
End
Begin VB.Label Label2
Alignment = 2 'Center
Caption = "姓名"
Height = 255
Left = 4560
TabIndex = 16
Top = 960
Width = 1095
End
Begin VB.Label Label3
Alignment = 2 'Center
Caption = "性別"
Height = 255
Left = 120
TabIndex = 15
Top = 1440
Width = 1095
End
Begin VB.Label Label4
Alignment = 2 'Center
Caption = "出生日期"
Height = 255
Left = 4560
TabIndex = 14
Top = 1560
Width = 1095
End
Begin VB.Label Label5
Alignment = 2 'Center
Caption = "班號"
Height = 255
Left = 120
TabIndex = 13
Top = 2040
Width = 1095
End
Begin VB.Label Label6
Alignment = 2 'Center
Caption = "聯系電話"
Height = 375
Left = 4560
TabIndex = 12
Top = 2040
Width = 1095
End
Begin VB.Label Label7
Alignment = 2 'Center
Caption = "入校日期"
Height = 255
Left = 120
TabIndex = 11
Top = 2640
Width = 1095
End
Begin VB.Label Label8
Alignment = 2 'Center
Caption = "家庭住址"
Height = 255
Left = 4560
TabIndex = 10
Top = 2640
Width = 1095
End
Begin VB.Label Label9
Alignment = 2 'Center
Caption = "備注"
Height = 375
Left = 120
TabIndex = 9
Top = 3240
Width = 1095
End
End
Attribute VB_Name = "frmInquiresinfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OK As Boolean
Public stuidkey As String
Private Sub Cmddel_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 MyStu.Delete(TmpId)
End If
Adodc1.Refresh
End Sub
Private Sub Cmdupdate_Click()
If Not Testtxt(txtSID.text) Then
MsgBox "請輸入學號!", vbOKOnly + vbExclamation, "警告"
txtSID.SetFocus
Exit Sub
End If
If Not Testtxt(txtName.text) Then
MsgBox "請輸入姓名!", vbOKOnly + vbExclamation, "警告"
txtName.SetFocus
Exit Sub
End If
If Not Testtxt(txtClassno.text) Then
MsgBox "請輸入班號!", vbOKOnly + vbExclamation, "警告"
txtClassno.SetFocus
Exit Sub
End If
If Not Testtxt(txtBorndate.text) Then
MsgBox "請輸入出生時間!", vbOKOnly + vbExclamation, "警告"
txtBorndate.SetFocus
Exit Sub
End If
If Not Testtxt(txtRudate.text) Then
MsgBox "請輸入入校時間!", vbOKOnly + vbExclamation, "警告"
txtRudate.SetFocus
Exit Sub
End If
If Not IsDate(txtBorndate.text) Then
MsgBox "出生時間應輸入日期格式(yyyy-mm-dd)!", vbOKOnly + vbExclamation, "警告"
txtBorndate.SetFocus
Exit Sub
Else
txtBorndate = Format(txtBorndate, "yyyy-mm-dd")
If Not IsDate(txtRudate.text) Then
MsgBox "入校時間應輸入日期格式(yyyy-mm-dd)!", vbOKOnly + vbExclamation, "警告"
txtRudate.SetFocus
Exit Sub
End If
End If
With MyStu
.student_ID = Trim(txtSID)
.student_Name = Trim(txtName)
.student_Sex = Trim(txtsex)
.born_Date = Trim(txtBorndate)
.class_No = Trim(txtClassno)
.tele_Number = Trim(txtTel)
.ru_Date = Trim(txtRudate)
.address = Trim(txtAddress)
.comment = Trim(txtComment)
Call .Update(CurStu.student_ID)
End With
OK = True
MsgBox "修改學生信息成功!", vbOKOnly + vbExclamation, "修改學生信息"
'Adobc1.Refresh
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -