예제 #1
0
 public IHttpActionResult Get()
 {
     try {
         List <Empleado> todos = EmpleadoBLL.List();
         return(Content(HttpStatusCode.OK, todos));
     }
     catch (Exception ex) {
         return(Content(HttpStatusCode.BadRequest, ex));
     }
 }
예제 #2
0
 public ActionResult Edit([Bind(Include = "id_asis,fecha_ingreso,fecha_salida,id_emp")] Asistencia asistencia)
 {
     if (ModelState.IsValid)
     {
         AsistenciaBLL.Update(asistencia);
         return(RedirectToAction("Index"));
     }
     ViewBag.id_emp = new SelectList(EmpleadoBLL.List(), "id_emp", "nombre_completo", asistencia.id_emp);
     return(View(asistencia));
 }
예제 #3
0
 public ActionResult Edit([Bind(Include = "id,pago_empleado,id_asis,id_emp,dias_trabajo")] Informe informe)
 {
     if (ModelState.IsValid)
     {
         InformeBLL.Update(informe);
         return(RedirectToAction("Index"));
     }
     ViewBag.id_asis = new SelectList(AsistenciaBLL.List(), "id_asis", "id_asis", informe.id_asis);
     ViewBag.id_emp  = new SelectList(EmpleadoBLL.List(), "id_emp", "nombre_completo", informe.id_emp);
     return(View(informe));
 }
예제 #4
0
        // GET: Asistencias/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Asistencia asistencia = AsistenciaBLL.Get(id);

            if (asistencia == null)
            {
                return(HttpNotFound());
            }
            ViewBag.id_emp = new SelectList(EmpleadoBLL.List(), "id_emp", "nombre_completo", asistencia.id_emp);
            return(View(asistencia));
        }
예제 #5
0
        // GET: Informes/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Informe informe = InformeBLL.Get(id);

            if (informe == null)
            {
                return(HttpNotFound());
            }
            ViewBag.id_asis = new SelectList(AsistenciaBLL.List(), "id_asis", "id_asis", informe.id_asis);
            ViewBag.id_emp  = new SelectList(EmpleadoBLL.List(), "id_emp", "nombre_completo", informe.id_emp);
            return(View(informe));
        }
예제 #6
0
 // GET: Informes/Create
 public ActionResult Create()
 {
     ViewBag.id_asis = new SelectList(AsistenciaBLL.List(), "id_asis", "id_asis");
     ViewBag.id_emp  = new SelectList(EmpleadoBLL.List(), "id_emp", "nombre_completo");
     return(View());
 }
예제 #7
0
 // GET: Empleados
 public ActionResult Index()
 {
     return(View(EmpleadoBLL.List()));
 }