void InitialiserServices(ServiceAdherents adherents, ServiceOuvrages ouvrages, ServicePrets prets, ServiceExemplaires exemplaires) { serviceExemplaires = exemplaires; serviceAdherents = adherents; serviceOuvrages = ouvrages; servicePrets = prets; }
public FenetreModifierAdherent(ServiceAdherents serviceAdherents, Adherent adherent) { InitializeComponent(); _ServiceAdherents = serviceAdherents; _Adherent = adherent; tbx_Nom.Text = adherent.Nom; }
public Fenetre(ServiceAdherents adherents, ServiceOuvrages ouvrages, ServicePrets prets, ServiceExemplaires exemplaires) { InitializeComponent(); InitialiserServices(adherents, ouvrages, prets, exemplaires); Actualiser(); }
public void SetUp() { sessionFactory = ORM <Adherent> .CreateSessionFactory(true); dataAccess = new DataAccess(sessionFactory); servicePrets = new ServicePrets(dataAccess); serviceAdherents = new ServiceAdherents(dataAccess); serviceOuvrages = new ServiceOuvrages(dataAccess); serviceExemplaires = new ServiceExemplaires(dataAccess); CreateFixtures(); PopulateDatabase(); }
public FenetreForm_Adherent(ServiceAdherents serviceAdherents, List <Adherent> adherents, string titre, Adherent adherent = null) { InitializeComponent(); this.serviceAdherents = serviceAdherents; this.adherents = adherents; if (adherent != null) { this.adherent = adherents.Find(a => a.Id == adherent.Id); } label_title.Text = titre; btn.Text = titre; if (this.adherent != null) { textBox_nom.Text = adherent.Nom; } }
static void Main() { // initialiser la couche de persistance ISessionFactory sessionFactory = ORM <Adherent> .CreateSessionFactory(); IDataAccess dataAccess = new DataAccess(sessionFactory); // initialiser la couche applicative ServiceExemplaires serviceExemplaires = new ServiceExemplaires(dataAccess); ServiceAdherents serviceAdherents = new ServiceAdherents(dataAccess); ServiceOuvrages serviceOuvrages = new ServiceOuvrages(dataAccess); ServicePrets servicePrets = new ServicePrets(dataAccess); // initializer la couche de presentation Fenetre vue = new Fenetre(serviceAdherents, serviceOuvrages, servicePrets, serviceExemplaires); // demarrer le logiciel Application.EnableVisualStyles(); Application.Run(vue); // liberer les ressources dataAccess.Dispose(); sessionFactory.Dispose(); }
public FenetreAjouterAdherent(ServiceAdherents serviceAdherents) { InitializeComponent(); _ServiceAdherents = serviceAdherents; }