static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); IUtilisateurRepository utilisateurRepository = new UtilisateurRepository(); IAlbumRepository albumRepository = new AlbumRepository(); IAdministrateurRepository administrateurRepository = new AdministrateurRepository(); Program.formConnexion = new FormConnexion(utilisateurRepository, albumRepository, administrateurRepository); PresenterConnexion presenteurConnexion = new PresenterConnexion(albumRepository, utilisateurRepository, administrateurRepository, formConnexion); FormCreerCompte formCreerCompte = new FormCreerCompte(); Application.Run(formConnexion); }
public IActionResult Details(FormConnexion formConnexion) { AutolibContext context = HttpContext.RequestServices.GetService(typeof(AutolibContext)) as AutolibContext; Client unClient = context.getUnClient(Convert.ToInt32(formConnexion.idClient)); if (unClient != null && unClient.Password == CreateMD5(formConnexion.mdpClient)) { HttpContext.Session.SetString("idSession", unClient.IdClient.ToString()); return(View(unClient)); } else { return(RedirectToAction("Index")); } }