Example #1
0
        public ActionResult Param(SimuParam simuParam)
        {
            if (simuParam.MinMensualite >= simuParam.MaxMensualite)
            {
                return(RedirectToAction("Index"));
            }

            if (simuParam.MinDuree >= simuParam.MaxDuree)
            {
                return(RedirectToAction("Index"));
            }

            if (simuParam.MinTaux >= simuParam.MaxTaux)
            {
                return(RedirectToAction("Index"));
            }

            if (simuParam.MinApport >= simuParam.MaxApport)
            {
                return(RedirectToAction("Index"));
            }

            SessionManager.MinMensualite = simuParam.MinMensualite;
            SessionManager.MaxMensualite = simuParam.MaxMensualite;
            SessionManager.MinDuree      = simuParam.MinDuree;
            SessionManager.MaxDuree      = simuParam.MaxDuree;
            SessionManager.MinTaux       = simuParam.MinTaux;
            SessionManager.MaxTaux       = simuParam.MaxTaux;
            SessionManager.MinApport     = simuParam.MinApport;
            SessionManager.MaxApport     = simuParam.MaxApport;
            SessionManager.InitEmprunt();

            return(RedirectToAction("Immo")); //TODO : Conso
        }
Example #2
0
        //public ActionResult Test()
        //{
        //    var infos = new SimuInfos();
        //    return View(infos);
        //}

        public ActionResult Param()
        {
            var infos = new SimuParam()
            {
                MinMensualite = SessionManager.MinMensualite,
                MaxMensualite = SessionManager.MaxMensualite,
                MinDuree      = SessionManager.MinDuree,
                MaxDuree      = SessionManager.MaxDuree,
                MinTaux       = SessionManager.MinTaux,
                MaxTaux       = SessionManager.MaxTaux,
                MinApport     = SessionManager.MinApport,
                MaxApport     = SessionManager.MaxApport
            };

            return(View(infos));
        }