?? frmaddmanager.frm
字號:
VERSION 5.00
Begin VB.Form FrmAddManager
BorderStyle = 1 'Fixed Single
Caption = "增加管理員界面"
ClientHeight = 5145
ClientLeft = 45
ClientTop = 435
ClientWidth = 5385
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5145
ScaleWidth = 5385
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton cmdExit
Caption = "返回"
Height = 375
Left = 3000
TabIndex = 12
Top = 4320
Width = 975
End
Begin VB.CommandButton cmdSubmit
Caption = "提交"
Height = 375
Left = 1200
TabIndex = 11
Top = 4320
Width = 975
End
Begin VB.Frame Frame1
Caption = "管理員信息"
Height = 3855
Left = 360
TabIndex = 0
Top = 240
Width = 4575
Begin VB.TextBox txtSeq
Height = 375
Left = 1800
TabIndex = 5
Top = 360
Width = 2175
End
Begin VB.TextBox txtId
Height = 375
Left = 1800
TabIndex = 4
Top = 960
Width = 2175
End
Begin VB.TextBox txtPwd
Height = 375
Left = 1800
TabIndex = 3
Top = 1680
Width = 2175
End
Begin VB.TextBox txtTime
Height = 375
Left = 1800
TabIndex = 2
Top = 2400
Width = 2175
End
Begin VB.TextBox txtPhone
Height = 375
Left = 1800
TabIndex = 1
Top = 3120
Width = 2175
End
Begin VB.Label Label1
Caption = "編號:"
Height = 375
Left = 840
TabIndex = 10
Top = 360
Width = 735
End
Begin VB.Label Label2
Caption = "登錄密碼:"
Height = 375
Left = 480
TabIndex = 9
Top = 1680
Width = 1095
End
Begin VB.Label Label3
Caption = "登錄Id:"
Height = 375
Left = 720
TabIndex = 8
Top = 960
Width = 855
End
Begin VB.Label Label4
Caption = "工作時間(AM/PM):"
Height = 375
Left = 480
TabIndex = 7
Top = 2400
Width = 1095
End
Begin VB.Label Label5
Caption = "聯系電話:"
Height = 375
Left = 480
TabIndex = 6
Top = 3240
Width = 1095
End
End
End
Attribute VB_Name = "FrmAddManager"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdExit_Click()
Me.Hide
End Sub
Private Sub cmdSubmit_Click()
'檢驗數據的有效性
If Trim(txtId) = "" Then
MsgBox "請輸入登錄Id"
Exit Sub
End If
If Trim(txtPwd) = "" Then
MsgBox "請輸入登錄密碼"
Exit Sub
End If
Dim myDbOper As New DbOperation
Dim rst As ADODB.Recordset
Dim sql As String
'建立連接
myDbOper.DB_Connect
'定義查詢語句
sql = "SELECT * FROM Librarian WHERE seq='" + Trim(txtSeq) + "'"
Set rst = myDbOper.querySQL(sql)
If rst.EOF = True Then
With rst
.AddNew
!seq = Me.txtSeq
!id = Me.txtId
!Password = Me.txtPwd
!onJobTime = Me.txtTime
!telephone = Me.txtPhone
.Update
End With
MsgBox "信息添加成功."
Else
MsgBox "該編號已經存在,請重新輸入."
End If
rst.Close
'關閉連接
myDbOper.DB_DisConnect
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -