public ActionResult Create([Bind(Include = "IdSeminar,Naziv,Opis,Datum,Popunjen")] Seminar seminar)
 {
     if (ModelState.IsValid)
     {
         db.Seminars.Add(seminar);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(seminar));
 }
Ejemplo n.º 2
0
 public ActionResult Predbiljezba(Predbiljezba predbiljezba)
 {
     if (ModelState.IsValid)
     {
         db.Predbiljezbas.Add(predbiljezba);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(predbiljezba));
 }
Ejemplo n.º 3
0
        public ActionResult Edit(Predbiljezba predbiljezba)
        {
            if (ModelState.IsValid)
            {
                db.Entry(predbiljezba).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(predbiljezba));
        }