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

📄 frmmenumanager.vb

📁 单机版餐饮服务系统,结合了SqlServer数据库
💻 VB
📖 第 1 页 / 共 3 页
字号:
            Me.Label4.TabIndex = 12
            Me.Label4.Text = "地方风味"
            Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
            '
            'Label6
            '
            Me.Label6.ForeColor = System.Drawing.Color.Blue
            Me.Label6.Location = New System.Drawing.Point(16, 208)
            Me.Label6.Name = "Label6"
            Me.Label6.Size = New System.Drawing.Size(72, 21)
            Me.Label6.TabIndex = 11
            Me.Label6.Text = "优惠折扣*"
            Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
            '
            'txtMenuFeature
            '
            Me.txtMenuFeature.BackColor = System.Drawing.Color.Cornsilk
            Me.txtMenuFeature.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
            Me.txtMenuFeature.Location = New System.Drawing.Point(80, 144)
            Me.txtMenuFeature.Name = "txtMenuFeature"
            Me.txtMenuFeature.Size = New System.Drawing.Size(152, 21)
            Me.txtMenuFeature.TabIndex = 10
            Me.txtMenuFeature.Text = ""
            '
            'txtMenuPrice
            '
            Me.txtMenuPrice.BackColor = System.Drawing.Color.Cornsilk
            Me.txtMenuPrice.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
            Me.txtMenuPrice.ForeColor = System.Drawing.Color.Red
            Me.txtMenuPrice.Location = New System.Drawing.Point(80, 176)
            Me.txtMenuPrice.Name = "txtMenuPrice"
            Me.txtMenuPrice.Size = New System.Drawing.Size(152, 21)
            Me.txtMenuPrice.TabIndex = 9
            Me.txtMenuPrice.Text = ""
            Me.txtMenuPrice.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
            '
            'txtMenuName
            '
            Me.txtMenuName.BackColor = System.Drawing.Color.Cornsilk
            Me.txtMenuName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
            Me.txtMenuName.Location = New System.Drawing.Point(80, 69)
            Me.txtMenuName.Name = "txtMenuName"
            Me.txtMenuName.Size = New System.Drawing.Size(152, 21)
            Me.txtMenuName.TabIndex = 8
            Me.txtMenuName.Text = ""
            '
            'Label5
            '
            Me.Label5.ForeColor = System.Drawing.Color.Blue
            Me.Label5.Location = New System.Drawing.Point(16, 176)
            Me.Label5.Name = "Label5"
            Me.Label5.Size = New System.Drawing.Size(72, 21)
            Me.Label5.TabIndex = 7
            Me.Label5.Text = "菜谱价格*"
            Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
            '
            'Label3
            '
            Me.Label3.ForeColor = System.Drawing.Color.Blue
            Me.Label3.Location = New System.Drawing.Point(16, 107)
            Me.Label3.Name = "Label3"
            Me.Label3.Size = New System.Drawing.Size(64, 20)
            Me.Label3.TabIndex = 6
            Me.Label3.Text = "菜谱类型*"
            Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
            '
            'Label2
            '
            Me.Label2.ForeColor = System.Drawing.Color.Blue
            Me.Label2.Location = New System.Drawing.Point(16, 69)
            Me.Label2.Name = "Label2"
            Me.Label2.Size = New System.Drawing.Size(64, 21)
            Me.Label2.TabIndex = 5
            Me.Label2.Text = "菜谱名称*"
            Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
            '
            'btnBrowser
            '
            Me.btnBrowser.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.btnBrowser.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
            Me.btnBrowser.ForeColor = System.Drawing.Color.Navy
            Me.btnBrowser.Location = New System.Drawing.Point(256, 173)
            Me.btnBrowser.Name = "btnBrowser"
            Me.btnBrowser.Size = New System.Drawing.Size(64, 24)
            Me.btnBrowser.TabIndex = 24
            Me.btnBrowser.Text = "浏览"
            '
            'txtMenuID
            '
            Me.txtMenuID.BackColor = System.Drawing.Color.Cornsilk
            Me.txtMenuID.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
            Me.txtMenuID.Location = New System.Drawing.Point(80, 24)
            Me.txtMenuID.Name = "txtMenuID"
            Me.txtMenuID.ReadOnly = True
            Me.txtMenuID.Size = New System.Drawing.Size(240, 21)
            Me.txtMenuID.TabIndex = 1
            Me.txtMenuID.Text = ""
            '
            'MenuPicture
            '
            Me.MenuPicture.BackColor = System.Drawing.Color.Gray
            Me.MenuPicture.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
            Me.MenuPicture.Location = New System.Drawing.Point(240, 69)
            Me.MenuPicture.Name = "MenuPicture"
            Me.MenuPicture.Size = New System.Drawing.Size(80, 96)
            Me.MenuPicture.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
            Me.MenuPicture.TabIndex = 23
            Me.MenuPicture.TabStop = False
            '
            'Label1
            '
            Me.Label1.ForeColor = System.Drawing.Color.Blue
            Me.Label1.Location = New System.Drawing.Point(16, 24)
            Me.Label1.Name = "Label1"
            Me.Label1.Size = New System.Drawing.Size(64, 21)
            Me.Label1.TabIndex = 0
            Me.Label1.Text = "菜单编码"
            Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
            '
            'gpSeparate
            '
            Me.gpSeparate.Location = New System.Drawing.Point(8, 48)
            Me.gpSeparate.Name = "gpSeparate"
            Me.gpSeparate.Size = New System.Drawing.Size(312, 8)
            Me.gpSeparate.TabIndex = 21
            Me.gpSeparate.TabStop = False
            '
            'txtMenuDescription
            '
            Me.txtMenuDescription.BackColor = System.Drawing.Color.Cornsilk
            Me.txtMenuDescription.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
            Me.txtMenuDescription.Location = New System.Drawing.Point(80, 296)
            Me.txtMenuDescription.Multiline = True
            Me.txtMenuDescription.Name = "txtMenuDescription"
            Me.txtMenuDescription.Size = New System.Drawing.Size(240, 56)
            Me.txtMenuDescription.TabIndex = 18
            Me.txtMenuDescription.Text = ""
            '
            'Label10
            '
            Me.Label10.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
            Me.Label10.ForeColor = System.Drawing.Color.Navy
            Me.Label10.Location = New System.Drawing.Point(232, 208)
            Me.Label10.Name = "Label10"
            Me.Label10.Size = New System.Drawing.Size(24, 21)
            Me.Label10.TabIndex = 20
            Me.Label10.Text = "%"
            Me.Label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
            '
            'Label9
            '
            Me.Label9.ForeColor = System.Drawing.Color.Navy
            Me.Label9.Location = New System.Drawing.Point(232, 176)
            Me.Label9.Name = "Label9"
            Me.Label9.Size = New System.Drawing.Size(24, 21)
            Me.Label9.TabIndex = 19
            Me.Label9.Text = "元"
            Me.Label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
            '
            'btnUpdate
            '
            Me.btnUpdate.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.btnUpdate.ForeColor = System.Drawing.Color.Navy
            Me.btnUpdate.Location = New System.Drawing.Point(424, 392)
            Me.btnUpdate.Name = "btnUpdate"
            Me.btnUpdate.Size = New System.Drawing.Size(80, 24)
            Me.btnUpdate.TabIndex = 5
            Me.btnUpdate.Text = "更新菜谱"
            '
            'btnClearAll
            '
            Me.btnClearAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.btnClearAll.ForeColor = System.Drawing.Color.Navy
            Me.btnClearAll.Location = New System.Drawing.Point(160, 392)
            Me.btnClearAll.Name = "btnClearAll"
            Me.btnClearAll.Size = New System.Drawing.Size(80, 24)
            Me.btnClearAll.TabIndex = 6
            Me.btnClearAll.Text = "清  空"
            '
            'btnOK
            '
            Me.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.Flat
            Me.btnOK.ForeColor = System.Drawing.Color.Navy
            Me.btnOK.Location = New System.Drawing.Point(512, 392)
            Me.btnOK.Name = "btnOK"
            Me.btnOK.Size = New System.Drawing.Size(80, 24)
            Me.btnOK.TabIndex = 7
            Me.btnOK.Text = "确  定"
            '
            'frmMenuManager
            '
            Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
            Me.ClientSize = New System.Drawing.Size(602, 424)
            Me.Controls.Add(Me.btnOK)
            Me.Controls.Add(Me.btnClearAll)
            Me.Controls.Add(Me.btnUpdate)
            Me.Controls.Add(Me.gpMenu)
            Me.Controls.Add(Me.btnDelete)
            Me.Controls.Add(Me.btnAdd)
            Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
            Me.MaximizeBox = False
            Me.Name = "frmMenuManager"
            Me.Text = "菜谱管理"
            Me.gpMenu.ResumeLayout(False)
            Me.gpMenuTree.ResumeLayout(False)
            Me.gpMenuInfo.ResumeLayout(False)
            CType(Me.nmdMenuDiscount, System.ComponentModel.ISupportInitialize).EndInit()
            Me.ResumeLayout(False)

        End Sub

#End Region

        Private Sub frmMenuManager_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            InitialMenuTree()
        End Sub

        Private Sub InitialMenuTree()
            MenuTree.Nodes.Clear()
            MenuTree.Nodes.Add("菜谱管理")
            MenuTree.TopNode.Tag = "Roots"
            sqlstr = "SELECT DISTINCT Menu_style FROM MenuInfo ORDER BY Menu_style DESC "
            myDS = New DataSet
            myDS.Clear()
            myDS = AccessToDatabase.GetDataFromDB(sqlstr)
            If Not myDS Is Nothing Then
                Count = myDS.Tables(0).Rows.Count
                If Count >= 1 Then
                    For Index = 0 To Count - 1
                        MenuTree.TopNode.Nodes.Add(myDS.Tables(0).Rows(Index).Item("Menu_style"))
                        MenuTree.TopNode.Nodes(Index).Tag = "Branches"
                        Dim tempDS As New DataSet
                        tempDS.Clear()
                        sqlstr = "SELECT Menu_id,Menu_name FROM MenuInfo WHERE Menu_style='" & CStr(myDS.Tables(0).Rows(Index)("Menu_style")).Trim & "'"
                        tempDS = AccessToDatabase.GetDataFromDB(sqlstr)
                        If Not tempDS Is Nothing Then
                            sCount = tempDS.Tables(0).Rows.Count
                            If sCount >= 1 Then
                                For sIndex = 0 To sCount - 1
                                    MenuTree.TopNode.Nodes(Index).Nodes.Add(CStr(tempDS.Tables(0).Rows(sIndex).Item("Menu_name")).Trim)
                                    MenuTree.TopNode.Nodes(Index).Nodes(sIndex).Tag = tempDS.Tables(0).Rows(sIndex).Item("Menu_id")
                                Next
                            End If
                        End If
                    Next
                End If
            End If
            MenuTree.ExpandAll()
        End Sub

⌨️ 快捷键说明

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