Esempio n. 1
0
        // GET: TabuladorSueldo/Create
        public ActionResult Create(int?id)
        {
            TabuladorSueldo tabuladorSueldo = new TabuladorSueldo();


            return(View(tabuladorSueldo));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "Id,SueldoNeto,Apoyo,ISR,Seguro")] TabuladorSueldo tabuladorSueldo)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tabuladorSueldo).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Details", tabuladorSueldo));
     }
     ViewBag.Id = new SelectList(db.Empleados, "Id", "NumeroEmpleado", tabuladorSueldo.Id);
     return(View(tabuladorSueldo));
 }
Esempio n. 3
0
        // GET: TabuladorSueldo/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TabuladorSueldo tabuladorSueldo = db.TabuladorSueldos.Find(id);

            if (tabuladorSueldo == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Id = new SelectList(db.Empleados, "Id", "NumeroEmpleado", tabuladorSueldo.Id);
            return(View(tabuladorSueldo));
        }
Esempio n. 4
0
        // GET: TabuladorSueldo/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            TabuladorSueldo tabuladorSueldo = db.TabuladorSueldos.Find(id);

            if (tabuladorSueldo == null)
            {
                TabuladorSueldo tabuladorSueldo1Def = new TabuladorSueldo();
                tabuladorSueldo1Def.Id         = id.GetValueOrDefault();
                tabuladorSueldo1Def.SueldoNeto = 0;
                tabuladorSueldo1Def.Apoyo      = 0;
                tabuladorSueldo1Def.ISR        = 0;
                tabuladorSueldo1Def.Seguro     = 0;
                return(RedirectToAction("Create", tabuladorSueldo1Def));
                //return View("Create");
                // return HttpNotFound();
            }
            return(View(tabuladorSueldo));
        }