public ActionResult DeleteConfirmed(int id)
        {
            WorkersByMajorIndustry workersByMajorIndustry = db.WorkersByMajorIndustries.Find(id);

            db.WorkersByMajorIndustries.Remove(workersByMajorIndustry);
            db.SaveChanges();
            return(RedirectToAction("Create"));
        }
 public ActionResult Edit([Bind(Include = "WorkersMajorIndustryID,MajorBusinessIndustryID,AgeGroupID,GenderID,NumberofPopulation,YearTaken")] WorkersByMajorIndustry workersByMajorIndustry)
 {
     if (ModelState.IsValid)
     {
         db.Entry(workersByMajorIndustry).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Create"));
     }
     return(View(workersByMajorIndustry));
 }
        public ActionResult Create([Bind(Prefix = "Item1", Include = "WorkersMajorIndustryID,MajorBusinessIndustryID,AgeGroupID,GenderID,NumberofPopulation,YearTaken")] WorkersByMajorIndustry workersByMajorIndustry)
        {
            if (ModelState.IsValid)
            {
                db.WorkersByMajorIndustries.Add(workersByMajorIndustry);
                db.SaveChanges();
                return(RedirectToAction("Create"));
            }

            return(View(workersByMajorIndustry));
        }
        // GET: GainfulWorkersByMajorBusinessOrIndustry/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            WorkersByMajorIndustry workersByMajorIndustry = db.WorkersByMajorIndustries.Find(id);

            if (workersByMajorIndustry == null)
            {
                return(HttpNotFound());
            }
            return(View(workersByMajorIndustry));
        }
        // GET: GainfulWorkersByMajorBusinessOrIndustry/Edit/5
        public ActionResult Edit(int?id)
        {
            AgeGroupDD();
            MajorBusinessesDD();
            GenderDD();
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            WorkersByMajorIndustry workersByMajorIndustry = db.WorkersByMajorIndustries.Find(id);

            if (workersByMajorIndustry == null)
            {
                return(HttpNotFound());
            }
            return(View(workersByMajorIndustry));
        }