示例#1
0
        private void Confirm_click(object sender, RoutedEventArgs e)
        {
            if (DBManager.CCN == "" || DBManager.CCV == "")
            {
                MessageBox.Show("Please fill CCN and CVV Details");
                return;
            }
            string Carorpart   = carpartornot.Text;
            string id          = ProductID.Text;
            string quantity    = Quantity.Text;
            string orderid     = Orderid.Text;
            string total_price = Total_Price.Text;
            string name        = Name.Text;

            if (DBManager.confirm)
            {
                if (DBManager.Check(total_price))
                {
                    MessageBox.Show("you can buy it :)");
                    DBManager.UpdateProducts(id, Carorpart, quantity);
                    DBManager.AddtoPayment(orderid, name);
                    DBManager.IsConfirmed(orderid);
                    GlobalGrids.updateviewitems();
                }
                else
                {
                    MessageBox.Show("you can't buy it :(");
                }
            }
            else
            {
                MessageBox.Show("Sorry, Can't confirm. Make sure you wrote Your CCN and CVV Correctly. ");
            }
        }
示例#2
0
        private void remove_click(object sender, RoutedEventArgs e)
        {
            string Carorpart = carpartornot.Text;
            string id        = ProductID.Text;

            DBManager.removeFromCart(id, Carorpart);
            GlobalGrids.updateviewitems();
        }