public ActionResult Index() { VelicinyManager velicinyManager = new VelicinyManager(); ViewBag.stav = velicinyManager.VratVelicinyList(velicinyManager); return(View(velicinyManager)); }
// GET: Vkladani public ActionResult Velicina(Veliciny veliciny) { ViewBag.stav = veliciny.Stav; if (ModelState.IsValid) { veliciny.PridatDoDatabaze(); } VelicinyManager velicinyManager = new VelicinyManager(); ViewBag.VelicinyList = velicinyManager.VratVelicinyList(velicinyManager); velicinyManager.VelicinyList.Add(new Veliciny(1, "nol", "m", "kk")); return(View(veliciny)); }