public ActionResult Index() { ApercuViewModel model; try { ConnectionSQL csql = new ConnectionSQL(); LigneHistorique data = csql.DerniereEntreeHistorique(); Profil profil = gp.Selectionner(data.Id_profil) ?? new Profil(); Reglage reglage = profil.SelectionnerReglage(data.Id_reglage) ?? new Reglage(); model = new ApercuViewModel(gpa, data, reglage); } catch (Exception ex) { ModelState.AddModelError("", "Erreur : " + ex.Message); model = new ApercuViewModel(); } return View(model); }
public ConnectionProfil() { connection = new ConnectionSQL(); }
public ConnectionReglage() { connection = new ConnectionSQL(); }