Beispiel #1
0
        private void btnCart_Click(object sender, EventArgs e)
        {
            ShopCart myform = new ShopCart(username);

            myform.Show();
            this.Hide();
        }
Beispiel #2
0
        private void btnCancel_Click(object sender, EventArgs e)
        {
            DialogResult dialogResult = MessageBox.Show("Are u Really Want To Cancel Your Order ?", "Cancel Order", MessageBoxButtons.YesNo);

            if (dialogResult == DialogResult.Yes)
            {
                OnlineBookStore.Menu.itemsOnCart.Clear();
                ShopCart myform = new ShopCart(username);
                myform.Show();
                this.Hide();
            }
        }
Beispiel #3
0
 private void btnRemove_Click(object sender, EventArgs e)
 {
     if (listwiewCart.SelectedIndices.Count > 0)
     {
         int selectedIndex = listwiewCart.SelectedIndices[0];
         OnlineBookStore.Menu.itemsOnCart.RemoveAt(selectedIndex);
         ShopCart myform = new ShopCart(username);
         myform.Show();
         this.Hide();
     }
     else
     {
         MessageBox.Show("Please Select An Item To Remove");
     }
 }