Exemplo n.º 1
0
        // GET: Platforma
        public ActionResult Platforma()
        {
            {
                DataKnihovna.DAO.PlatformaDao        platformaDao = new DataKnihovna.DAO.PlatformaDao();
                IList <DataKnihovna.Model.Platforma> platformy    = platformaDao.GetlAll();

                return(View(platformy));
            }
        }
Exemplo n.º 2
0
 public ActionResult Add(Platforma platforma)
 {
     DataKnihovna.DAO.PlatformaDao platformaDao = new DataKnihovna.DAO.PlatformaDao();
     platforma.Pocet = 0;
     if (ModelState.IsValid)
     {
         platformaDao.Create(platforma);
         return(RedirectToAction("Platforma"));
     }
     else
     {
         return(View("NovaPlatforma", platforma));
     }
 }