Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            rptBooking rptBooking = db.rptBooking.Find(id);

            db.rptBooking.Remove(rptBooking);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
        // GET: BookingReport/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            rptBooking rptBooking = db.rptBooking.FirstOrDefault(a => a.id == id);

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