📄 frmmenumanager.vb
字号:
Imports System
Imports System.IO
Imports System.Data
Imports System.Drawing
Imports System.Data.SqlClient
Imports System.ComponentModel
Namespace HZC.DinningService
Public Class frmMenuManager
Inherits System.Windows.Forms.Form
Private myDS As DataSet = Nothing
Private sqlstr As String = String.Empty
Private Index, Count As Integer
Private sIndex, sCount As Integer
Private mFileName As String = String.Empty
#Region " Windows 窗体设计器生成的代码 "
Public Sub New()
MyBase.New()
'该调用是 Windows 窗体设计器所必需的。
InitializeComponent()
'在 InitializeComponent() 调用之后添加任何初始化
End Sub
'窗体重写处置以清理组件列表。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Windows 窗体设计器所必需的
Private components As System.ComponentModel.IContainer
'注意:以下过程是 Windows 窗体设计器所必需的
'可以使用 Windows 窗体设计器修改此过程。
'不要使用代码编辑器修改它。
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents gpMenu As System.Windows.Forms.GroupBox
Friend WithEvents gpSeparate As System.Windows.Forms.GroupBox
Friend WithEvents MenuTree As System.Windows.Forms.TreeView
Friend WithEvents MenuPicture As System.Windows.Forms.PictureBox
Friend WithEvents btnAdd As System.Windows.Forms.Button
Friend WithEvents btnDelete As System.Windows.Forms.Button
Friend WithEvents btnUpdate As System.Windows.Forms.Button
Friend WithEvents btnBrowser As System.Windows.Forms.Button
Friend WithEvents txtMenuDescription As System.Windows.Forms.TextBox
Friend WithEvents txtMenuMaterial As System.Windows.Forms.TextBox
Friend WithEvents nmdMenuDiscount As System.Windows.Forms.NumericUpDown
Friend WithEvents cmbMenuType As System.Windows.Forms.ComboBox
Friend WithEvents txtMenuFeature As System.Windows.Forms.TextBox
Friend WithEvents txtMenuPrice As System.Windows.Forms.TextBox
Friend WithEvents txtMenuName As System.Windows.Forms.TextBox
Friend WithEvents txtMenuID As System.Windows.Forms.TextBox
Friend WithEvents btnClearAll As System.Windows.Forms.Button
Friend WithEvents gpMenuInfo As System.Windows.Forms.GroupBox
Friend WithEvents gpMenuTree As System.Windows.Forms.GroupBox
Friend WithEvents btnOK As System.Windows.Forms.Button
Friend WithEvents Label8 As System.Windows.Forms.Label
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label10 As System.Windows.Forms.Label
Friend WithEvents Label9 As System.Windows.Forms.Label
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.btnAdd = New System.Windows.Forms.Button
Me.btnDelete = New System.Windows.Forms.Button
Me.gpMenu = New System.Windows.Forms.GroupBox
Me.gpMenuTree = New System.Windows.Forms.GroupBox
Me.MenuTree = New System.Windows.Forms.TreeView
Me.gpMenuInfo = New System.Windows.Forms.GroupBox
Me.txtMenuMaterial = New System.Windows.Forms.TextBox
Me.nmdMenuDiscount = New System.Windows.Forms.NumericUpDown
Me.cmbMenuType = New System.Windows.Forms.ComboBox
Me.Label8 = New System.Windows.Forms.Label
Me.Label7 = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.Label6 = New System.Windows.Forms.Label
Me.txtMenuFeature = New System.Windows.Forms.TextBox
Me.txtMenuPrice = New System.Windows.Forms.TextBox
Me.txtMenuName = New System.Windows.Forms.TextBox
Me.Label5 = New System.Windows.Forms.Label
Me.Label3 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.btnBrowser = New System.Windows.Forms.Button
Me.txtMenuID = New System.Windows.Forms.TextBox
Me.MenuPicture = New System.Windows.Forms.PictureBox
Me.Label1 = New System.Windows.Forms.Label
Me.gpSeparate = New System.Windows.Forms.GroupBox
Me.txtMenuDescription = New System.Windows.Forms.TextBox
Me.Label10 = New System.Windows.Forms.Label
Me.Label9 = New System.Windows.Forms.Label
Me.btnUpdate = New System.Windows.Forms.Button
Me.btnClearAll = New System.Windows.Forms.Button
Me.btnOK = New System.Windows.Forms.Button
Me.gpMenu.SuspendLayout()
Me.gpMenuTree.SuspendLayout()
Me.gpMenuInfo.SuspendLayout()
CType(Me.nmdMenuDiscount, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'btnAdd
'
Me.btnAdd.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnAdd.ForeColor = System.Drawing.Color.Navy
Me.btnAdd.Location = New System.Drawing.Point(248, 392)
Me.btnAdd.Name = "btnAdd"
Me.btnAdd.Size = New System.Drawing.Size(80, 24)
Me.btnAdd.TabIndex = 1
Me.btnAdd.Text = "添加菜谱"
'
'btnDelete
'
Me.btnDelete.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnDelete.ForeColor = System.Drawing.Color.Navy
Me.btnDelete.Location = New System.Drawing.Point(336, 392)
Me.btnDelete.Name = "btnDelete"
Me.btnDelete.Size = New System.Drawing.Size(80, 24)
Me.btnDelete.TabIndex = 2
Me.btnDelete.Text = "删除菜谱"
'
'gpMenu
'
Me.gpMenu.Controls.Add(Me.gpMenuTree)
Me.gpMenu.Controls.Add(Me.gpMenuInfo)
Me.gpMenu.Location = New System.Drawing.Point(8, 0)
Me.gpMenu.Name = "gpMenu"
Me.gpMenu.Size = New System.Drawing.Size(584, 384)
Me.gpMenu.TabIndex = 4
Me.gpMenu.TabStop = False
'
'gpMenuTree
'
Me.gpMenuTree.Controls.Add(Me.MenuTree)
Me.gpMenuTree.ForeColor = System.Drawing.Color.Navy
Me.gpMenuTree.Location = New System.Drawing.Point(8, 16)
Me.gpMenuTree.Name = "gpMenuTree"
Me.gpMenuTree.Size = New System.Drawing.Size(232, 360)
Me.gpMenuTree.TabIndex = 26
Me.gpMenuTree.TabStop = False
Me.gpMenuTree.Text = "菜谱目录"
'
'MenuTree
'
Me.MenuTree.BackColor = System.Drawing.Color.Cornsilk
Me.MenuTree.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.MenuTree.ImageIndex = -1
Me.MenuTree.Location = New System.Drawing.Point(8, 24)
Me.MenuTree.Name = "MenuTree"
Me.MenuTree.SelectedImageIndex = -1
Me.MenuTree.Size = New System.Drawing.Size(216, 328)
Me.MenuTree.TabIndex = 22
'
'gpMenuInfo
'
Me.gpMenuInfo.Controls.Add(Me.txtMenuMaterial)
Me.gpMenuInfo.Controls.Add(Me.nmdMenuDiscount)
Me.gpMenuInfo.Controls.Add(Me.cmbMenuType)
Me.gpMenuInfo.Controls.Add(Me.Label8)
Me.gpMenuInfo.Controls.Add(Me.Label7)
Me.gpMenuInfo.Controls.Add(Me.Label4)
Me.gpMenuInfo.Controls.Add(Me.Label6)
Me.gpMenuInfo.Controls.Add(Me.txtMenuFeature)
Me.gpMenuInfo.Controls.Add(Me.txtMenuPrice)
Me.gpMenuInfo.Controls.Add(Me.txtMenuName)
Me.gpMenuInfo.Controls.Add(Me.Label5)
Me.gpMenuInfo.Controls.Add(Me.Label3)
Me.gpMenuInfo.Controls.Add(Me.Label2)
Me.gpMenuInfo.Controls.Add(Me.btnBrowser)
Me.gpMenuInfo.Controls.Add(Me.txtMenuID)
Me.gpMenuInfo.Controls.Add(Me.MenuPicture)
Me.gpMenuInfo.Controls.Add(Me.Label1)
Me.gpMenuInfo.Controls.Add(Me.gpSeparate)
Me.gpMenuInfo.Controls.Add(Me.txtMenuDescription)
Me.gpMenuInfo.Controls.Add(Me.Label10)
Me.gpMenuInfo.Controls.Add(Me.Label9)
Me.gpMenuInfo.ForeColor = System.Drawing.Color.Navy
Me.gpMenuInfo.Location = New System.Drawing.Point(248, 16)
Me.gpMenuInfo.Name = "gpMenuInfo"
Me.gpMenuInfo.Size = New System.Drawing.Size(328, 360)
Me.gpMenuInfo.TabIndex = 25
Me.gpMenuInfo.TabStop = False
Me.gpMenuInfo.Text = "菜谱信息"
'
'txtMenuMaterial
'
Me.txtMenuMaterial.BackColor = System.Drawing.Color.Cornsilk
Me.txtMenuMaterial.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.txtMenuMaterial.Location = New System.Drawing.Point(80, 240)
Me.txtMenuMaterial.Multiline = True
Me.txtMenuMaterial.Name = "txtMenuMaterial"
Me.txtMenuMaterial.Size = New System.Drawing.Size(240, 48)
Me.txtMenuMaterial.TabIndex = 17
Me.txtMenuMaterial.Text = ""
'
'nmdMenuDiscount
'
Me.nmdMenuDiscount.BackColor = System.Drawing.Color.Cornsilk
Me.nmdMenuDiscount.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.nmdMenuDiscount.ForeColor = System.Drawing.Color.Navy
Me.nmdMenuDiscount.Location = New System.Drawing.Point(80, 208)
Me.nmdMenuDiscount.Name = "nmdMenuDiscount"
Me.nmdMenuDiscount.Size = New System.Drawing.Size(152, 21)
Me.nmdMenuDiscount.TabIndex = 16
Me.nmdMenuDiscount.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'cmbMenuType
'
Me.cmbMenuType.BackColor = System.Drawing.Color.Cornsilk
Me.cmbMenuType.Items.AddRange(New Object() {"特色菜", "精品热菜", "精品凉菜", "汤煲类", "茶酒饮料", "瓜果蔬菜", "主食类"})
Me.cmbMenuType.Location = New System.Drawing.Point(80, 107)
Me.cmbMenuType.Name = "cmbMenuType"
Me.cmbMenuType.Size = New System.Drawing.Size(152, 20)
Me.cmbMenuType.TabIndex = 15
'
'Label8
'
Me.Label8.Location = New System.Drawing.Point(16, 296)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(64, 20)
Me.Label8.TabIndex = 14
Me.Label8.Text = "其他描述"
Me.Label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'Label7
'
Me.Label7.Location = New System.Drawing.Point(16, 240)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(72, 20)
Me.Label7.TabIndex = 13
Me.Label7.Text = "主要原料"
Me.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'Label4
'
Me.Label4.Location = New System.Drawing.Point(16, 144)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(64, 21)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -