示例#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");
     }
 }