Esempio n. 1
0
        public ActionResult ListaValores(string sessao, string liberacaoid)
        {
            var liberacao = _liberacaoApp.GetById(Int32.Parse(liberacaoid));

            var valoresConsultas = ListaValoresConsultas(liberacao.Paciente, sessao);

            var valor = valoresConsultas.FirstOrDefault(c => c.Selected);

            return(Json(valor, JsonRequestBehavior.AllowGet));
        }
        // GET: Consulta/Details/5
        public ActionResult Details(int id)
        {
            var liberacao          = _liberacaoApp.GetById(id);
            var liberacaoViewModel = Mapper.Map <Liberacao, LiberacaoViewModel>(liberacao);

            var consultasViewModel = Mapper.Map <IEnumerable <Consulta>, IEnumerable <ConsultaViewModel> >(_consultaApp.GetPorIdProfissional(0, "", liberacao.NumeroLiberacao));

            //consultasViewModel = consultasViewModel.Where(s => s.LiberacaoId == id);

            var tuple = new Tuple <LiberacaoViewModel, IEnumerable <ConsultaViewModel> >(liberacaoViewModel, consultasViewModel);

            return(View(tuple));
        }