Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            WorkersByClass workersByClass = db.WorkersByClasses.Find(id);

            db.WorkersByClasses.Remove(workersByClass);
            db.SaveChanges();
            return(RedirectToAction("Create"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "WorkersByClassID,ClassWorkerID,AgeGroupID,GenderID,NumberofPopulation,YearTaken")] WorkersByClass workersByClass)
 {
     if (ModelState.IsValid)
     {
         db.Entry(workersByClass).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Create"));
     }
     return(View(workersByClass));
 }
Ejemplo n.º 3
0
        public ActionResult Create([Bind(Prefix = "Item1", Include = "WorkersByClassID,ClassWorkerID,AgeGroupID,GenderID,NumberofPopulation,YearTaken")] WorkersByClass workersByClass)
        {
            if (ModelState.IsValid)
            {
                db.WorkersByClasses.Add(workersByClass);
                db.SaveChanges();
                return(RedirectToAction("Create"));
            }

            return(View(workersByClass));
        }
Ejemplo n.º 4
0
        // GET: GainfulWorkersByClassOfWorker/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            WorkersByClass workersByClass = db.WorkersByClasses.Find(id);

            if (workersByClass == null)
            {
                return(HttpNotFound());
            }
            return(View(workersByClass));
        }
Ejemplo n.º 5
0
        // GET: GainfulWorkersByClassOfWorker/Edit/5
        public ActionResult Edit(int?id)
        {
            ClassOfWorkerDD();
            GenderDD();
            AgeGroupDD();
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            WorkersByClass workersByClass = db.WorkersByClasses.Find(id);

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