📄 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 + -