Beispiel #1
0
        private void _buyBTN_Click(object sender, EventArgs e)
        {
            if (userId < 0)
            {
                MessageBox.Show("Сначала авторизуйтесь");
                return;
            }
            Button       btn     = sender as Button;
            var          list    = mongodb.GetCollection <Films>("films");
            var          filter  = new BsonDocument("_id", ObjectId.Parse(btn.Tag.ToString()));
            List <Films> mylist  = list.Find(filter).ToList();
            BuyFilm      buyFilm = new BuyFilm(userId.ToString(), btn.Tag.ToString(), mylist.ElementAt(0).price);

            buyFilm.ShowDialog();
        }
Beispiel #2
0
        private void _buyBTN_Click(object sender, EventArgs e)
        {
            BuyFilm buyFilm = new BuyFilm(userId.ToString(), filmId, filmInfo.price);

            buyFilm.ShowDialog();
        }