Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ThursdayBars thursdayBars = db.ThursdayBars.Find(id);

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

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