Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            FridayBars fridayBars = db.FridayBars.Find(id);

            db.FridayBars.Remove(fridayBars);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "BarsID,BarName,Specials,DaytimeBusyness,EveningBusyness,NightTimeBusyness,AdditionalFeatures")] FridayBars fridayBars)
 {
     if (ModelState.IsValid)
     {
         db.Entry(fridayBars).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(fridayBars));
 }
Esempio n. 3
0
        // GET: Friday/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            FridayBars fridayBars = db.FridayBars.Find(id);

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