示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            InfoBilet infoBilet = db.InfoBilets.Find(id);

            db.InfoBilets.Remove(infoBilet);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "IDbilet,Korisnik,IDvraboten,Cena,Ime_film,Tehnologija,Datum,Vreme_pocnuvanje,Sala,Sediste,Red")] InfoBilet infoBilet)
 {
     if (ModelState.IsValid)
     {
         db.Entry(infoBilet).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(infoBilet));
 }
示例#3
0
        // GET: InfoBilets/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            InfoBilet infoBilet = db.InfoBilets.Find(id);

            if (infoBilet == null)
            {
                return(HttpNotFound());
            }
            return(View(infoBilet));
        }