public ActionResult DeleteConfirmed(int id)
        {
            Open_hours open_hours = db.Open_hours.Find(id);

            db.Open_hours.Remove(open_hours);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "id,schedule,hours")] Open_hours open_hours)
 {
     if (ModelState.IsValid)
     {
         db.Entry(open_hours).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(open_hours));
 }
        public ActionResult Create([Bind(Include = "id,schedule,hours")] Open_hours open_hours)
        {
            if (ModelState.IsValid)
            {
                db.Open_hours.Add(open_hours);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(open_hours));
        }
        // GET: WebAdmin/Open_hours/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Open_hours open_hours = db.Open_hours.Find(id);

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