Beispiel #1
0
        public ActionResult Index()
        {
            var fuels = GetFuels();
            var model = new Samochod();
            model.Paliwa = GetSelectListItems(fuels);

            return View(model);
        }
Beispiel #2
0
        public ActionResult Index(Samochod model)
        {
            var fuels = GetFuels();
            model.Paliwa = GetSelectListItems(fuels);
            if (ModelState.IsValid)
            {
                Session["Samochod"] = model;
                return RedirectToAction("Result");
            }

            return View("Index", model);
        }