public ActionResult DeleteConfirmed(DateTime id) { restaurant_daily_reports restaurant_daily_reports = db.restaurant_daily_reports.Find(id); db.restaurant_daily_reports.Remove(restaurant_daily_reports); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "report_date,restaurant_id,gross_income,patrons_served")] restaurant_daily_reports restaurant_daily_reports) { if (ModelState.IsValid) { db.Entry(restaurant_daily_reports).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.restaurant_id = new SelectList(db.restaurants, "restaurant_id", "restaurant_name", restaurant_daily_reports.restaurant_id); return(View(restaurant_daily_reports)); }
// GET: RestaurantReportAdmin/Details/5 public ActionResult Details(DateTime id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } restaurant_daily_reports restaurant_daily_reports = db.restaurant_daily_reports.Find(id); if (restaurant_daily_reports == null) { return(HttpNotFound()); } return(View(restaurant_daily_reports)); }
// GET: RestaurantReportAdmin/Edit/5 public ActionResult Edit(DateTime id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } restaurant_daily_reports restaurant_daily_reports = db.restaurant_daily_reports.Find(id); if (restaurant_daily_reports == null) { return(HttpNotFound()); } ViewBag.restaurant_id = new SelectList(db.restaurants, "restaurant_id", "restaurant_name", restaurant_daily_reports.restaurant_id); return(View(restaurant_daily_reports)); }