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

📄 房台预定.frm

📁 vb餐饮管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
               Name            =   "幼圆"
               Size            =   9
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000000FF&
            Height          =   375
            Left            =   4440
            TabIndex        =   25
            Text            =   "Text6"
            Top             =   240
            Width           =   1095
         End
         Begin VB.TextBox Text5 
            DataField       =   "顾客数量"
            DataSource      =   "Adodc1"
            BeginProperty Font 
               Name            =   "幼圆"
               Size            =   9
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000000FF&
            Height          =   375
            Left            =   2520
            TabIndex        =   24
            Text            =   "Text5"
            Top             =   240
            Width           =   975
         End
         Begin VB.TextBox Text4 
            DataField       =   "顾客姓名"
            DataSource      =   "Adodc1"
            BeginProperty Font 
               Name            =   "幼圆"
               Size            =   9
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H000000FF&
            Height          =   405
            Left            =   600
            TabIndex        =   23
            Text            =   "Text4"
            Top             =   240
            Width           =   1095
         End
         Begin VB.Label Label7 
            AutoSize        =   -1  'True
            Caption         =   "编号:"
            Height          =   195
            Left            =   120
            TabIndex        =   31
            Top             =   1080
            Width           =   540
         End
         Begin VB.Label Label5 
            AutoSize        =   -1  'True
            Caption         =   "日期:"
            Height          =   195
            Left            =   5760
            TabIndex        =   29
            Top             =   360
            Width           =   540
         End
         Begin VB.Label Label8 
            AutoSize        =   -1  'True
            Caption         =   "时间:"
            Height          =   195
            Left            =   5760
            TabIndex        =   9
            Top             =   1080
            Width           =   540
         End
         Begin VB.Label Label6 
            AutoSize        =   -1  'True
            Caption         =   "房台名称:"
            Height          =   195
            Left            =   3600
            TabIndex        =   8
            Top             =   1080
            Width           =   900
         End
         Begin VB.Label Label4 
            AutoSize        =   -1  'True
            Caption         =   "房台号:"
            Height          =   195
            Left            =   1800
            TabIndex        =   7
            Top             =   1080
            Width           =   720
         End
         Begin VB.Label Label3 
            AutoSize        =   -1  'True
            Caption         =   "联系电话:"
            Height          =   195
            Left            =   3600
            TabIndex        =   6
            Top             =   360
            Width           =   900
         End
         Begin VB.Label Label2 
            AutoSize        =   -1  'True
            Caption         =   "人数:"
            Height          =   195
            Left            =   2040
            TabIndex        =   5
            Top             =   360
            Width           =   540
         End
         Begin VB.Label Label1 
            AutoSize        =   -1  'True
            Caption         =   "姓名:"
            Height          =   195
            Left            =   120
            TabIndex        =   4
            Top             =   360
            Width           =   540
         End
      End
      Begin VB.Frame Frame1 
         Caption         =   "详细信息"
         Height          =   2535
         Left            =   120
         TabIndex        =   1
         Top             =   480
         Width           =   7935
         Begin MSAdodcLib.Adodc Adodc1 
            Height          =   330
            Left            =   720
            Top             =   1920
            Visible         =   0   'False
            Width           =   6375
            _ExtentX        =   11245
            _ExtentY        =   582
            ConnectMode     =   0
            CursorLocation  =   3
            IsolationLevel  =   -1
            ConnectionTimeout=   15
            CommandTimeout  =   30
            CursorType      =   3
            LockType        =   3
            CommandType     =   8
            CursorOptions   =   0
            CacheSize       =   50
            MaxRecords      =   0
            BOFAction       =   0
            EOFAction       =   0
            ConnectStringType=   1
            Appearance      =   1
            BackColor       =   -2147483643
            ForeColor       =   -2147483640
            Orientation     =   0
            Enabled         =   -1
            Connect         =   ""
            OLEDBString     =   ""
            OLEDBFile       =   ""
            DataSourceName  =   ""
            OtherAttributes =   ""
            UserName        =   ""
            Password        =   ""
            RecordSource    =   ""
            Caption         =   "Adodc1"
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            _Version        =   393216
         End
         Begin MSDataGridLib.DataGrid DataGrid1 
            Bindings        =   "房台预定.frx":0038
            Height          =   2175
            Left            =   120
            TabIndex        =   2
            Top             =   240
            Width           =   7695
            _ExtentX        =   13573
            _ExtentY        =   3836
            _Version        =   393216
            HeadLines       =   1
            RowHeight       =   15
            BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
               Name            =   "MS Sans Serif"
               Size            =   8.25
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ColumnCount     =   2
            BeginProperty Column00 
               DataField       =   ""
               Caption         =   ""
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   2052
                  SubFormatType   =   0
               EndProperty
            EndProperty
            BeginProperty Column01 
               DataField       =   ""
               Caption         =   ""
               BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
                  Type            =   0
                  Format          =   ""
                  HaveTrueFalseNull=   0
                  FirstDayOfWeek  =   0
                  FirstWeekOfYear =   0
                  LCID            =   2052
                  SubFormatType   =   0
               EndProperty
            EndProperty
            SplitCount      =   1
            BeginProperty Split0 
               BeginProperty Column00 
               EndProperty
               BeginProperty Column01 
               EndProperty
            EndProperty
         End
      End
   End
End
Attribute VB_Name = "FTYD"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public TableNo As String
Public TableName As String
Dim tempRecord As New ADODB.Recordset '对应adodc1.recordset
Dim tempRecord2 As New ADODB.Recordset '对应datagrid2.datasource

Private Sub Command1_Click()
Adodc1.Recordset.AddNew
Text7.Text = TableNo
Text8.Text = TableName
Text9.Text = Format(Time, "hh:mm")
Text10.Text = Format(Date, "yyyy-mm-dd")
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = True

End Sub

Private Sub Command2_Click()
Dim tempStr As String
Dim tempsql As String
On Error Resume Next
    
    '获得要删除台桌的编号,用于修改预订信息
    tempStr = Adodc1.Recordset("房台编号").Value
    '删除
    Adodc1.Recordset.Delete
    '更新房台状态
    tempsql = "update 房台状态信息 set 房台状态=0 where 房台编号='" & tempStr & "'"
    dbConn.Execute (tempsql)
    
End Sub

Private Sub Command3_Click()
Dim tempsql As String
'On Error Resume Next
    '添加记录
    Adodc1.Recordset.Update
    '更新房台信息
    tempsql = "update 房台状态信息 set 房台状态=5 where 房台编号='" & TableNo & "'" 'set 是否预定=1,
    dbConn.Execute (tempsql)
        
    Command1.Enabled = True
    Command2.Enabled = True
    Command3.Enabled = False
    Command4.Enabled = False
    
End Sub

Private Sub Command4_Click()
On Error Resume Next
    '取消
    Adodc1.Recordset.CancelBatch
    Command1.Enabled = True
    Command2.Enabled = True
    Command4.Enabled = False
    
End Sub

Private Sub Command5_Click()
On Error Resume Next
   Unload Me
   JDYD.Show 1
End Sub

Private Sub Command6_Click()
Dim tempsql As String
'On Error Resume Next
    
    
    If Option1(0).Value Then
        tempsql = "select * from 预定信息 where 预订日期='" & DTPicker1.Value & "'"
    ElseIf Option1(1).Value Then
        tempsql = "select * from 预定信息 where 房台编号='" & Text1.Text & "'"
    ElseIf Option1(2).Value Then
        tempsql = "select * from 预定信息 where 电话='" & Text2.Text & "'"
    Else
        tempsql = "select * from 预定信息 where 顾客姓名='" & Text3.Text & "'"
    End If
    
    If tempRecord2.State <> adStateClosed Then
        tempRecord2.Close
    End If
    
    tempRecord2.CursorLocation = adUseClient
    tempRecord2.Open tempsql, dbConn, adOpenDynamic, adLockOptimistic
    Set DataGrid2.DataSource = tempRecord2
   
   ' Debug.Print tempRecord.Status
    
End Sub

Private Sub Command7_Click()
    Unload Me
End Sub

Private Sub Form_Load()
Dim tempsql As String
    Set tempRecord = New ADODB.Recordset

    tempsql = "select * from 预定信息"
    tempRecord.CursorLocation = adUseClient
    
    tempRecord.Open tempsql, dbConn, adOpenDynamic, adLockOptimistic
    
    Set DataGrid1.DataSource = tempRecord
    Set Adodc1.Recordset = tempRecord
End Sub

Private Sub Text11_Change()
    If Len(Text11.Text) > 0 Then
        Command3.Enabled = True
    Else
        Command3.Enabled = False
    End If
End Sub

⌨️ 快捷键说明

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