?? wh_guanlito.frm
字號:
VERSION 5.00
Begin VB.Form wh_guanlito
BorderStyle = 1 'Fixed Single
Caption = "齊英天肛腸醫院綜合信息管理系統"
ClientHeight = 3945
ClientLeft = 45
ClientTop = 435
ClientWidth = 4710
Icon = "wh_guanlito.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3945
ScaleWidth = 4710
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command3
Caption = "放 棄"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 450
Left = 3000
TabIndex = 11
Top = 3240
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "刪 除"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 450
Left = 1800
TabIndex = 10
Top = 3240
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "修 改"
Default = -1 'True
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 450
Left = 600
TabIndex = 9
Top = 3240
Width = 1095
End
Begin VB.Frame Frame1
Caption = "人員管理"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2775
Left = 240
TabIndex = 5
Top = 120
Width = 4095
Begin VB.TextBox bianma
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
TabIndex = 13
Top = 1920
Width = 2295
End
Begin VB.TextBox v_name
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
TabIndex = 0
Top = 240
Width = 2295
End
Begin VB.TextBox v_password
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
TabIndex = 1
Top = 840
Width = 2295
End
Begin VB.OptionButton Option1
Caption = "一般員工"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 600
TabIndex = 3
Top = 2400
Value = -1 'True
Width = 1335
End
Begin VB.OptionButton Option2
Caption = "管理用戶"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 2160
TabIndex = 4
Top = 2400
Width = 1215
End
Begin VB.ComboBox v_bumen
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 330
ItemData = "wh_guanlito.frx":0BC2
Left = 1200
List = "wh_guanlito.frx":0BCF
TabIndex = 2
Top = 1440
Width = 2295
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "編 碼"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 240
TabIndex = 12
Top = 2040
Width = 735
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "姓 名"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 240
TabIndex = 8
Top = 360
Width = 735
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "密 碼"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 240
TabIndex = 7
Top = 960
Width = 735
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "部 門"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 240
TabIndex = 6
Top = 1560
Width = 735
End
End
End
Attribute VB_Name = "wh_guanlito"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
b1 = MsgBox("您確實修改嗎?", vbOKCancel, "系統提示!")
If b1 = 1 Then
'密碼的唯一性################################
Dim rs As New ADODB.Recordset
Dim sql As String
sql = "select * from 人名 where 密碼='" + Trim(v_password) + "'"
rs.Open sql, db
If Not rs.EOF Then
a = MsgBox("密碼發生沖突,請重新更換密碼!", vbQuestion, "系統提示!")
v_password.SetFocus
Exit Sub
End If
'編碼的唯一性###############################
Dim rs11 As New ADODB.Recordset
Dim sql11 As String
sql11 = "select * from 人名 where 編碼='" + Trim(bianma.Text) + "'"
rs11.Open sql11, db
If Not rs11.EOF Then
a = MsgBox("編碼發生沖突,請重新更換編碼!", vbQuestion, "系統提示!")
bianma.SetFocus
Exit Sub
End If
If Option1.Value = True Then
v_quanxian1 = "0"
End If
If Option2.Value = True Then
v_quanxian1 = "1"
End If
Dim rs1 As New ADODB.Recordset
Dim sql1 As String
sql1 = "update 人名 set 姓名='" + Trim(v_name.Text) + "',密碼='" + Trim(v_password.Text) + "',部門='" + Trim(v_bumen.Text) + "',權限='" + Trim(v_quanxian1) + "',編碼='" + Trim(CStr(bianma.Text)) + "' where id='" + Trim(CStr(wh_renyuan_edit.v_id)) + "'"
rs1.Open sql1, db
b1 = MsgBox("恭喜,數據修改成功!", vbInformation, "系統提示!")
Unload Me
End If
End Sub
Private Sub Command2_Click()
b1 = MsgBox("您確實刪除嗎?", vbOKCancel, "系統提示!")
If b1 = 1 Then
Dim rs1 As New ADODB.Recordset
Dim sql1 As String
sql1 = "delete 人名 where id=" + Trim(CStr(wh_renyuan_edit.v_id))
rs1.Open sql1, db
b1 = MsgBox("恭喜,數據刪除成功!", vbInformation, "系統提示!")
Unload Me
End If
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim id As String
id = CStr(wh_renyuan_edit.v_id)
Dim sql1 As String
sql1 = "select * from 人名 where id=" + Trim(id)
Dim rs1 As New ADODB.Recordset
rs1.Open sql1, db
v_name = Trim(rs1("姓名"))
v_password = Trim(rs1("密碼"))
v_bumen = Trim(rs1("部門"))
v_quanxian = Trim(rs1("權限"))
bianma.Text = Trim(rs1("編碼"))
If v_quanxian = "0" Then
Option1.Value = True
End If
If v_quanxian = "1" Then
Option2.Value = True
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -