Example #1
0
 /// <summary>
 /// Button:Add Item
 /// </summary>
 private void button1_Click(object sender, EventArgs e)
 {
     if (this.listBox1.SelectedIndex != -1)
     {
         RestaurantViewModel.Send(this.listBox1.SelectedItem.ToString(), "addItem", null);
         OrderingForm of = new OrderingForm(false);
         of.BindingGuestOrderId = Convert.ToInt32(this.listBox1.SelectedItem.ToString());
         of.ShowDialog(this);
     }
 }
Example #2
0
 /// <summary>
 /// Button:Make Payment
 /// </summary>
 private void button2_Click(object sender, EventArgs e)
 {
     if (this.listBox1.SelectedIndex != -1)
     {
         if (MessageBox.Show("Sure?", "Information", MessageBoxButtons.YesNo) == DialogResult.Yes)
         {
             MessageBox.Show("Please make payment at Casher.");
             this.button1.Enabled = false;
             RestaurantViewModel.Send(this.listBox1.SelectedItem.ToString(), "requestCheck", null);
         }
     }
 }