public IHttpActionResult Get() { try { List <Empleado> todos = EmpleadoBLL.List(); return(Content(HttpStatusCode.OK, todos)); } catch (Exception ex) { return(Content(HttpStatusCode.BadRequest, ex)); } }
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)); }
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)); }
// 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)); }
// 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)); }
// 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()); }
// GET: Empleados public ActionResult Index() { return(View(EmpleadoBLL.List())); }