急!!用VB编写一个点餐程序 30
州市有一家馄饨店,店老板请您为前台服务人员开发一个应用程序。利用该程序,服务人员方便地为客人点各种食物,如馄饨、面食、饮料等,并快捷地计算出客人应交金额。程序设计界面如下...
州市有一家馄饨店,店老板请您为前台服务人员开发一个应用程序。利用该程序,服务人员方便地为客人点各种食物,如馄饨、面食、饮料等,并快捷地计算出客人应交金额。程序设计界面如下: 点餐完,点击“下单”按钮,跳到“结账”选项卡,运行效果如下
跪求源码,急 展开
跪求源码,急 展开
2个回答
展开全部
Public Class Form1
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles qk.Click
ListBox1.Items.Clear()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer
For i = 1 To NumericUpDown1.Value
ListBox1.Items.Add(hd.Text)
Next
For i = 1 To NumericUpDown2.Value
ListBox1.Items.Add(md.Text)
Next
For i = 1 To NumericUpDown3.Value
ListBox1.Items.Add(ComboBox3.Text)
Next
TabControl1.SelectedIndex = 1
End Sub
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles xd.Click
TabControl1.SelectedIndex = 0
hd.Text = ""
md.Text = ""
ComboBox3.Text = ""
NumericUpDown1.Value = 0
NumericUpDown2.Value = 0
NumericUpDown3.Value = 0
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles jz.Click
Dim i As Integer
Dim a, b As Integer
For i = 0 To ListBox1.Items.Count - 1
a = Mid(ListBox1.Items(i), Len(ListBox1.Items(i)) - 1, 3)
b = b + a
Next
MsgBox("请您付账" & b & "!", MsgBoxStyle.Information)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles sc.Click
If ListBox1.SelectedIndex >= 0 Then
ListBox1.Items.RemoveAt(ListBox1.SelectedIndex)
Else
MsgBox("没有选中的菜单")
End If
End Sub
Private Sub TabPage1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabPage1.Click
End Sub
Private Sub hd_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hd.SelectedIndexChanged
End Sub
End Class
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles qk.Click
ListBox1.Items.Clear()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer
For i = 1 To NumericUpDown1.Value
ListBox1.Items.Add(hd.Text)
Next
For i = 1 To NumericUpDown2.Value
ListBox1.Items.Add(md.Text)
Next
For i = 1 To NumericUpDown3.Value
ListBox1.Items.Add(ComboBox3.Text)
Next
TabControl1.SelectedIndex = 1
End Sub
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles xd.Click
TabControl1.SelectedIndex = 0
hd.Text = ""
md.Text = ""
ComboBox3.Text = ""
NumericUpDown1.Value = 0
NumericUpDown2.Value = 0
NumericUpDown3.Value = 0
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles jz.Click
Dim i As Integer
Dim a, b As Integer
For i = 0 To ListBox1.Items.Count - 1
a = Mid(ListBox1.Items(i), Len(ListBox1.Items(i)) - 1, 3)
b = b + a
Next
MsgBox("请您付账" & b & "!", MsgBoxStyle.Information)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles sc.Click
If ListBox1.SelectedIndex >= 0 Then
ListBox1.Items.RemoveAt(ListBox1.SelectedIndex)
Else
MsgBox("没有选中的菜单")
End If
End Sub
Private Sub TabPage1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabPage1.Click
End Sub
Private Sub hd_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hd.SelectedIndexChanged
End Sub
End Class
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询