Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            SaturdayBars saturdayBars = db.SaturdayBars.Find(id);

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

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