📄 frm_yhgl.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frm_YHGL
BorderStyle = 3 'Fixed Dialog
ClientHeight = 1860
ClientLeft = 3645
ClientTop = 2925
ClientWidth = 4395
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1860
ScaleWidth = 4395
ShowInTaskbar = 0 'False
Begin VB.OptionButton Option2
Caption = "用户删除"
Height = 375
Left = 1320
TabIndex = 24
Top = 1440
Width = 1095
End
Begin VB.OptionButton Option1
Caption = "用户注册"
Height = 375
Left = 120
TabIndex = 23
Top = 1440
Width = 1095
End
Begin VB.CheckBox Check10
Caption = "Check10"
Height = 375
Left = 3120
TabIndex = 22
Top = 5040
Width = 975
End
Begin VB.CheckBox Check9
Caption = "Check9"
Height = 255
Left = 3120
TabIndex = 21
Top = 4680
Width = 975
End
Begin VB.CheckBox Check8
Caption = "Check8"
Height = 495
Left = 1800
TabIndex = 20
Top = 4680
Width = 1095
End
Begin VB.CheckBox Check7
Caption = "Check7"
Height = 255
Left = 480
TabIndex = 19
Top = 4680
Width = 855
End
Begin VB.CheckBox Check6
Caption = "Check6"
Height = 375
Left = 3120
TabIndex = 18
Top = 4200
Width = 1095
End
Begin VB.CheckBox Check5
Caption = "Check5"
Height = 495
Left = 1680
TabIndex = 17
Top = 4200
Width = 1215
End
Begin VB.CheckBox Check4
Caption = "Check4"
Height = 255
Left = 480
TabIndex = 16
Top = 4200
Width = 855
End
Begin VB.CheckBox Check3
Caption = "Check3"
Height = 375
Left = 3120
TabIndex = 15
Top = 3480
Width = 975
End
Begin VB.CheckBox Check2
Caption = "Check2"
Height = 255
Left = 1920
TabIndex = 14
Top = 3600
Width = 1095
End
Begin VB.CheckBox Check1
Caption = "Check1"
Height = 375
Left = 600
TabIndex = 13
Top = 3480
Width = 1095
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 120
Top = 2160
Visible = 0 'False
Width = 2175
_ExtentX = 3836
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=cggl"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=cggl"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from Table_xxdl"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.TextBox Text6
Height = 375
Left = 240
TabIndex = 12
Top = 5280
Visible = 0 'False
Width = 975
End
Begin VB.CommandButton Command3
Caption = "取消"
Height = 375
Left = 3480
TabIndex = 11
Top = 1440
Width = 855
End
Begin VB.CommandButton Command2
Caption = "确定"
Height = 375
Left = 2520
TabIndex = 10
Top = 1440
Width = 855
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 2520
TabIndex = 9
Top = 1440
Width = 855
End
Begin VB.Frame Frame1
Height = 1335
Left = 0
TabIndex = 0
Top = 0
Width = 4335
Begin VB.ComboBox Combo1
Height = 300
Left = 1080
Style = 2 'Dropdown List
TabIndex = 25
Top = 720
Width = 2175
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "请输入您要删除的用户名称"
Height = 255
Left = 1080
TabIndex = 8
Top = 360
Width = 2175
End
End
Begin VB.Frame Frame2
Height = 1335
Left = 0
TabIndex = 1
Top = 0
Width = 4335
Begin VB.TextBox Text3
Height = 300
IMEMode = 3 'DISABLE
Left = 1560
PasswordChar = "*"
TabIndex = 7
Top = 920
Width = 2535
End
Begin VB.TextBox Text2
Height = 300
IMEMode = 3 'DISABLE
Left = 1560
PasswordChar = "*"
TabIndex = 6
Top = 550
Width = 2535
End
Begin VB.TextBox Text1
Height = 300
Left = 1560
TabIndex = 5
Top = 200
Width = 2535
End
Begin VB.Label Label3
Caption = "确认密码"
Height = 225
Left = 240
TabIndex = 4
Top = 980
Width = 1215
End
Begin VB.Label Label2
Caption = "用户密码"
Height = 375
Left = 240
TabIndex = 3
Top = 650
Width = 1215
End
Begin VB.Label Label1
Caption = "用户名称"
Height = 375
Left = 240
TabIndex = 2
Top = 300
Width = 1335
End
End
End
Attribute VB_Name = "frm_YHGL"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim a
Private Sub Command1_Click()
Call main
Adodc1.RecordSource = "select * from Table_xxdl"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveLast
Text6.Text = Val(Adodc1.Recordset.Fields("id")) + 1
Else
Text6.Text = 1
End If
If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Then
MsgBox "输入不完全!!", 48, "采购管理系统"
Else
If Text2.Text = Text3.Text Then
Set adoRs = adoCon.Execute("insert into Table_xxdl values(" & Text6 & ",'" & Text1 & "','" & Text2 & "','" & Check1 & "','" & Check2 & "','" & Check3 & "','" & Check4 & "','" & Check5 & "','" & Check6 & "')")
MsgBox "注册成功!!", 48, "采购管理系统"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
frm_YHGL.Hide
Else
MsgBox "两次输入的密码不一致,请您确认后重新输入", 48, "采购管理系统"
Text2.Text = ""
Text3.Text = ""
Text2.SetFocus
End If
End If
adoCon.Close
End Sub
Private Sub Command2_Click()
a = MsgBox("您确认要删除该用户吗?", 17, "采购管理系统")
If a = vbOK Then
Adodc1.RecordSource = "select * from Table_xxdl where 用户名='" + Combo1.Text + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
If frm_main.Text1.Text = Combo1.Text Then
MsgBox "不能删除当前用户", 64, "采购管理系统"
Else
Adodc1.Recordset.Delete
Unload Me
End If
Else
MsgBox "没有该用户的信息,请您确认后重新输入", 32, "采购管理系统"
Combo1.SetFocus
End If
Else
End If
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Command4_Click()
frm_RYXS.Show
frm_RYXS.Caption = "用户删除"
End Sub
Private Sub Form_Activate()
If Option1.Value = 1 Then
Me.Caption = "操作员管理—用户信息注册"
Frame2.Visible = True
Frame1.Visible = False
Command1.Visible = True
Command2.Visible = False
ElseIf Option2.Value = 1 Then
Me.Caption = "操作员管理—用户信息删除"
Frame1.Visible = True
Frame2.Visible = False
Command2.Visible = True
Command1.Visible = False
Else
End If
End Sub
Private Sub Form_Load()
Option1.Value = 1
Me.Caption = "操作员管理—用户信息注册"
frm_main.StatusBar1.Panels(1).Text = " 当前操作: " & Me.Caption
Frame2.Visible = True
Frame1.Visible = False
Command1.Visible = True
Command2.Visible = False
Adodc1.RecordSource = "select * from Table_xxdl order by id"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveFirst
Do While Adodc1.Recordset.EOF = False
Combo1.AddItem (Adodc1.Recordset.Fields("用户名"))
Adodc1.Recordset.MoveNext
Loop
Else
End If
End Sub
Private Sub Option1_Click()
Me.Caption = "操作员管理—用户信息注册"
Frame2.Visible = True
Frame1.Visible = False
Command1.Visible = True
Command2.Visible = False
'Text1.SetFocus
End Sub
Private Sub Option2_Click()
Me.Caption = "操作员管理—用户信息删除"
Frame1.Visible = True
Frame2.Visible = False
Command2.Visible = True
Command1.Visible = False
'Text4.SetFocus
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text2.SetFocus
Else
End If
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text3.SetFocus
Else
End If
End Sub
Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call Command1_Click
Else
End If
End Sub
Private Sub Text4_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
a = MsgBox("您确认要删除该用户吗?", 17, "采购管理系统")
If a = vbOK Then
Adodc1.RecordSource = "select * from Table_xxdl where 用户名='" + Text4.Text + "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.Delete
frm_YHGL.Hide
Else
MsgBox "没有该用户的信息,请您确认后重新输入", 32, "采购管理系统"
Text4.SetFocus
End If
Else
End If
Else
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm_main.StatusBar1.Panels(1).Text = " 吉林省明日科技有限公司"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -