public static void Delete(RapportSommaire rapportSommaire) { using (var transaction = session.BeginTransaction()) { session.Delete(rapportSommaire); transaction.Commit(); } }
public void InsertRapportSommaire() { RapportSommaire RS = new RapportSommaire(); List <Facture> lstFacture = new List <Facture>(HibernateFactureService.RetrieveBetweenDates(cldDateDebut.SelectedDate.Value, cldDateFin.SelectedDate.Value)); RS.Date = DateTime.Now; HibernateRapportSommaire.Create(RS); RS.LstRapportFacture = RapportController.ConstruireRapportFacture(lstFacture, RS); RapportController.InsertRapportFacture(RS.LstRapportFacture.ToList()); RapportController.LstRapport.Add(RS); }