?? foruserinfo.frm
字號:
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 240
TabIndex = 13
Top = 1440
Width = 1695
End
Begin VB.CheckBox Check2
BackColor = &H00C0E0FF&
Caption = "售票權限"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 12
Top = 960
Width = 1575
End
Begin VB.CheckBox Check1
BackColor = &H00C0E0FF&
Caption = "訂票權限"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 240
TabIndex = 11
Top = 360
Width = 1575
End
End
Begin VB.Frame Frame1
BackColor = &H00C0E0FF&
Caption = "用戶信息"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1215
Left = 600
TabIndex = 0
Top = 720
Width = 7335
Begin VB.TextBox Text3
Height = 495
Left = 5520
TabIndex = 7
Text = "Text3"
Top = 360
Width = 1455
End
Begin VB.TextBox Text2
Height = 525
Left = 2880
TabIndex = 5
Text = "Text2"
Top = 360
Width = 1695
End
Begin VB.TextBox Text1
Height = 495
Left = 840
TabIndex = 3
Text = "Text1"
Top = 360
Width = 1215
End
Begin VB.Label Label3
BackColor = &H00C0E0FF&
Caption = "密碼"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4800
TabIndex = 6
Top = 480
Width = 615
End
Begin VB.Label Label2
BackColor = &H00C0E0FF&
Caption = "編號"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 120
TabIndex = 4
Top = 480
Width = 615
End
Begin VB.Label Label1
BackColor = &H00C0E0FF&
Caption = "姓名"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2160
TabIndex = 2
Top = 480
Width = 615
End
End
Begin VB.Line Line4
BorderColor = &H00FF00FF&
X1 = 8040
X2 = 8040
Y1 = 6960
Y2 = 7680
End
Begin VB.Line Line3
BorderColor = &H00FF00FF&
X1 = 480
X2 = 480
Y1 = 6960
Y2 = 7680
End
Begin VB.Line Line2
BorderColor = &H00FF00FF&
X1 = 480
X2 = 8040
Y1 = 6960
Y2 = 6960
End
Begin VB.Line Line1
BorderColor = &H00FF00FF&
X1 = 480
X2 = 8040
Y1 = 7680
Y2 = 7680
End
Begin VB.Label Label4
BackColor = &H00FFFFFF&
BackStyle = 0 'Transparent
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 495
Left = 600
TabIndex = 25
Top = 6480
Width = 7335
End
Begin VB.Image Image1
Height = 11520
Left = -4440
Picture = "ForUserInfo.frx":1A5E
Top = -360
Width = 15360
End
End
Attribute VB_Name = "ForUserInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public index As Integer
Private Sub Command1_Click()
If ForSetUserRight.AddOrModify = False Then
ForSetUserRight.Adodc1.Recordset.Delete
End If
If Text1.Text = "" Then
MsgBox "用戶編號不能為空,且只能惟一!!!"
Exit Sub
ElseIf Text2.Text = "" Then
MsgBox "用戶姓名不能為空!!!"
Exit Sub
ElseIf Text3.Text = "" Then
MsgBox "用戶密碼不能為空!!!"
Exit Sub
End If
Adodc1.RecordSource = "select * from 用戶信息表 where 用戶編號='" & Text1.Text & "'"
Adodc1.Refresh
If Adodc1.Recordset.EOF = False Or Adodc1.Recordset.BOF = False Then
MsgBox "您輸入的用戶編號有重復!請輸入其它編號!!!"
Text1.SetFocus
Exit Sub
End If
Adodc1.Refresh
Adodc1.Recordset.AddNew
Adodc1.Recordset("用戶編號") = Trim(Text1.Text)
Adodc1.Recordset("用戶姓名") = Trim(Text2.Text)
Adodc1.Recordset("用戶密碼") = Trim(Text3.Text)
If ForUserInfo.index = 1 Then
Adodc1.Recordset("用戶類型") = "后臺管理人"
Else
Adodc1.Recordset("用戶類型") = "操作員"
End If
If Check1.Value = 0 Then
Adodc1.Recordset("訂票權限") = "0"
Else
Adodc1.Recordset("訂票權限") = "1"
End If
If Check2.Value = 0 Then
Adodc1.Recordset("購票權限") = "0"
Else
Adodc1.Recordset("購票權限") = "1"
End If
If Check3.Value = 0 Then
Adodc1.Recordset("退票權限") = "0"
Else
Adodc1.Recordset("退票權限") = "1"
End If
If Check4.Value = 0 Then
Adodc1.Recordset("設置權限") = "0"
Else
Adodc1.Recordset("設置權限") = "1"
End If
If Check5.Value = 0 Then
Adodc1.Recordset("列車更新權限") = "0"
Else
Adodc1.Recordset("列車更新權限") = "1"
End If
If Check6.Value = 0 Then
Adodc1.Recordset("車票更新權限") = "0"
Else
Adodc1.Recordset("車票更新權限") = "1"
End If
If Check7.Value = 0 Then
Adodc1.Recordset("按日期統計權限") = "0"
Else
Adodc1.Recordset("按日期統計權限") = "1"
End If
If Check8.Value = 0 Then
Adodc1.Recordset("按站點統計權限") = "0"
Else
Adodc1.Recordset("按站點統計權限") = "1"
End If
If Check9.Value = 0 Then
Adodc1.Recordset("按車次統計權限") = "0"
Else
Adodc1.Recordset("按車次統計權限") = "1"
End If
If Check10.Value = 0 Then
Adodc1.Recordset("設置密碼權限") = "0"
Else
Adodc1.Recordset("設置密碼權限") = "1"
End If
If Check11.Value = 0 Then
Adodc1.Recordset("退票信息更新權限") = "0"
Else
Adodc1.Recordset("退票信息更新權限") = "1"
End If
If Check12.Value = 0 Then
Adodc1.Recordset("已售票信息更新權限") = "0"
Else
Adodc1.Recordset("已售票信息更新權限") = "1"
End If
Adodc1.Recordset.Update
Adodc1.Refresh
Label4.BackStyle = 0
Label4.BackColor = &H80FFFF
Label4.Caption = "提示: 添加記錄成功!!!"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Check1.Value = 0
Check2.Value = 0
Check3.Value = 0
Check4.Value = 0
Check5.Value = 0
Check6.Value = 0
Check7.Value = 0
Check8.Value = 0
Check9.Value = 0
Check10.Value = 0
Check11.Value = 0
Check12.Value = 0
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Option1.Value = True
End Sub
Private Sub Option1_Click()
ForUserInfo.index = 1
End Sub
Private Sub Option2_Click()
ForUserInfo.index = 2
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -