private void BtnPrintKitchen_Click(object sender, System.EventArgs e)
 {
     OrderService.OrderService service = new OrderService.OrderService();
     string result;
     WaitingForm.Show("Print to Kitchen");
     this.Enabled = false;
     if (!takeOutMode)
     {
         result = service.SendOrder(orderInfo, null);
         int orderID = 0;
         try
         {
             orderID = int.Parse(result);
             service.SetTableReference(orderID, tableIDList);
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.ToString());
             orderID = 0;
         }
     }
     else
         result = service.SendOrder(orderInfo, FieldCustName.Text);
     this.Enabled = true;
     WaitingForm.HideForm();
     try
     {
         orderInfo.OrderID = Int32.Parse(result);
     }
     catch (Exception)
     {
         MessageBox.Show(result);
         return;
     }
     ((MainForm)MdiParent).ShowMainMenuForm();
 }
예제 #2
0
 private void BtnPrintKitchen_Click(object sender, EventArgs e)
 {
     string str;
     smartRestaurant.OrderService.OrderService service = new smartRestaurant.OrderService.OrderService();
     WaitingForm.Show("Print to Kitchen");
     base.Enabled = false;
     if (!this.takeOutMode)
     {
         str = service.SendOrder(this.orderInfo, 0, null);
         int orderID = 0;
         try
         {
             orderID = int.Parse(str);
             service.SetTableReference(orderID, this.tableIDList);
         }
         catch (Exception exception)
         {
             MessageBox.Show(exception.ToString());
             orderID = 0;
         }
     }
     else
     {
         str = service.SendOrder(this.orderInfo, this.takeOutCustID, this.FieldCustName.Text);
     }
     base.Enabled = true;
     WaitingForm.HideForm();
     try
     {
         this.orderInfo.OrderID = int.Parse(str);
     }
     catch (Exception)
     {
         MessageBox.Show(str);
         return;
     }
     if (this.orderInfo.TableID > 0)
     {
         this.tabService.UpdateTableLockInuse(this.orderInfo.TableID, false);
     }
     ((MainForm) base.MdiParent).ShowMainMenuForm();
 }
 private void SaveBeforePrintReceipt()
 {
     OrderService.OrderService service = new OrderService.OrderService();
     string result;
     if (!takeOutMode)
     {
         result = service.SendOrderPrint(orderInfo, null, false);
         int orderID = 0;
         try
         {
             orderID = int.Parse(result);
             service.SetTableReference(orderID, tableIDList);
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.ToString());
             orderID = 0;
         }
     }
     else
         result = service.SendOrderPrint(orderInfo, FieldCustName.Text, false);
 }
예제 #4
0
 private void SaveBeforePrintReceipt()
 {
     string str;
     smartRestaurant.OrderService.OrderService service = new smartRestaurant.OrderService.OrderService();
     if (!this.takeOutMode)
     {
         str = service.SendOrderPrint(this.orderInfo, 0, null, false);
         int orderID = 0;
         try
         {
             orderID = int.Parse(str);
             service.SetTableReference(orderID, this.tableIDList);
         }
         catch (Exception exception)
         {
             MessageBox.Show(exception.ToString());
             orderID = 0;
         }
     }
     else
     {
         str = service.SendOrderPrint(this.orderInfo, this.takeOutCustID, this.FieldCustName.Text, false);
     }
 }