Пример #1
0
        private void btnPay_Click(object sender, EventArgs e)
        {
            List <string> order = lstVw_cartSummary.Items.Cast <ListViewItem>()
                                  .Select(item => item.Text).ToList();

            foreach (string s in order)
            {
                if (!s.Contains('+'))
                {
                    orderController.ProcessOrder(s);
                }
            }

            orderController.createNewOrder();
            refreshCartSummary();
            categoryBtnBox.Visible = true;
            foreach (Control con in pnl_summary.Controls)
            {
                con.Visible = true;
            }
            pnl_payment.Visible      = false;
            pnl_summary.Location     = new Point(categoryBtnBox.Location.X + categoryBtnBox.Width, categoryBtnBox.Location.Y);
            lstVw_cartSummary.Height = TABLE_Y;
            lstVw_cartSummary.Width  = TABLE_X;
        }
Пример #2
0
        private void btnPay_Click(object sender, EventArgs e)
        {
            if (ConfirmCard())
            {
                List <string> order = lstVw_cartSummary.Items.Cast <ListViewItem>()
                                      .Select(item => item.Text).ToList();
                foreach (string s in order)
                {
                    if (!s.Contains('+'))
                    {
                        orderController.ProcessOrder(s);
                    }
                }

                OrderController.SaveOrder(orderController.getCurrentOrder());

                orderController.createNewOrder();
                refreshCartSummary();
                categoryBtnBox.Visible = true;
                foreach (Control con in pnl_summary.Controls)
                {
                    con.Visible = true;
                }
                pnl_payment.Visible  = false;
                pnl_summary.Location = new Point(categoryBtnBox.Location.X + categoryBtnBox.Width, categoryBtnBox.Location.Y);



                lstVw_cartSummary.Width    = (int)(this.Width * .30);
                lstVw_cartSummary.Height   = (int)(this.Height * .60) - CORRECTION * 3;
                lstVw_cartSummary.Location = new Point(0, btn_ArrowUp.Height + btn_ArrowUp.Location.Y + CORRECTION);
                btn_checkout.Visible       = true;
                updateSubTotal(0.0f);
                ClearCard();
            }
        }