示例#1
0
        private void favoritesButton_Click(object sender, EventArgs e)
        {
            favorites fav = new favorites(userId);

            fav.Show();
            fav.Location = this.Location;
            this.Hide();
        }
示例#2
0
        private void buyButton_Click(object sender, EventArgs e)
        {
            favorites         f = (favorites)this.ParentForm;
            orderConfirmation o = new orderConfirmation(pId, uId);

            o.Location = f.Location;
            f.Hide();
            o.Show();
        }
示例#3
0
        private void removeFromCart_Click(object sender, EventArgs e)
        {
            connection.Open();
            SqlCommand deleteCart = new SqlCommand(removeItem, connection);

            deleteCart.Parameters.AddWithValue("@prod", pId);
            deleteCart.Parameters.AddWithValue("@user", uId);
            deleteCart.ExecuteNonQuery();
            connection.Close();

            favorites c = (favorites)this.ParentForm;

            this.Parent.Controls.Remove(this);
            c.createFavObjects();
        }