示例#1
0
        public ActionResult Detalle(int id)
        {
            var propuesta = PropuestaService.GetById(id);
            var propuestaDetalleViewModel = new PropuestaDetalleViewModel
            {
                Propuesta  = propuesta,
                Denuncie   = DenunciasService.Denuncie(id),
                Valoracion = PropuestasValoracionesService.Valore(id)
            };

            return(View(propuestaDetalleViewModel));
        }
示例#2
0
        public ActionResult Valorar(string mg, string nmg, PropuestasValoraciones pv)
        {
            var propuestasValoraciones = new PropuestasValoraciones
            {
                IdPropuesta = pv.IdPropuesta,
                IdUsuario   = SessionHelper.Usuario.IdUsuario,
                Valoracion  = nmg == null
            };

            PropuestasValoracionesService.Crear(propuestasValoraciones);
            PropuestaService.PutPorcentajeAceptacion(pv.IdPropuesta);
            return(RedirectToAction("Detalle", "Propuesta", new { id = pv.IdPropuesta }));
        }