public ActionResult Edit(int id, social handle) { try { using (var db = new SDES_DirectoryEntities()) { db.Entry(handle).State = EntityState.Modified; db.SaveChanges(); } return RedirectToAction("Details", "office", new { id = handle.officeId }); } catch { return View(); } }
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 Delete(int id, office office) { try { using (var db = new SDES_DirectoryEntities()) { var office1 = db.offices.Find(id); db.Entry(office1).State = EntityState.Deleted; db.SaveChanges(); return RedirectToAction("Index"); } } catch { return View(office); } }
public ActionResult Delete(int id, social handles) { try { using (var db = new SDES_DirectoryEntities()) { var handle = db.socials.Find(id); db.Entry(handle).State = EntityState.Deleted; db.SaveChanges(); return RedirectToAction("Details", "office", new { id = handle.officeId }); } } catch { return View(); } }
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); } }
public ActionResult Delete(int id, otherLocation location) { try { using (var db = new SDES_DirectoryEntities()) { var specific = db.otherLocations.Find(id); db.Entry(specific).State = EntityState.Deleted; db.SaveChanges(); } return RedirectToAction("Index"); } catch { return View(location); } }
public ActionResult Delete(int id, group deletion) { try { using (var db = new SDES_DirectoryEntities()) { var group = db.groups.Find(id); db.Entry(group).State = EntityState.Deleted; db.SaveChanges(); } return RedirectToAction("Index"); } catch { return View(); } }
public ActionResult Delete(int id, website site) { try { using (var db = new SDES_DirectoryEntities()) { var website = db.websites.Find(id); db.Entry(website).State = EntityState.Deleted; db.SaveChanges(); } return RedirectToAction("Index"); } catch { return View(); } }
public ActionResult Edit(int id, otherLocation location) { try { using (var db = new SDES_DirectoryEntities()) { db.Entry(location).State = EntityState.Modified; db.SaveChanges(); } return RedirectToAction("Index"); } catch { return View(location); } }
public ActionResult Edit(int id, office office) { try { using (var db = new SDES_DirectoryEntities()) { db.Entry(office).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } } catch { return View(); } }
public ActionResult DeleteFromOffice(int id, website website) { try { using (var db = new SDES_DirectoryEntities()) { var site = db.websites.Find(id); db.Entry(site).State = EntityState.Deleted; db.SaveChanges(); return RedirectToAction("Details", "office", new { id = site.officeId }); } } catch { return View(); } }