Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void Buy_product_button_Click(object sender, EventArgs e)
- {
- Product selectedProduct = listBox5.SelectedItem as Product;
- using (ISession session = SessionFactory.OpenSession())
- using (ITransaction transaction = session.BeginTransaction())
- {
- selectedProduct.ActualBuyer = Convert.ToInt32(textBox2.Text);
- session.SaveOrUpdate(selectedProduct);
- transaction.Commit();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement