Example #1
0
        // GET: Informes/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Informe informe = InformeBLL.Get(id);

            if (informe == null)
            {
                return(HttpNotFound());
            }
            return(View(informe));
        }
Example #2
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));
        }
Example #3
0
 public IHttpActionResult Get(int id)
 {
     try
     {
         Informe result = InformeBLL.Get(id);
         if (result == null)
         {
             return(NotFound());
         }
         return(Content(HttpStatusCode.OK, result));
     }
     catch (Exception ex)
     {
         return(Content(HttpStatusCode.BadRequest, ex));
     }
 }