Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            EstablishmentByIndustry establishmentByIndustry = db.EstablishmentByIndustries.Find(id);

            db.EstablishmentByIndustries.Remove(establishmentByIndustry);
            db.SaveChanges();
            return(RedirectToAction("Create"));
        }
Example #2
0
 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));
 }
Example #3
0
        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));
        }
Example #4
0
        // 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));
        }