public ActionResult DeleteConfirmed(int id) { EstablishmentByIndustry establishmentByIndustry = db.EstablishmentByIndustries.Find(id); db.EstablishmentByIndustries.Remove(establishmentByIndustry); db.SaveChanges(); return(RedirectToAction("Create")); }
public ActionResult Edit([Bind(Include = "EstablishID,IndustryClassID,NumberofFirms,PercentFirms,Investment,PercentInvest,NumberofEmployee,Distribution,YearTaken")] EstablishmentByIndustry establishmentByIndustry) { if (ModelState.IsValid) { db.Entry(establishmentByIndustry).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Create")); } return(View(establishmentByIndustry)); }
public ActionResult Create([Bind(Prefix = "Item1", Include = "EstablishID,IndustryClassID,NumberofFirms,PercentFirms,Investment,PercentInvest,NumberofEmployee,Distribution,YearTaken")] EstablishmentByIndustry establishmentByIndustry) { if (ModelState.IsValid) { db.EstablishmentByIndustries.Add(establishmentByIndustry); db.SaveChanges(); return(RedirectToAction("Create")); } return(View(establishmentByIndustry)); }
// GET: EstablishmentByIndustry/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } EstablishmentByIndustry establishmentByIndustry = db.EstablishmentByIndustries.Find(id); if (establishmentByIndustry == null) { return(HttpNotFound()); } return(View(establishmentByIndustry)); }