Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            nominas nominas = db.nominas.Find(id);

            db.nominas.Remove(nominas);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "id,año,mes,monto_total,monto_totalizar")] nominas nominas)
 {
     if (ModelState.IsValid)
     {
         db.Entry(nominas).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.monto_total = new SelectList(db.empleados, "id", "codigo_empleado", nominas.monto_total);
     return(View(nominas));
 }
Exemple #3
0
        // GET: nominas/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            nominas nominas = db.nominas.Find(id);

            if (nominas == null)
            {
                return(HttpNotFound());
            }
            return(View(nominas));
        }
Exemple #4
0
        // GET: nominas/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            nominas nominas = db.nominas.Find(id);

            if (nominas == null)
            {
                return(HttpNotFound());
            }
            ViewBag.monto_total = new SelectList(db.empleados, "id", "codigo_empleado", nominas.monto_total);
            return(View(nominas));
        }