?? frm_yhgl.frm
字號(hào):
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 = "用戶注冊(cè)"
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 = "請(qǐng)輸入您要?jiǎng)h除的用戶名稱"
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 = "確認(rèn)密碼"
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, "采購(gòu)管理系統(tǒng)"
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 "注冊(cè)成功!!", 48, "采購(gòu)管理系統(tǒng)"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
frm_YHGL.Hide
Else
MsgBox "兩次輸入的密碼不一致,請(qǐng)您確認(rèn)后重新輸入", 48, "采購(gòu)管理系統(tǒng)"
Text2.Text = ""
Text3.Text = ""
Text2.SetFocus
End If
End If
adoCon.Close
End Sub
Private Sub Command2_Click()
a = MsgBox("您確認(rèn)要?jiǎng)h除該用戶嗎?", 17, "采購(gòu)管理系統(tǒng)")
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 "不能刪除當(dāng)前用戶", 64, "采購(gòu)管理系統(tǒng)"
Else
Adodc1.Recordset.Delete
Unload Me
End If
Else
MsgBox "沒(méi)有該用戶的信息,請(qǐng)您確認(rèn)后重新輸入", 32, "采購(gòu)管理系統(tǒng)"
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 = "操作員管理—用戶信息注冊(cè)"
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 = "操作員管理—用戶信息注冊(cè)"
frm_main.StatusBar1.Panels(1).Text = " 當(dāng)前操作: " & 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 = "操作員管理—用戶信息注冊(cè)"
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("您確認(rèn)要?jiǎng)h除該用戶嗎?", 17, "采購(gòu)管理系統(tǒng)")
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 "沒(méi)有該用戶的信息,請(qǐng)您確認(rèn)后重新輸入", 32, "采購(gòu)管理系統(tǒng)"
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
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -