Пример #1
0
        private void label6_Click(object sender, EventArgs e)
        {
            DialogResult dialog = MessageBox.Show("Do you really want to make this purchase", "Purchase", MessageBoxButtons.YesNo);

            if (dialog == DialogResult.Yes)
            {
                dialog = MessageBox.Show("Do you want to pay for this purchase online", "Purchase", MessageBoxButtons.YesNo);

                if (dialog == DialogResult.Yes)
                {
                    frmOnlinePayment online = new frmOnlinePayment();
                    online.ShowDialog();
                }
                else if (dialog == DialogResult.No)
                {
                    MessageBox.Show("YOUR ORDER IS GETTING READY");

                    FrmReceipt receipt = new FrmReceipt();
                    receipt.Show();
                }
            }
            else if (dialog == DialogResult.No)
            {
                MessageBox.Show("world");
            }
        }
Пример #2
0
        private void lblPurchase_Click(object sender, EventArgs e)
        {
            DialogResult dialog = MessageBox.Show("Do you really want to make this purchase", "Purchase", MessageBoxButtons.YesNo);

            if (dialog == DialogResult.Yes)
            {
                dialog = MessageBox.Show("Do you want to pay for this purchase online", "Purchase", MessageBoxButtons.YesNo);

                if (dialog == DialogResult.Yes)
                {
                    frmOnlinePayment online = new frmOnlinePayment();
                    online.ShowDialog();
                }
                else if (dialog == DialogResult.No)
                {
                    MessageBox.Show("YOUR ORDER IS GETTING READY");

                    foreach (var tableName in table)
                    {
                        foreach (var itemname in itemName)
                        {
                            foreach (var quan in quantity)
                            {
                                data.editDatabase(tableName.ToString(), itemname.ToString(), int.Parse(quan.ToString()));
                            }
                        }
                    }


                    DateTime date = new DateTime();
                    date = DateTime.Now;


                    string order = "";
                    foreach (var item in item.items)
                    {
                        order = order + item + "\n";
                    }

                    //Console.WriteLine("{0}", order);


                    data.newOrder(user, order, total, date);


                    FrmReceipt receipt = new FrmReceipt();
                    this.Close();
                    receipt.Show();
                }
            }
            else if (dialog == DialogResult.No)
            {
                MessageBox.Show("world");
            }
        }
Пример #3
0
 private void lblConfirm_Click(object sender, EventArgs e)
 {
     if (!mtxtQuiskNumber.MaskFull)
     {
         mtxtQuiskNumber.Focus();
         MessageBox.Show("PLEASE ENTER YOUR Paypal NUMBER", "PHONE NUMBER", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
     else
     {
         FrmReceipt receipt = new FrmReceipt();
         receipt.Show();
     }
 }
Пример #4
0
        private void lblReceipts_Click(object sender, EventArgs e)
        {
            FrmReceipt receipt = new FrmReceipt();

            receipt.ShowDialog();
        }