public ActionResult Delete(int id, staff memberpost)
 {
     try
     {
         using (var db = new SDES_DirectoryEntities())
         {
             var member = db.staffs.Find(id);
             db.Entry(member).State = EntityState.Deleted;
             db.SaveChanges();
             return RedirectToAction("Details", "office", new { id = member.officeId });
         }
     }
     catch
     {
         return View();
     }
 }
        public ActionResult Edit(int id, staff member)
        {
            try
            {
                using (var db = new SDES_DirectoryEntities())
                {
                    db.Entry(member).State = EntityState.Modified;
                    db.SaveChanges();
                }

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

                return RedirectToAction("Details", "office", new { id = member.officeId });
            }
            catch
            {
                return View();
            }
        }