public ActionResult DeleteConfirmed(int id) { organizationtype organizationtype = db.organizationtypes.Find(id); db.organizationtypes.Remove(organizationtype); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "organizationtypeId,code,name,description")] organizationtype organizationtype) { if (ModelState.IsValid) { db.Entry(organizationtype).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(organizationtype)); }
public ActionResult Create([Bind(Include = "organizationtypeId,code,name,description")] organizationtype organizationtype) { if (ModelState.IsValid) { db.organizationtypes.Add(organizationtype); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(organizationtype)); }
// GET: /CRM/organizationtypes/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } organizationtype organizationtype = db.organizationtypes.Find(id); if (organizationtype == null) { return(HttpNotFound()); } return(View(organizationtype)); }