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