Exemple #1
0
        private void btn_take_away_Click(object sender, EventArgs e)
        {
            SessionData.SetSeviceCharge(0);
            SessionData.SetTabelDetails("TAKEAWAY");
            if (SessionData.cartTotal > 1)
            {
                Form_Pay frmpay = new Form_Pay();
                frmpay.ShowDialog();

                if (paymentDone)
                {
                    createOrder(2);
                    gridviewDataIntoDb();
                    updateOrder();

                    // if (SessionData.paymentType.Equals(1))
                    // {
                    //save card details
                    saveCardDetails();
                    List <Receipt> order;
                    order = LoadReceiptData();
                    SessionData.setBillamount();



                    Billprint bill = new Billprint(order, cash, SessionData.lastbillamout, SessionData.tabel, balance);
                    //  bill.print("CASHIER");
                    bill.print(bilprinter);
                    order.Clear();
                    // }
                    resetAll();
                }
            }
        }
Exemple #2
0
        private void btn_pay_Click(object sender, EventArgs e)
        {
            Form_Pay frmpay = new Form_Pay();

            frmpay.ShowDialog();

            if (paymentDone)
            {
                if (SessionData.paymentType.Equals(1))
                {
                    //save card details
                    saveCardDetails();
                    updateOrder();
                    //Set Receipt data
                    List <Receipt> order;
                    order = LoadReceiptData();
                    SessionData.setBillamount();

                    Billprint bill = new Billprint(order, cash, SessionData.lastbillamout, SessionData.tabel, balance);
                    // bill.print("CASHIER");
                    bill.print(bilprinter);
                    bill = null;
                    order.Clear();
                }
                else
                {
                    //cash payment
                    updateOrder();
                    //Set Receipt data
                    List <Receipt> order;
                    order = LoadReceiptData();
                    SessionData.setBillamount();

                    Billprint bill = new Billprint(order, cash, SessionData.lastbillamout, SessionData.tabel, balance);
                    // bill.print("CASHIER");
                    bill.print(bilprinter);
                    bill = null;
                    order.Clear();
                }
                resetAll();

                btn_save.Visible      = false;
                btn_dine_in.Visible   = true;
                btn_take_away.Enabled = true;
                btn_pay.Enabled       = false;
            }
        }