I have a table:
I'm using NHibernate. The class of entity:
public class PurchasedItem
{
public virtual int Id { get; set; }
public virtual Product Product { get; set; }
public virtual int SortSale { get; set; }
}
I want to get all the records table PurchasedItems (my method returns an IList ). Records are sorted in descending order (column SortSale). How to fill WrapPanel buttons from the list IList ? For each button assign the event handler. By pressing the button display a message with the name of the product.