private void btnIncrease_Click(object sender, EventArgs e) { if (this.ButtonClick != null) { var parent = this.Parent.Parent as ViewCart; tblGame game = dao.FindGame(detail.gameID); if (parent.cart.cart[detail.gameID].numOfgame < game.gameQuantity) { parent.cart.addToCart(detail); lblQuanity.Text = parent.cart.cart[detail.gameID].numOfgame.ToString(); this.ButtonClick(this, e); } else { MessageBox.Show("Out of stock"); } } }