Cycle de progression Faire (quelque chose qui marche) -> comprendre ce que l’on fait/comment cela marche -> pousser plus loin les notions
| private void button2_Click(object sender, EventArgs e) { ContactsHib.ContactDAO c = new ContactsHib.ContactDAO(); System.Collections.IList List = c.MonCritere(Convert.ToInt32(comboBox1.Text)); dataGridView1.DataSource = List; } |
| public IList MonCritere(int ContactCategoryID) { ISession session = factory.OpenSession(); IList List = session.CreateCriteria(typeof(ContactEntity)) .Add(NHibernate.Expression.Expression.Eq("ContactCategoryID", ContactCategoryID)) .AddOrder(Order.Desc("ContactName")) .List(); return List; } |