public ActionResult Create([Bind(Include = "id,pago_empleado,id_asis,id_emp,dias_trabajo")] Informe informe) { if (ModelState.IsValid) { InformeBLL.Create(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)); }
public IHttpActionResult Post(Informe informe) { try { InformeBLL.Create(informe); return(Content(HttpStatusCode.Created, "Informe creado correctamente")); } catch (Exception ex) { return(BadRequest(ex.Message)); } }