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

📄 frmordersmanager.vb

📁 单机版餐饮服务系统,结合了SqlServer数据库
💻 VB
📖 第 1 页 / 共 5 页
字号:
            '
            'lbQueryOderContents
            '
            Me.lbQueryOderContents.Location = New System.Drawing.Point(48, 272)
            Me.lbQueryOderContents.Name = "lbQueryOderContents"
            Me.lbQueryOderContents.Size = New System.Drawing.Size(64, 21)
            Me.lbQueryOderContents.TabIndex = 44
            Me.lbQueryOderContents.Text = "订单内容"
            Me.lbQueryOderContents.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
            '
            'chkQueryAddress
            '
            Me.chkQueryAddress.Enabled = False
            Me.chkQueryAddress.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.chkQueryAddress.Location = New System.Drawing.Point(24, 176)
            Me.chkQueryAddress.Name = "chkQueryAddress"
            Me.chkQueryAddress.Size = New System.Drawing.Size(88, 21)
            Me.chkQueryAddress.TabIndex = 43
            Me.chkQueryAddress.Text = " 外送地址"
            '
            'chkQueryTel
            '
            Me.chkQueryTel.Checked = True
            Me.chkQueryTel.CheckState = System.Windows.Forms.CheckState.Checked
            Me.chkQueryTel.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.chkQueryTel.Location = New System.Drawing.Point(24, 144)
            Me.chkQueryTel.Name = "chkQueryTel"
            Me.chkQueryTel.Size = New System.Drawing.Size(88, 21)
            Me.chkQueryTel.TabIndex = 42
            Me.chkQueryTel.Text = " 联系电话"
            '
            'chkQueryName
            '
            Me.chkQueryName.Checked = True
            Me.chkQueryName.CheckState = System.Windows.Forms.CheckState.Checked
            Me.chkQueryName.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.chkQueryName.Location = New System.Drawing.Point(24, 112)
            Me.chkQueryName.Name = "chkQueryName"
            Me.chkQueryName.Size = New System.Drawing.Size(88, 21)
            Me.chkQueryName.TabIndex = 41
            Me.chkQueryName.Text = " 订单联系人"
            '
            'chkQueryExcute
            '
            Me.chkQueryExcute.Checked = True
            Me.chkQueryExcute.CheckState = System.Windows.Forms.CheckState.Checked
            Me.chkQueryExcute.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.chkQueryExcute.Location = New System.Drawing.Point(24, 80)
            Me.chkQueryExcute.Name = "chkQueryExcute"
            Me.chkQueryExcute.Size = New System.Drawing.Size(88, 21)
            Me.chkQueryExcute.TabIndex = 40
            Me.chkQueryExcute.Text = " 执行时间"
            '
            'chkOrderDate
            '
            Me.chkOrderDate.Checked = True
            Me.chkOrderDate.CheckState = System.Windows.Forms.CheckState.Checked
            Me.chkOrderDate.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.chkOrderDate.Location = New System.Drawing.Point(24, 48)
            Me.chkOrderDate.Name = "chkOrderDate"
            Me.chkOrderDate.Size = New System.Drawing.Size(88, 21)
            Me.chkOrderDate.TabIndex = 39
            Me.chkOrderDate.Text = " 预定时间"
            '
            'gpSeparator
            '
            Me.gpSeparator.Location = New System.Drawing.Point(8, 224)
            Me.gpSeparator.Name = "gpSeparator"
            Me.gpSeparator.Size = New System.Drawing.Size(432, 8)
            Me.gpSeparator.TabIndex = 38
            Me.gpSeparator.TabStop = False
            '
            'txtQueryAddress
            '
            Me.txtQueryAddress.BackColor = System.Drawing.Color.Cornsilk
            Me.txtQueryAddress.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
            Me.txtQueryAddress.Enabled = False
            Me.txtQueryAddress.Location = New System.Drawing.Point(120, 176)
            Me.txtQueryAddress.Multiline = True
            Me.txtQueryAddress.Name = "txtQueryAddress"
            Me.txtQueryAddress.Size = New System.Drawing.Size(160, 48)
            Me.txtQueryAddress.TabIndex = 37
            Me.txtQueryAddress.Text = ""
            '
            'txtQueryTel
            '
            Me.txtQueryTel.BackColor = System.Drawing.Color.Cornsilk
            Me.txtQueryTel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
            Me.txtQueryTel.Location = New System.Drawing.Point(120, 144)
            Me.txtQueryTel.Name = "txtQueryTel"
            Me.txtQueryTel.Size = New System.Drawing.Size(160, 21)
            Me.txtQueryTel.TabIndex = 35
            Me.txtQueryTel.Text = ""
            '
            'txtQueryName
            '
            Me.txtQueryName.BackColor = System.Drawing.Color.Cornsilk
            Me.txtQueryName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
            Me.txtQueryName.Location = New System.Drawing.Point(120, 112)
            Me.txtQueryName.Name = "txtQueryName"
            Me.txtQueryName.Size = New System.Drawing.Size(160, 21)
            Me.txtQueryName.TabIndex = 33
            Me.txtQueryName.Text = ""
            '
            'QueryOrderDate
            '
            Me.QueryOrderDate.Location = New System.Drawing.Point(120, 48)
            Me.QueryOrderDate.Name = "QueryOrderDate"
            Me.QueryOrderDate.Size = New System.Drawing.Size(160, 21)
            Me.QueryOrderDate.TabIndex = 31
            Me.QueryOrderDate.Value = New Date(2005, 1, 16, 23, 37, 0, 0)
            '
            'rdtQueryOuterOrder
            '
            Me.rdtQueryOuterOrder.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.rdtQueryOuterOrder.Location = New System.Drawing.Point(160, 16)
            Me.rdtQueryOuterOrder.Name = "rdtQueryOuterOrder"
            Me.rdtQueryOuterOrder.Size = New System.Drawing.Size(112, 24)
            Me.rdtQueryOuterOrder.TabIndex = 29
            Me.rdtQueryOuterOrder.Text = " 外 卖 预 订"
            '
            'rdtQueryInnerOrder
            '
            Me.rdtQueryInnerOrder.Checked = True
            Me.rdtQueryInnerOrder.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.rdtQueryInnerOrder.Location = New System.Drawing.Point(48, 16)
            Me.rdtQueryInnerOrder.Name = "rdtQueryInnerOrder"
            Me.rdtQueryInnerOrder.TabIndex = 28
            Me.rdtQueryInnerOrder.TabStop = True
            Me.rdtQueryInnerOrder.Text = " 酒 宴 预 订"
            '
            'QueryExcuteDate
            '
            Me.QueryExcuteDate.CalendarMonthBackground = System.Drawing.Color.Cornsilk
            Me.QueryExcuteDate.Location = New System.Drawing.Point(120, 80)
            Me.QueryExcuteDate.Name = "QueryExcuteDate"
            Me.QueryExcuteDate.Size = New System.Drawing.Size(160, 21)
            Me.QueryExcuteDate.TabIndex = 27
            Me.QueryExcuteDate.Value = New Date(2005, 1, 16, 23, 38, 0, 0)
            '
            'txtQueryOrderID
            '
            Me.txtQueryOrderID.BackColor = System.Drawing.Color.Cornsilk
            Me.txtQueryOrderID.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
            Me.txtQueryOrderID.Location = New System.Drawing.Point(120, 240)
            Me.txtQueryOrderID.Name = "txtQueryOrderID"
            Me.txtQueryOrderID.Size = New System.Drawing.Size(320, 21)
            Me.txtQueryOrderID.TabIndex = 25
            Me.txtQueryOrderID.Text = ""
            '
            'lbQueryOrderID
            '
            Me.lbQueryOrderID.Location = New System.Drawing.Point(48, 240)
            Me.lbQueryOrderID.Name = "lbQueryOrderID"
            Me.lbQueryOrderID.Size = New System.Drawing.Size(64, 21)
            Me.lbQueryOrderID.TabIndex = 24
            Me.lbQueryOrderID.Text = "订单编码"
            Me.lbQueryOrderID.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
            '
            'frmOrdersManager
            '
            Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
            Me.ClientSize = New System.Drawing.Size(474, 408)
            Me.Controls.Add(Me.QueryPages)
            Me.Controls.Add(Me.btnOk)
            Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
            Me.MaximizeBox = False
            Me.Name = "frmOrdersManager"
            Me.Text = "前台登记-帐单及订单管理"
            Me.gpOrderInfo.ResumeLayout(False)
            Me.QueryPages.ResumeLayout(False)
            Me.BillsPage.ResumeLayout(False)
            Me.gpBillInfo.ResumeLayout(False)
            Me.GroupBox3.ResumeLayout(False)
            CType(Me.MenuGrid, System.ComponentModel.ISupportInitialize).EndInit()
            Me.BillsQueryPage.ResumeLayout(False)
            Me.gpQuerInfo.ResumeLayout(False)
            Me.GroupBox4.ResumeLayout(False)
            CType(Me.QueryDataGrid, System.ComponentModel.ISupportInitialize).EndInit()
            Me.OrdersPage.ResumeLayout(False)
            Me.OrdersQueryPage.ResumeLayout(False)
            Me.gpOrdersQuery.ResumeLayout(False)
            Me.ResumeLayout(False)

        End Sub

#End Region

        Private MenuInfoList As New ArrayList
        Private sqlstr As String = String.Empty

        Friend Structure MenuInformation
            Friend menuID As Guid
            Friend menuPrice As Double
            Friend menuQuantity As Integer
        End Structure

        Private Sub frmOrdersManager_Load( _
                               ByVal sender As System.Object, _
                               ByVal e As System.EventArgs _
                               ) Handles MyBase.Load
            Me.LoadMenuInfo()
            Me.LoadRoomInfo()
        End Sub

        Private Sub DataBindTableInfo(ByVal room As String)
            sqlstr = "SELECT tablenum FROM TableInfo WHERE roomname='" & room.Trim & "' AND status='" & RoomAndTableControl.UseStatus.已空闲.ToString & "'"
            cmbTables.DataSource = AccessToDatabase.GetDataFromDB(sqlstr).Tables(0)
            cmbTables.DisplayMember = "tablenum"
            If MenuInfoList.Count > 0 Then
                MenuInfoList.Clear()
            End If
        End Sub

        Private Sub LoadRoomInfo()
            Dim Index As Integer
            Dim tempDS As New DataSet
            tempDS.Clear()
            sqlstr = "SELECT DISTINCT roomname FROM TableInfo"
            tempDS = AccessToDatabase.GetDataFromDB(sqlstr)
            If Not tempDS Is Nothing Then
                cmbRooms.Items.Clear()
                For Index = 0 To tempDS.Tables(0).Rows.Count - 1
                    cmbRooms.Items.Add(tempDS.Tables(0).Rows(Index)("roomname").ToString.Trim)
                Next
            End If
            cmbRooms.SelectedIndex = 0
            Me.DataBindTableInfo(cmbRooms.SelectedItem)
        End Sub

        Private Sub LoadMenuInfo()
            sqlstr = "SELECT menu_id as '编码', menu_name as '菜名',menu_price as '价格',menu_style as '类型',menu_sapor as '风味',menu_description as '描述',menu_material as '原料' FROM MenuInfo"
            MenuGrid.DataSource = AccessToDatabase.GetDataFromDB(sqlstr).Tables(0).DefaultView
        End Sub

        Private Sub MenuGrid_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles MenuGrid.DoubleClick
            Dim mGUID As Guid
            Dim Price As Double
            Dim MenuName As String
            If MenuGrid.CurrentRowIndex >= 0 Then
                MenuName = CStr(MenuGrid.Item(MenuGrid.CurrentRowIndex, 1)).Trim
                MenuList.Items.Add(MenuName)
                mGUID = CType(MenuGrid.Item(MenuGrid.CurrentRowIndex, 0), Guid)
                Price = CType(MenuGrid.Item(MenuGrid.CurrentRowIndex, 2), Double)
                Dim AddedMenuInfo As New MenuInformation
                AddedMenuInfo.menuID = mGUID
                AddedMenuInfo.menuPrice = Price
                AddedMenuInfo.menuQuantity = 1
                MenuInfoList.Add(AddedMenuInfo)
            End If
        End Sub

        Private Sub MenuList_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles MenuList.DoubleClick
            If MenuList.SelectedIndex >= 0 Then
                Dim Index As Integer = MenuList.SelectedIndex

⌨️ 快捷键说明

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