public ActionResult Edit(int id, hour day)
        {
            try
            {
                using (var db = new SDES_DirectoryEntities())
                {
                    db.Entry(day).State = EntityState.Modified;
                    db.SaveChanges();
                }

                return RedirectToAction("Details", "office", new { id = day.officeId });
            }
            catch
            {
                return View(day);
            }
        }
        public ActionResult Create(int officeId, hour day)
        {
            try
            {
                using(var db = new SDES_DirectoryEntities())
                {
                    db.hours.Add(day);
                    db.SaveChanges();
                }

                return RedirectToAction("Details", "office", new { id = officeId });
            }
            catch
            {
                return View(day);
            }
        }
 public ActionResult Delete(int id, hour day)
 {
     try
     {
         using (var db = new SDES_DirectoryEntities())
         {
             var hours = db.hours.Find(id);
             db.Entry(hours).State = EntityState.Deleted;
             db.SaveChanges();
             return RedirectToAction("Details", "office", new { id = hours.officeId });
         }
     }
     catch
     {
         return View(day);
     }
 }
 //
 // GET: /admin/hours/Create
 public ActionResult Create(int id)
 {
     var hour = new hour {officeId = id};
     return View(hour);
 }