Form_NewUser.frm
资源名称:ERPSYS.zip [点击查看]
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:28k
源码类别:
企业管理
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
- Begin VB.Form Frm_NewUser
- BorderStyle = 1 'Fixed Single
- Caption = "属性"
- ClientHeight = 4650
- ClientLeft = 780
- ClientTop = 2550
- ClientWidth = 6105
- Icon = "Form_NewUser.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4650
- ScaleWidth = 6105
- Begin VB.CommandButton Command1
- Caption = "取消&C"
- Height = 315
- Index = 1
- Left = 4890
- TabIndex = 2
- Top = 4290
- Width = 1185
- End
- Begin VB.CommandButton Command1
- Caption = "确定&D"
- Height = 315
- Index = 0
- Left = 3210
- TabIndex = 1
- Top = 4290
- Width = 1185
- End
- Begin TabDlg.SSTab SSTab
- Height = 4185
- Left = 60
- TabIndex = 0
- Top = 60
- Width = 6015
- _ExtentX = 10610
- _ExtentY = 7382
- _Version = 393216
- Style = 1
- Tabs = 2
- Tab = 1
- TabHeight = 520
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- TabCaption(0) = "用户"
- TabPicture(0) = "Form_NewUser.frx":0E42
- Tab(0).ControlEnabled= 0 'False
- Tab(0).Control(0)= "Frame3"
- Tab(0).Control(1)= "Frame1"
- Tab(0).ControlCount= 2
- TabCaption(1) = "用户组"
- TabPicture(1) = "Form_NewUser.frx":0E5E
- Tab(1).ControlEnabled= -1 'True
- Tab(1).Control(0)= "Label2(0)"
- Tab(1).Control(0).Enabled= 0 'False
- Tab(1).Control(1)= "Label2(1)"
- Tab(1).Control(1).Enabled= 0 'False
- Tab(1).Control(2)= "Frame2"
- Tab(1).Control(2).Enabled= 0 'False
- Tab(1).Control(3)= "Text2(0)"
- Tab(1).Control(3).Enabled= 0 'False
- Tab(1).Control(4)= "Text2(1)"
- Tab(1).Control(4).Enabled= 0 'False
- Tab(1).ControlCount= 5
- Begin VB.Frame Frame3
- Caption = "所属组"
- Height = 1605
- Left = -74880
- TabIndex = 25
- Top = 2460
- Width = 5745
- Begin VB.ListBox List3
- Height = 1140
- Left = 90
- TabIndex = 31
- Top = 390
- Width = 2055
- End
- Begin VB.ListBox List4
- Height = 1140
- Left = 3600
- TabIndex = 30
- Top = 390
- Width = 2055
- End
- Begin VB.CommandButton Command3
- Caption = "|"
- BeginProperty Font
- Name = "Wingdings 3"
- Size = 9
- Charset = 2
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 0
- Left = 2400
- Picture = "Form_NewUser.frx":0E7A
- TabIndex = 29
- Top = 390
- Width = 975
- End
- Begin VB.CommandButton Command3
- Caption = "}"
- BeginProperty Font
- Name = "Wingdings 3"
- Size = 9
- Charset = 2
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 2
- Left = 2400
- Picture = "Form_NewUser.frx":0F74
- TabIndex = 28
- Top = 990
- Width = 975
- End
- Begin VB.CommandButton Command3
- Caption = "||"
- BeginProperty Font
- Name = "Wingdings 3"
- Size = 9
- Charset = 2
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 1
- Left = 2400
- TabIndex = 27
- Top = 690
- Width = 975
- End
- Begin VB.CommandButton Command3
- Caption = "}}"
- BeginProperty Font
- Name = "Wingdings 3"
- Size = 9
- Charset = 2
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Index = 3
- Left = 2400
- TabIndex = 26
- Top = 1275
- Width = 975
- End
- Begin VB.Label Label5
- AutoSize = -1 'True
- Caption = "用户不属:"
- Height = 180
- Left = 3600
- TabIndex = 33
- Top = 180
- Width = 810
- End
- Begin VB.Label Label4
- AutoSize = -1 'True
- Caption = "用户所属:"
- Height = 180
- Left = 90
- TabIndex = 32
- Top = 180
- Width = 810
- End
- End
- Begin VB.Frame Frame1
- Caption = "基本信息"
- Height = 1935
- Left = -74880
- TabIndex = 12
- Top = 480
- Width = 5745
- Begin VB.TextBox UserCode
- Height = 315
- Left = 1050
- TabIndex = 36
- Top = 180
- Width = 1095
- End
- Begin VB.CommandButton Command4
- Caption = "修改口令"
- Height = 315
- Left = 2850
- TabIndex = 34
- Top = 1200
- Width = 885
- End
- Begin VB.TextBox Text1
- Height = 285
- Index = 3
- Left = 1050
- MaxLength = 30
- TabIndex = 24
- Top = 1530
- Width = 3645
- End
- Begin VB.TextBox Text1
- Height = 285
- IMEMode = 3 'DISABLE
- Index = 2
- Left = 1050
- MaxLength = 8
- PasswordChar = "*"
- TabIndex = 18
- Top = 1200
- Width = 1755
- End
- Begin VB.TextBox Text1
- Height = 285
- IMEMode = 3 'DISABLE
- Index = 1
- Left = 1050
- MaxLength = 8
- PasswordChar = "*"
- TabIndex = 17
- Top = 870
- Width = 1755
- End
- Begin VB.TextBox Text1
- Height = 285
- Index = 0
- Left = 1050
- MaxLength = 20
- TabIndex = 16
- Top = 540
- Width = 2235
- End
- Begin VB.Label Label6
- AutoSize = -1 'True
- Caption = "编码:"
- Height = 180
- Left = 270
- TabIndex = 35
- Top = 270
- Width = 450
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "说明:"
- Height = 180
- Index = 4
- Left = 270
- TabIndex = 23
- Top = 1620
- Width = 450
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "验证:"
- Height = 180
- Index = 2
- Left = 270
- TabIndex = 15
- Top = 1230
- Width = 450
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "口令:"
- Height = 180
- Index = 1
- Left = 270
- TabIndex = 14
- Top = 930
- Width = 450
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "用户名:"
- Height = 180
- Index = 0
- Left = 270
- TabIndex = 13
- Top = 600
- Width = 630
- End
- End
- Begin VB.TextBox Text2
- Height = 285
- Index = 1
- Left = 930
- MaxLength = 30
- TabIndex = 7
- Top = 960
- Width = 4185
- End
- Begin VB.TextBox Text2
- Height = 285
- Index = 0
- Left = 930
- MaxLength = 20
- TabIndex = 6
- Top = 600
- Width = 2715
- End
- Begin VB.Frame Frame2
- Caption = "用户成员"
- Height = 2625
- Left = 90
- TabIndex = 5
- Top = 1440
- Width = 5835
- Begin VB.CommandButton Command2
- Height = 315
- Index = 3
- Left = 2370
- Picture = "Form_NewUser.frx":106E
- Style = 1 'Graphical
- TabIndex = 22
- Top = 2220
- Width = 1125
- End
- Begin VB.CommandButton Command2
- Height = 285
- Index = 2
- Left = 2370
- Picture = "Form_NewUser.frx":1168
- Style = 1 'Graphical
- TabIndex = 21
- Top = 1050
- Width = 1125
- End
- Begin VB.CommandButton Command2
- Height = 315
- Index = 1
- Left = 2370
- Picture = "Form_NewUser.frx":1262
- Style = 1 'Graphical
- TabIndex = 20
- Top = 1620
- Width = 1125
- End
- Begin VB.CommandButton Command2
- Height = 285
- Index = 0
- Left = 2370
- Picture = "Form_NewUser.frx":135C
- Style = 1 'Graphical
- TabIndex = 19
- Top = 480
- Width = 1125
- End
- Begin VB.ListBox List2
- Height = 2040
- Left = 3690
- TabIndex = 9
- Top = 480
- Width = 2055
- End
- Begin VB.ListBox List1
- Height = 2040
- Left = 90
- TabIndex = 8
- Top = 480
- Width = 2055
- End
- Begin VB.Label Label3
- AutoSize = -1 'True
- Caption = "不录属于该组:"
- Height = 180
- Index = 1
- Left = 3690
- TabIndex = 11
- Top = 270
- Width = 1170
- End
- Begin VB.Label Label3
- AutoSize = -1 'True
- Caption = "录属于该组:"
- Height = 180
- Index = 0
- Left = 90
- TabIndex = 10
- Top = 270
- Width = 990
- End
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "说明:"
- Height = 180
- Index = 1
- Left = 240
- TabIndex = 4
- Top = 990
- Width = 450
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "组名:"
- Height = 180
- Index = 0
- Left = 240
- TabIndex = 3
- Top = 630
- Width = 450
- End
- End
- End
- Attribute VB_Name = "Frm_NewUser"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim Group_ID As Integer
- Dim TF As Boolean
- Dim Item2czbm()
- Dim Item1czbm()
- Private Sub Command1_Click(Index As Integer)
- On Error GoTo ERROR_EXIT
- Dim Ssql As String
- Dim I As Integer
- If Index = 1 Then Unload Me: Exit Sub
- If Me.Tag = "G" Or Me.Tag = "GE" Then
- Dim aDo_GroupRow As New Recordset
- If Trim(Text2(0).Text) = "" Then MsgBox "组名不能为空! ", 16: Text2(0).SetFocus: Exit Sub
- If Me.Tag = "G" Then
- Set aDo_GroupRow = Conn_System.Execute("select * from " & SSTab.Tag & ".dbo.System_UserGroup where GroupName='" & Trim(Text2(0).Text) & "'")
- If aDo_GroupRow.RecordCount > 0 Then MsgBox "组名不能重复! ", 16: Exit Sub
- Else
- Set aDo_GroupRow = Conn_System.Execute("select * from " & SSTab.Tag & ".dbo.System_UserGroup where GroupName='" & Trim(Text2(0).Text) & "'" _
- & " and GroupName<>'" & Text2(0).Tag & "'")
- If aDo_GroupRow.RecordCount > 0 Then MsgBox "组名不能重复! ", 16: Exit Sub
- End If
- Select Case Me.Tag
- Case "G"
- Conn_System.Execute "insert into " & SSTab.Tag & ".dbo.System_UserGroup(GroupName,Explain) " _
- & "VALUES('" & Trim(Text2(0).Text) & "','" & Trim(Text2(1).Text) & "')"
- Dim aDo_Groupid As New Recordset
- Set aDo_Groupid = Conn_System.Execute("select * from " & SSTab.Tag & ".dbo.System_UserGroup " _
- & " WHERE GroupName='" & Trim(Text2(0).Text) & "'")
- Group_ID = aDo_Groupid!Groupid
- aDo_Groupid.Close
- Set aDo_Groupid = Nothing
- Case "GE"
- Ssql = "UPDATE " & SSTab.Tag & ".dbo.System_UserGroup " _
- & "SET GroupName='" & Trim(Text2(0).Text) & "',Explain='" & Trim(Text2(1).Text) & "'" _
- & " WHERE GroupName='" & Text2(0).Tag & "'"
- Conn_System.Execute Ssql
- '-----------------
- End Select
- '-----------------
- Conn_System.Execute "delete " & SSTab.Tag & ".dbo.System_UserGroupInfo where GroupId=" & Group_ID
- For I = 0 To List1.ListCount - 1
- Conn_System.Execute "insert into " & SSTab.Tag & ".dbo.System_UserGroupInfo(GroupId,UserId)VALUES(" & Group_ID & ",'" & Item1czbm(I) & "')"
- Next
- Frm_GroupUser.UserGroupName = Trim(Text2(0).Text)
- Frm_GroupUser.Explain = Trim(Text2(1).Text)
- End If
- '-----------------
- If Me.Tag = "U" Or Me.Tag = "UE" Then
- Dim User_id As String
- If Trim(Text1(0).Text) = "" Then MsgBox "用户名不能为空! ", 16: Text1(0).SetFocus: Exit Sub
- If Trim(Text1(1).Text) <> Trim(Text1(2).Text) Then MsgBox "口令验证错误! ", 16: Text1(2).SetFocus: Exit Sub
- Dim aDo_UserRows As New Recordset
- If Me.Tag = "U" Then
- Set aDo_UserRows = Conn_System.Execute("select * from " & SSTab.Tag & ".dbo.Gy_Czygl where czymc='" & Trim(Text1(0).Text) & "'")
- If aDo_UserRows.RecordCount > 0 Then MsgBox "用户名不能重复! ", 16: Text1(0).SetFocus: Exit Sub
- Frm_GroupUser.UserId = Trim(UserCode.Text)
- User_id = Trim(UserCode.Text)
- aDo_UserRows.Close
- Ssql = "insert into " & SSTab.Tag & ".dbo.Gy_Czygl(czybm,czymc,czmm,Explain) VALUES('" _
- & User_id & "','" & Trim(Text1(0).Text) & "','" & Mmjm(Trim(Text1(1).Text)) & "','" & Trim(Text1(3).Text) & "')"
- Conn_System.Execute Ssql
- '---------------------
- Else
- Set aDo_UserRows = Conn_System.Execute("select * from " & SSTab.Tag & ".dbo.Gy_Czygl where czymc='" & Trim(Text1(0).Text) & "' and czybm<>'" & Mid(Text1(0).Tag, 2, Len(Text1(0).Tag)) & "'")
- If aDo_UserRows.RecordCount > 0 Then MsgBox "用户名不能重复! ", 16: Text1(0).SetFocus: Exit Sub
- If Text1(2).Tag = "T" Then
- Ssql = "update " & SSTab.Tag & ".dbo.Gy_Czygl set czymc='" & Trim(Text1(0).Text) & "',czmm='" & Mmjm(Trim(Text1(1).Tag)) & "',explain='" & Trim(Text1(3).Text) _
- & "' where czybm='" & Mid(Text1(0).Tag, 2, Len(Text1(0).Tag)) & "'"
- Else
- Ssql = "update " & SSTab.Tag & ".dbo.Gy_Czygl set czymc='" & Trim(Text1(0).Text) & "',explain='" & Trim(Text1(3).Text) _
- & "' where czybm='" & Mid(Text1(0).Tag, 2, Len(Text1(0).Tag)) & "'"
- End If
- Conn_System.Execute Ssql
- User_id = Mid(Text1(0).Tag, 2, Len(Text1(0).Tag))
- End If
- Conn_System.Execute "delete " & SSTab.Tag & ".dbo.System_UserGroupInfo where UserId='" & User_id & "'"
- For I = 0 To List3.ListCount - 1
- Conn_System.Execute "insert into " & SSTab.Tag & ".dbo.System_UserGroupInfo(GroupId,UserId)VALUES(" & List3.ItemData(I) & ",'" & User_id & "')"
- Next
- Frm_GroupUser.UserGroupName = Trim(Text1(0).Text)
- Frm_GroupUser.Explain = Trim(Text1(3).Text)
- End If
- Unload Me
- Exit Sub
- ERROR_EXIT:
- If Err.Number = -2147217873 Then MsgBox "编码不能重复! ", 16: Exit Sub
- MsgBox Err.Description, 16
- End Sub
- Private Sub Command2_Click(Index As Integer)
- Dim I As Integer
- Select Case Index
- Case 0
- If List2.ListIndex > -1 Then
- List1.AddItem List2.Text
- Item1czbm(List1.ListCount - 1) = Item2czbm(List2.ListIndex)
- For I = List2.ListIndex To List2.ListCount - 1
- Item2czbm(I) = Item2czbm(I + 1)
- Next I
- List2.RemoveItem (List2.ListIndex)
- End If
- Case 1
- If List1.ListIndex > -1 Then
- List2.AddItem List1.Text
- Item2czbm(List2.ListCount - 1) = Item1czbm(List1.ListIndex)
- For I = List1.ListIndex To List1.ListCount - 1
- Item1czbm(I) = Item1czbm(I + 1)
- Next I
- List1.RemoveItem (List1.ListIndex)
- End If
- Case 2
- For I = 0 To List2.ListCount - 1
- List2.ListIndex = I
- List1.AddItem List2.Text
- Item1czbm(List1.ListCount - 1) = Item2czbm(I)
- Next
- List2.Clear
- Case 3
- For I = 0 To List1.ListCount - 1
- List1.ListIndex = I
- List2.AddItem List1.Text
- Item2czbm(List2.ListCount - 1) = Item1czbm(I)
- Next
- List1.Clear
- End Select
- End Sub
- Private Sub Command3_Click(Index As Integer)
- Dim I As Integer
- Select Case Index
- Case 0
- If List4.ListIndex > -1 Then
- List3.AddItem List4.Text
- List3.ItemData(List3.ListCount - 1) = List4.ItemData(List4.ListIndex)
- List4.RemoveItem (List4.ListIndex)
- End If
- Case 2
- If List3.ListIndex > -1 Then
- List4.AddItem List3.Text
- List4.ItemData(List4.ListCount - 1) = List3.ItemData(List3.ListIndex)
- List3.RemoveItem (List3.ListIndex)
- End If
- Case 1
- For I = 0 To List4.ListCount - 1
- List4.ListIndex = I
- List3.AddItem List4.Text
- List3.ItemData(List3.ListCount - 1) = List4.ItemData(I)
- Next
- List4.Clear
- Case 3
- For I = 0 To List3.ListCount - 1
- List3.ListIndex = I
- List4.AddItem List3.Text
- List4.ItemData(List4.ListCount - 1) = List3.ItemData(I)
- Next
- List3.Clear
- End Select
- End Sub
- Private Sub Command4_Click()
- TF = True
- Form_Userpassword.Show 1
- End Sub
- Private Sub Form_Activate()
- If TF = True Then TF = False: Exit Sub
- Dim aDo_User As New Recordset
- Dim I As Integer: I = 0
- Frm_GroupUser.UserGroupName = ""
- Frm_GroupUser.Explain = ""
- If Me.Tag = "G" Or Me.Tag = "GE" Then
- '-------------------
- If Me.Tag = "G" Then
- Set aDo_User = Conn_System.Execute("select * from " & SSTab.Tag & ".dbo.Gy_Czygl")
- ReDim Item2czbm(aDo_User.RecordCount)
- ReDim Item1czbm(aDo_User.RecordCount)
- Do While Not aDo_User.EOF
- List2.AddItem aDo_User!czymc
- Item2czbm(I) = Trim(aDo_User!czybm)
- I = I + 1
- aDo_User.MoveNext
- Loop
- aDo_User.Close
- Set aDo_User = Nothing
- End If
- If Me.Tag = "GE" Then
- '-------------------
- Set aDo_User = Conn_System.Execute("select * from " & SSTab.Tag & ".dbo.Gy_Czygl")
- ReDim Item2czbm(aDo_User.RecordCount)
- ReDim Item1czbm(aDo_User.RecordCount)
- aDo_User.Close
- '------------------
- Set aDo_User = Conn_System.Execute("select * from " & SSTab.Tag & ".dbo.System_UserGroup " _
- & " WHERE GroupName='" & Text2(0).Tag & "'")
- If aDo_User.EOF Then
- Group_ID = 0
- Else
- Group_ID = aDo_User!Groupid
- End If
- aDo_User.Close
- Set aDo_User = Nothing
- '------------------
- Dim Ssql As String
- Ssql = "select * from " & SSTab.Tag & ".dbo.Gy_Czygl " _
- & "where czybm not IN (select UserId from " & SSTab.Tag & ".dbo.system_UserGroupInfo where groupid=" & Group_ID & ")"
- Set aDo_User = Conn_System.Execute(Ssql)
- Do While Not aDo_User.EOF
- List2.AddItem aDo_User!czymc
- 'List2.ItemData(i) = aDo_User!czybm
- Item2czbm(I) = Trim(aDo_User!czybm)
- I = I + 1
- aDo_User.MoveNext
- Loop
- aDo_User.Close
- Set aDo_User = Nothing
- '--------------------
- Ssql = "select * from " & SSTab.Tag & ".dbo.system_UserGroupInfo A," & SSTab.Tag & ".dbo.Gy_Czygl" _
- & " B where A.groupid=" & Group_ID & " and a.userid=b.czybm"
- Set aDo_User = Conn_System.Execute(Ssql)
- I = 0
- Do While Not aDo_User.EOF
- List1.AddItem aDo_User!czymc
- Item1czbm(I) = Trim(aDo_User!czybm)
- I = I + 1
- aDo_User.MoveNext
- Loop
- aDo_User.Close
- Set aDo_User = Nothing
- End If
- '---------
- SSTab.Tab = 1
- SSTab.TabEnabled(0) = False
- End If
- '------------------
- If Me.Tag = "U" Or Me.Tag = "UE" Then
- If Me.Tag = "U" Then
- Command4.Visible = False
- Text1(1).Enabled = True: Text1(2).Enabled = True: UserCode.Enabled = True
- Set aDo_User = Conn_System.Execute("select * from " & SSTab.Tag & ".dbo.System_UserGroup")
- Do While Not aDo_User.EOF
- List4.AddItem aDo_User!GroupName
- List4.ItemData(I) = aDo_User!Groupid
- I = I + 1
- aDo_User.MoveNext
- Loop
- aDo_User.Close
- Set aDo_User = Nothing
- End If
- '----------------------------
- If Me.Tag = "UE" Then
- '-------------------
- Command4.Visible = True
- Text1(2).Tag = ""
- Text1(1).Enabled = False: Text1(2).Enabled = False: UserCode.Enabled = False
- Ssql = "select * from " & SSTab.Tag & ".dbo.Gy_Czygl " _
- & " WHERE czybm='" & Mid(Text1(0).Tag, 2, Len(Text1(0).Tag)) & "'"
- Set aDo_User = Conn_System.Execute(Ssql)
- Text1(1).Text = "" & Trim(aDo_User!czmm)
- Text1(2).Text = "" & Trim(aDo_User!czmm)
- aDo_User.Close
- Set aDo_User = Nothing
- '------------------
- Ssql = "select * from " & SSTab.Tag & ".dbo.system_UserGroup " _
- & "where Groupid not IN (select Groupid from " & SSTab.Tag & ".dbo.system_UserGroupInfo where userid='" & Mid(Text1(0).Tag, 2, Len(Text1(0).Tag)) & "')"
- Set aDo_User = Conn_System.Execute(Ssql)
- Do While Not aDo_User.EOF
- List4.AddItem aDo_User!GroupName
- List4.ItemData(I) = aDo_User!Groupid
- I = I + 1
- aDo_User.MoveNext
- Loop
- aDo_User.Close
- Set aDo_User = Nothing
- '--------------------
- Ssql = "select * from " & SSTab.Tag & ".dbo.system_UserGroupInfo A," & SSTab.Tag & ".dbo.system_UserGroup" _
- & " B where A.groupid=b.groupid and a.userid='" & Mid(Text1(0).Tag, 2, Len(Text1(0).Tag)) & "'"
- Set aDo_User = Conn_System.Execute(Ssql)
- I = 0
- Do While Not aDo_User.EOF
- List3.AddItem aDo_User!GroupName
- List3.ItemData(I) = aDo_User!Groupid
- I = I + 1
- aDo_User.MoveNext
- Loop
- aDo_User.Close
- Set aDo_User = Nothing
- End If
- '----------------------------
- SSTab.Tab = 0
- SSTab.TabEnabled(1) = False
- End If
- End Sub
- Private Sub Form_Load()
- Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
- End Sub
- Private Sub List1_DblClick()
- Command2_Click 1
- End Sub
- Private Sub List2_DblClick()
- Command2_Click 0
- End Sub
- Private Sub List3_DblClick()
- Command3_Click 2
- End Sub
- Private Sub List4_DblClick()
- Command3_Click 0
- End Sub
- 'Private Function Mmjm1(Srmm As String) As String '密码加密模块
- ' Dim Zfcte As Integer
- ' Mmjm1 = ""
- ' For Jsqte = 1 To Len(Srmm)
- ' Zfcte = Asc(Mid(Srmm, Jsqte, 1)) + Len(Srmm) + Jsqte
- ' Mmjm1 = Mmjm1 + Mid(Trim(Str(1000 + Zfcte)), 2, 3)
- ' Next Jsqte
- 'End Function
- 'Private Function Mmjm2(Srmm As String) As String '密码解密模块
- ' Dim Zfcte As Integer
- ' Mmjm2 = ""
- ' For Jsqte = 1 To Int(Len(Srmm) / 3)
- ' Zfcte = Val(Mid(Srmm, (Jsqte - 1) * 3 + 1, 3)) - Int(Len(Srmm) / 3) - Jsqte
- ' Mmjm2 = Mmjm2 + Chr(Zfcte)
- ' Next Jsqte
- 'End Function
- Public Function Mmjm(Srmm As String) As String '密码加密对照模块
- Dim Zfcte As Integer
- Mmjm = ""
- For jsqte = 1 To Len(Srmm)
- Zfcte = Asc(Mid(Srmm, jsqte, 1)) + Asc(Mid(Srmm, Len(Srmm) - jsqte + 1, 1)) + Len(Srmm) + jsqte
- Mmjm = Mmjm + Trim(str(Zfcte))
- Next jsqte
- End Function