⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmjt.frm

📁 餐饮管理系统数据库设计文档 表名:bzqbj(保质期报警表) 字段名 字段类型 字段长度 (0表示不允许NULL
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmJt 
   BackColor       =   &H00C0FFFF&
   BorderStyle     =   0  'None
   ClientHeight    =   1965
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   5160
   LinkTopic       =   "Form1"
   ScaleHeight     =   1965
   ScaleWidth      =   5160
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1 
      BackColor       =   &H00A56E3A&
      Height          =   1815
      Left            =   60
      TabIndex        =   0
      Top             =   60
      Width           =   4995
      Begin VB.TextBox TxtSqrs_jt 
         Appearance      =   0  'Flat
         BackColor       =   &H00C0FFFF&
         Height          =   285
         Left            =   3330
         TabIndex        =   6
         Text            =   "Text1"
         Top             =   660
         Width           =   1485
      End
      Begin VB.TextBox TxtZh_jt 
         Appearance      =   0  'Flat
         BackColor       =   &H00C0FFFF&
         Height          =   285
         Left            =   3330
         TabIndex        =   5
         Text            =   "Text1"
         Top             =   240
         Width           =   1485
      End
      Begin VB.TextBox txtFwy_jt 
         Appearance      =   0  'Flat
         BackColor       =   &H00C0FFFF&
         Height          =   285
         Left            =   960
         TabIndex        =   4
         Text            =   "Text1"
         Top             =   660
         Width           =   1485
      End
      Begin VB.TextBox TxtRoomNm_jt 
         Appearance      =   0  'Flat
         BackColor       =   &H00C0FFFF&
         Height          =   285
         Left            =   960
         TabIndex        =   3
         Text            =   "Text1"
         Top             =   240
         Width           =   1485
      End
      Begin VB.CommandButton cmdExit 
         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            =   2820
         Picture         =   "frmJt.frx":0000
         Style           =   1  'Graphical
         TabIndex        =   2
         Top             =   1140
         Width           =   1455
      End
      Begin VB.CommandButton CmdEnt 
         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            =   480
         Picture         =   "frmJt.frx":07DA
         Style           =   1  'Graphical
         TabIndex        =   1
         Top             =   1140
         Width           =   1455
      End
      Begin VB.Label Label14 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "服 务 员"
         Height          =   225
         Left            =   60
         TabIndex        =   10
         Top             =   720
         Width           =   975
      End
      Begin VB.Label Label13 
         BackStyle       =   0  'Transparent
         Caption         =   "申请人数"
         Height          =   225
         Left            =   2550
         TabIndex        =   9
         Top             =   720
         Width           =   825
      End
      Begin VB.Label Label7 
         BackStyle       =   0  'Transparent
         Caption         =   "房间名称"
         Height          =   225
         Left            =   180
         TabIndex        =   8
         Top             =   300
         Width           =   885
      End
      Begin VB.Label Label6 
         Alignment       =   2  'Center
         BackStyle       =   0  'Transparent
         Caption         =   "桌   号"
         Height          =   225
         Left            =   2520
         TabIndex        =   7
         Top             =   300
         Width           =   765
      End
      Begin VB.Shape Shape2 
         FillColor       =   &H00C0FFFF&
         FillStyle       =   0  'Solid
         Height          =   285
         Left            =   120
         Top             =   240
         Width           =   825
      End
      Begin VB.Shape Shape3 
         FillColor       =   &H00C0FFFF&
         FillStyle       =   0  'Solid
         Height          =   285
         Left            =   2490
         Top             =   240
         Width           =   825
      End
      Begin VB.Shape Shape1 
         FillColor       =   &H00C0FFFF&
         FillStyle       =   0  'Solid
         Height          =   285
         Left            =   2490
         Top             =   660
         Width           =   825
      End
      Begin VB.Shape Shape4 
         FillColor       =   &H00C0FFFF&
         FillStyle       =   0  'Solid
         Height          =   285
         Left            =   120
         Top             =   660
         Width           =   825
      End
   End
End
Attribute VB_Name = "frmJt"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private m_result As Boolean
Private m_sqrs As Double
Private m_roomNm As String
Private m_Zh As String
Private m_Fwy As String
Public Property Get sqrs() As Double
'返回 申请人数
    sqrs = m_sqrs
End Property
Public Property Let RoomNm(ByVal id As String)
 '返回 房间名称
    m_roomNm = id
End Property
Public Property Let zh(ByVal id As String)
'传入 桌号
    m_Zh = id
End Property
Public Property Get fwy() As String
'返回 服务员ID
    fwy = m_Fwy
End Property
Public Property Get result() As Boolean
' 按确定键返回TRUE 按取消键返回FALSE
    result = m_result
End Property
Private Sub cmdExit_Click()
    m_result = False
    Unload Me
End Sub
Private Sub CmdEnt_Click()
    If chkUser = False Then
        MsgBox "该服务员ID不存在,请先在员工表中添加", vbInformation, "信息提示"
        Exit Sub
    End If
    If Val(noComma(TxtSqrs_jt)) <= 0 Then
        MsgBox "人数不能小于1位!", vbInformation, "信息提示"
        Exit Sub
    End If
    m_Fwy = Trim(txtFwy_jt)
    m_sqrs = Val(noComma(TxtSqrs_jt))
    m_roomNm = Trim(TxtRoomNm_jt)
    m_Zh = Trim(TxtZh_jt)
    m_result = True
    Me.Hide
End Sub
Private Sub initFld()
    txtFwy_jt = ""
    TxtRoomNm_jt = ""
    TxtZh_jt = ""
    TxtSqrs_jt = Format(0, sfmtc)
End Sub

Private Sub Command5_Click()

End Sub

Private Sub Form_Activate()
    TxtZh_jt = m_Zh
    TxtRoomNm_jt = m_roomNm
    TxtZh_jt.Enabled = False
    TxtRoomNm_jt.Enabled = False
    txtFwy_jt.SetFocus
End Sub

Private Sub Form_Load()
    Call initFld
End Sub
Private Sub TxtRoomNm_jt_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        KeyAscii = 0
        Call SendKeys("{TAB}")
    End If
End Sub
Private Sub TxtZh_jt_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        KeyAscii = 0
        Call SendKeys("{TAB}")
    End If
End Sub
Private Sub TxtSqrs_jt_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        KeyAscii = 0
        Call SendKeys("{TAB}")
    End If
End Sub
Private Sub txtFwy_jt_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        KeyAscii = 0
        Call SendKeys("{TAB}")
    End If
End Sub
Private Sub TxtSqrs_jt_GotFocus()
    TxtSqrs_jt = ""
End Sub
Private Sub TxtSqrs_jt_LostFocus()
    TxtSqrs_jt = Format(Val(noComma(TxtSqrs_jt)), sfmtc)
End Sub
Private Function chkUser() As Boolean
    Dim wksql As String
    Dim rs As New ADODB.Recordset
On Error GoTo errProc
    chkUser = False
    wksql = "SELECT 1 FROM employees "
    wksql = wksql & " WHERE employee_id='" & Trim(txtFwy_jt) & "'"
    Set rs = GetRsBySQL(wksql)
    If rs.RecordCount <= 0 Then Exit Function
    chkUser = True
    Exit Function
errProc:
End Function


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -