public ActionResult DeleteConfirmed(int id) { cOrganisation cOrganisation = db.Organisations.Find(id); db.Entities.Remove(cOrganisation); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,registeredName,tradingName,keyClient,organisationType,Address1,Address2,Address3")] cOrganisation cOrganisation) { if (ModelState.IsValid) { db.Entry(cOrganisation).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ID = new SelectList(db.CDD_Details, "ID", "CDDContact_Name", cOrganisation.ID); return(View(cOrganisation)); }
// GET: cOrganisation/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } cOrganisation cOrganisation = db.Organisations.Find(id); if (cOrganisation == null) { return(HttpNotFound()); } return(View(cOrganisation)); }
// GET: cOrganisation/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } cOrganisation cOrganisation = db.Organisations.Find(id); if (cOrganisation == null) { return(HttpNotFound()); } ViewBag.ID = new SelectList(db.CDD_Details, "ID", "CDDContact_Name", cOrganisation.ID); return(View(cOrganisation)); }