public ActionResult Create() { HokejistaLigaDao hokejistaLigaDao = new HokejistaLigaDao(); HokejistaPostDao hokejistaPostDao = new HokejistaPostDao(); IList <HokejistaLiga> ligy = hokejistaLigaDao.GetAll(); IList <HokejistaPost> posty = hokejistaPostDao.GetAll(); ViewBag.Ligy = ligy; ViewBag.Posty = posty; return(View()); }
public ActionResult EditTrener(int id) { HokejistaDao hokejistaDao = new HokejistaDao(); HokejistaLigaDao hokejistaLigaDao = new HokejistaLigaDao(); HokejistaPostDao hokejistaPostDao = new HokejistaPostDao(); Hokejista h = hokejistaDao.GetById(id); ViewBag.Ligy = hokejistaLigaDao.GetAll(); ViewBag.Posty = hokejistaPostDao.GetAll(); return(View(h)); }