Beispiel #1
0
        private void Ctrl_OnPaymentComplete(object sender, OrderArgs args)
        {
            string msg = "Table " + args.seatIdx + " Payment completed";

            MessageBox.Show(msg);
            OrderControl.Visibility = Visibility.Hidden;
            lvSeat.Visibility       = Visibility.Visible;
            UpdateSeat();
        }
Beispiel #2
0
        private void OrderBtn_Click(object sender, RoutedEventArgs e)
        {
            if (CheckFoodEmpty())
            {
                return;
            }

            InsertSeatData();

            OrderArgs args = new OrderArgs();

            args.seatIdx = seat.Idx;

            if (OnOrderComplete != null)
            {
                OnOrderComplete(this, args);
            }
        }
Beispiel #3
0
        private void PaymentEvent()
        {
            /*if (App.client.IsConnected)
             * {
             *  App.client.SendMessage("@2207#" + seat.TotalPrice.ToString());
             * }
             * else
             * {
             *  MessageBoxResult result = MessageBox.Show("서버가 연결되지 않았습니다. 다시 연결할까요? ", "Reload", MessageBoxButton.YesNo);
             *  switch (result)
             *  {
             *      case MessageBoxResult.Yes:
             *          App.client.ConnectServer();
             *          if(App.client.IsConnected)
             *              App.client.SendMessage("@2207");
             *        break;
             *      case MessageBoxResult.No:
             *          //this.Visibility = Visibility.Collapsed;
             *          return;
             *  }
             * }*/
            App.client.SendMessage("@2207#" + seat.TotalPrice.ToString());


            InsertStatisticsData();
            UpdateFoodDataTotalPrice();
            FindFoodRatio();
            DeleteSeatData();

            OrderArgs args = new OrderArgs();

            args.seatIdx = seat.Idx;

            if (OnPaymentComplete != null)
            {
                OnPaymentComplete(this, args);
            }
        }