Beispiel #1
0
        public IHttpActionResult GetSolicitud(int id)
        {
            ModelSolicituds solicitud = serv.SolicitudGet(id);

            if (solicitud == null)
            {
                return(NotFound());
            }

            return(Ok(solicitud));
        }
        // GET: Solicitudes/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            var data = serv.SolicitudGet(id.Value);
            SolicitudViewModel viewModel = new SolicitudViewModel
            {
                Solicitud = data
            };

            if (data == null)
            {
                return(HttpNotFound());
            }
            return(View(viewModel));
        }