?? managerview.frm
字號:
VERSION 5.00
Object = "{8ED8CCC1-8472-46D0-93E7-F66929B98442}#2.0#0"; "XPCMD.OCX"
Begin VB.Form ManagerView
Caption = "Form1"
ClientHeight = 6270
ClientLeft = 3045
ClientTop = 2520
ClientWidth = 8295
LinkTopic = "Form1"
ScaleHeight = 6270
ScaleWidth = 8295
Begin VB.TextBox Text7
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2880
TabIndex = 5
Top = 3120
Width = 1695
End
Begin XPCmd.xpcmdbutton ManPsChangeBT
Height = 375
Left = 4680
TabIndex = 2
Top = 1320
Width = 855
_ExtentX = 1508
_ExtentY = 661
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
End
Begin XPCmd.xpcmdbutton ManCancelBT
Height = 495
Left = 5880
TabIndex = 10
Top = 5280
Width = 1215
_ExtentX = 2143
_ExtentY = 873
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
End
Begin XPCmd.xpcmdbutton ManClearBT
Height = 495
Left = 3360
TabIndex = 9
Top = 5280
Width = 1215
_ExtentX = 2143
_ExtentY = 873
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
End
Begin XPCmd.xpcmdbutton ManOKBT
Height = 495
Left = 840
TabIndex = 8
Top = 5280
Width = 1215
_ExtentX = 2143
_ExtentY = 873
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
End
Begin VB.TextBox Text6
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2880
TabIndex = 7
Top = 4320
Width = 3495
End
Begin VB.TextBox Text5
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2880
TabIndex = 6
Top = 3720
Width = 1335
End
Begin VB.TextBox Text4
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2880
TabIndex = 4
Top = 2520
Width = 855
End
Begin VB.TextBox Text3
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2880
TabIndex = 3
Top = 1920
Width = 1215
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
IMEMode = 3 'DISABLE
Left = 2880
Locked = -1 'True
PasswordChar = "*"
TabIndex = 1
Top = 1320
Width = 1215
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2880
Locked = -1 'True
TabIndex = 0
Top = 720
Width = 1215
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "電子郵件"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 240
Left = 1800
TabIndex = 17
Top = 3240
Width = 960
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "地址"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 240
Left = 2040
TabIndex = 16
Top = 4440
Width = 480
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "電話"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 240
Left = 2040
TabIndex = 15
Top = 3840
Width = 480
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "年齡"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 240
Left = 2040
TabIndex = 14
Top = 2640
Width = 480
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "姓名"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 240
Left = 2040
TabIndex = 13
Top = 2040
Width = 480
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "密碼"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 240
Left = 2040
TabIndex = 12
Top = 1440
Width = 480
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "管理員ID"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 240
Left = 1800
TabIndex = 11
Top = 840
Width = 960
End
End
Attribute VB_Name = "ManagerView"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim com As Command
Dim rst As Recordset
Private Sub Form_Load()
Set com = New Command
Set rst = New Recordset
rst.Open "select * from manager", con, adOpenDynamic, adLockBatchOptimistic
Text1.Text = Trim(rst(0))
Text2.Text = Trim(rst(1))
Text3.Text = Trim(rst(2))
Text4.Text = Trim(rst(3))
Text5.Text = Trim(rst(5))
Text6.Text = Trim(rst(6))
Text7.Text = Trim(rst(4))
rst.Close
End Sub
Private Sub ManCancelBT_Click()
Unload Me
End Sub
Private Sub ManClearBT_Click()
For Each Control In MemberRE
If TypeOf Control Is TextBox Then
If Control <> TID Then
Control.Text = ""
End If
End If
Next
End Sub
Private Sub ManOKBT_Click()
For Each Control In ManagerView
If TypeOf Control Is TextBox Then
'If Control <> TID Then
If Trim(Control.Text) = "" Then
MsgBox "請輸入完整信息"
Exit Sub
End If
'End If
End If
Next
'If Len(Text1.Text) > 10 Then
' MsgBox "ID過長!"
'ElseIf Len(Text1.Text) < 5 Then
' MsgBox "ID過短!"
'End If
If Len(Text3.Text) > 15 Then
MsgBox "姓名過長!請檢查!"
Text3.SetFocus
Exit Sub
End If
If Asc(Trim(Text4.Text)) > 57 Or Asc(Trim(Text4.Text)) < 48 Then
MsgBox "您的年齡有問題!請輸入數(shù)字!"
Text4.SetFocus
ElseIf Len(Trim(Text4.Text)) > 3 Then
MsgBox "您的年齡有那么大嘛!請檢查!"
Text4.SetFocus
ElseIf Trim(Text4.Text) = 0 Then
MsgBox "0歲的您!"
Text4.SetFocus
Exit Sub
End If
'If ComboSex.Text = "" Then
' MsgBox "請選擇您的性別!"
' ComboSex.SetFocus
'End If
If Len(Trim(Text7.Text)) > 30 Then
MsgBox "電子郵件過長!請檢查!"
Text7.SetFocus
Exit Sub
End If
If MemberRE.checkemail(Text7.Text) = 0 Then
MsgBox "電子郵件輸入有誤!請檢查!"
Text7.SetFocus
Exit Sub
End If
If Asc(Trim(Text5.Text)) > 57 Or Asc(Trim(Text5.Text)) < 48 Then
MsgBox "電話號碼有誤!請輸入數(shù)字!"
Text5.SetFocus
ElseIf Len(Trim(Text5.Text)) > 13 Or Len(Trim(Text5.Text)) < 8 Then
MsgBox "電話號碼有誤!請檢查!"
Text5.SetFocus
Exit Sub
End If
Dim id, name, money, age, ps, sex, email, address, postcode, phone, cardnum As String
id = Text1.Text
ps = Text2.Text
name = Trim(Text3.Text)
age = Trim(Text4.Text)
'sex = ComboSex.Text
email = Trim(Text7.Text)
address = Trim(Text6.Text)
'postcode = TPostcode.Text
phone = Trim(Text5.Text)
'cardnum = TCardnum.Text
'money = TMoney.Text
'On Error GoTo err
'com.ActiveConnection = con
'rst.Close
rst.Open "update manager set cpassword='" & ps & "',cname='" & name & "',cage='" & age & "',cemail='" & email & "',ctel='" & phone & "',caddress='" & _
address & "'", con, adOpenDynamic, adLockOptimistic
MsgBox "您的信息修改成功?。海g迎光臨!"
'rst.Close
Unload Me
Exit Sub
err:
MsgBox "請確認(rèn)數(shù)據(jù)庫是否連接!"
End Sub
Private Sub ManPsChangeBT_Click()
ManPsChange.Show
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -