예제 #1
0
파일: Menu.cs 프로젝트: Tlamir/Book_Store
        private void btnCart_Click(object sender, EventArgs e)
        {
            ShopCart myform = new ShopCart(username);

            myform.Show();
            this.Hide();
        }
예제 #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();
            }
        }
예제 #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");
     }
 }