Example #1
0
 public ActionResult Edit(PersonalTalavera PT)
 {
     if (ModelState.IsValid)
     {
         int res = tsvc.editPersonal(PT);
         if (res > 0)
         {
             return(RedirectToAction("Index"));
         }
     }
     return(new HttpStatusCodeResult(201, "No fue posible guardar los cambios, intentelo mas tarde"));
 }
Example #2
0
 public ActionResult Crear(PersonalTalavera PT)
 {
     if (ModelState.IsValid)
     {
         int res = tsvc.addPersonalTalaver(PT);
         if (res >= 1)
         {
             return(RedirectToAction("Index"));
         }
     }
     return(new HttpStatusCodeResult(404, "No se pudo registrar, vuelva a intentarlo mas tarde"));
 }
Example #3
0
        public ActionResult Delete(PersonalTalavera CT)
        {
            int res = tsvc.deletePersonal(CT.Id);

            if (res == 1)
            {
                return(RedirectToAction("Index"));
            }
            else
            {
                return(View());
            }
        }
Example #4
0
        public ActionResult Delete(int id)
        {
            PersonalTalavera CT = tsvc.getPersonal(id);

            return(View(CT));
        }
Example #5
0
        public ActionResult Edit(int id)
        {
            PersonalTalavera pt = tsvc.getPersonal(id);

            return(View(pt));
        }