public ActionResult Edit([Bind(Include = "Id,IsActive,SortOrder,Status")] OppStatus oppStatus) { if (ModelState.IsValid) { db.Entry(oppStatus).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(oppStatus)); }
public ActionResult Create([Bind(Include = "Id,IsActive,SortOrder,Status")] OppStatus oppStatus) { if (ModelState.IsValid) { db.OppStatus.Add(oppStatus); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(oppStatus)); }
// GET: OppStatus/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } OppStatus oppStatus = db.OppStatus.Find(id); if (oppStatus == null) { return(HttpNotFound()); } return(View(oppStatus)); }