📄 frmdzpz.frm
字号:
VERSION 5.00
Begin VB.Form frmdzpz
BackColor = &H00C0FFFF&
BorderStyle = 0 'None
ClientHeight = 2175
ClientLeft = 0
ClientTop = 0
ClientWidth = 5400
LinkTopic = "Form1"
ScaleHeight = 2175
ScaleWidth = 5400
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
BackColor = &H00A56E3A&
Height = 1995
Left = 60
TabIndex = 0
Top = 60
Width = 5235
Begin VB.CommandButton CmdEnt_DZ
Appearance = 0 'Flat
BeginProperty Font
Name = "MS Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 450
Left = 600
Picture = "frmdzpz.frx":0000
Style = 1 'Graphical
TabIndex = 8
Top = 1440
Width = 1455
End
Begin VB.CommandButton cmdExit_dz
Appearance = 0 'Flat
BeginProperty Font
Name = "MS Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 450
Left = 2880
Picture = "frmdzpz.frx":07C7
Style = 1 'Graphical
TabIndex = 7
Top = 1440
Width = 1455
End
Begin VB.TextBox TxtPzdzr_dz
Appearance = 0 'Flat
BackColor = &H00C0FFFF&
Height = 285
Left = 1050
TabIndex = 1
Text = "Text1"
Top = 180
Width = 1485
End
Begin VB.TextBox TxtRate
Appearance = 0 'Flat
BackColor = &H00C0FFFF&
Height = 285
Left = 1050
TabIndex = 3
Text = "Text1"
Top = 600
Width = 1485
End
Begin VB.TextBox TxtPwd_dz
Appearance = 0 'Flat
BackColor = &H00C0FFFF&
Height = 285
IMEMode = 3 'DISABLE
Left = 3570
PasswordChar = "*"
TabIndex = 2
Top = 180
Width = 1485
End
Begin VB.CheckBox chkMfwf
BackColor = &H00A56E3A&
Caption = "Check1"
Height = 255
Left = 1110
TabIndex = 5
Top = 1050
Width = 195
End
Begin VB.CheckBox ChkQl
BackColor = &H00A56E3A&
Caption = "Check1"
Height = 255
Left = 3600
TabIndex = 4
Top = 630
Width = 195
End
Begin VB.CheckBox ChkMfjf
BackColor = &H00A56E3A&
Caption = "Check1"
Height = 255
Left = 3600
TabIndex = 6
Top = 1020
Width = 195
End
Begin VB.Label Label6
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "密 码"
Height = 225
Index = 0
Left = 2640
TabIndex = 14
Top = 240
Width = 885
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = "批准打折人"
Height = 225
Index = 0
Left = 120
TabIndex = 13
Top = 240
Width = 915
End
Begin VB.Label Label14
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "菜单折扣率"
Height = 225
Index = 0
Left = 60
TabIndex = 12
Top = 660
Width = 1005
End
Begin VB.Label Label6
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "免房间费"
Height = 225
Index = 1
Left = 2640
TabIndex = 11
Top = 1080
Width = 885
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = " 免服务费"
Height = 225
Index = 1
Left = 120
TabIndex = 10
Top = 1080
Width = 915
End
Begin VB.Label Label14
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "去 零"
Height = 225
Index = 1
Left = 2640
TabIndex = 9
Top = 660
Width = 885
End
Begin VB.Shape Shape2
FillColor = &H00C0FFFF&
FillStyle = 0 'Solid
Height = 285
Index = 0
Left = 60
Top = 180
Width = 975
End
Begin VB.Shape Shape4
FillColor = &H00C0FFFF&
FillStyle = 0 'Solid
Height = 285
Index = 0
Left = 60
Top = 600
Width = 975
End
Begin VB.Shape Shape2
FillColor = &H00C0FFFF&
FillStyle = 0 'Solid
Height = 285
Index = 1
Left = 60
Top = 1020
Width = 975
End
Begin VB.Shape Shape3
FillColor = &H00C0FFFF&
FillStyle = 0 'Solid
Height = 285
Index = 1
Left = 2580
Top = 1020
Width = 975
End
Begin VB.Shape Shape4
FillColor = &H00C0FFFF&
FillStyle = 0 'Solid
Height = 285
Index = 1
Left = 2580
Top = 600
Width = 975
End
Begin VB.Shape Shape3
FillColor = &H00C0FFFF&
FillStyle = 0 'Solid
Height = 285
Index = 0
Left = 2580
Top = 180
Width = 975
End
End
End
Attribute VB_Name = "frmdzpz"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private m_pzdzr As String
Private m_rate As Integer
Private m_ql As Boolean
Private m_mfjf As Boolean
Private m_mfwf As Boolean
Private m_result As Boolean
Public Property Get pzdzr() As String '批准打折人
pzdzr = m_pzdzr
End Property
Public Property Get rate() As Integer '菜单折扣率
rate = m_rate
End Property
Public Property Get ql() As Boolean '去零
ql = m_ql
End Property
Public Property Get mfjf() As Boolean '免房间费
mfjf = m_mfjf
End Property
Public Property Get mfwf() As Boolean '免服务费
mfwf = m_mfwf
End Property
Public Property Get result() As Boolean '免服务费
result = m_result
End Property
Private Sub CmdEnt_DZ_Click()
TxtRate = Format(Val(TxtRate), "##0")
If TxtRate <= 0 Then
MsgBox "折扣率必须大于0", vbInformation, "信息提示"
Exit Sub
End If
If chkUser = False Then
MsgBox "用户没有权限操作此项!请联系系统管理员!", vbOKOnly, "信息提示"
Exit Sub
End If
m_pzdzr = Trim(TxtPzdzr_dz)
m_rate = Val(TxtRate)
m_ql = IIf(ChkQl.Value = vbUnchecked, True, False)
m_mfwf = IIf(chkmfwf.Value = vbChecked, True, False)
m_mfjf = IIf(chkmfjf.Value = vbChecked, True, False)
m_result = True
Me.Hide
End Sub
Private Sub cmdExit_dz_Click()
m_result = False
Unload Me
End Sub
Private Sub Form_Activate()
Call initFrm
End Sub
Private Sub initFrm()
TxtPzdzr_dz = ""
TxtPwd_dz = ""
TxtRate = 100
ChkQl.Value = vbUnchecked
chkmfwf.Value = vbUnchecked
chkmfjf.Value = vbUnchecked
End Sub
Private Function chkUser() As Boolean
' Dim wksql As String
' Dim rs As New ADODB.Recordset
On Error GoTo errProc
chkUser = GetqtRight(Trim(TxtPzdzr_dz), Trim(TxtPwd_dz), 1)
' wksql = "SELECT 1 FROM employees "
' wksql = wksql & " WHERE employee_id='" & Trim(TxtPzdzr_dz) & "'"
' wksql = wksql & " AND pwd='" & Trim(TxtPwd_dz) & "'"
' Set rs = GetRsBySQL(wksql)
' If rs.RecordCount <= 0 Then Exit Function
Exit Function
errProc:
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -