Advertisement
Guest User

Untitled

a guest
Nov 24th, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.51 KB | None | 0 0
  1. private void Buy_product_button_Click(object sender, EventArgs e)
  2.         {
  3.  
  4.             Product selectedProduct = listBox5.SelectedItem as Product;
  5.             using (ISession session = SessionFactory.OpenSession())
  6.             using (ITransaction transaction = session.BeginTransaction())
  7.             {
  8.                 selectedProduct.ActualBuyer = Convert.ToInt32(textBox2.Text);
  9.                 session.SaveOrUpdate(selectedProduct);
  10.                 transaction.Commit();
  11.             }
  12.  
  13.            
  14.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement