Пример #1
0
        public JsonResult ObterInfusoesConsultaFaturamento(int ano, int mes)
        {
            var             a = _notaFiscalRepositorio.ObterTodasDaClinicaNoMes(mes, ano, Session.ProgramaAtivo());
            IList <dynamic> b = new List <dynamic>();

            foreach (var notaFiscal in a)
            {
                foreach (var infusao in notaFiscal.Infusoes)
                {
                    if (notaFiscal.Status() != "Estornado")
                    {
                        b.Add(new
                        {
                            notaFiscal.Codigo,
                            infusao.Clinica.Nome,
                            infusao.Localizador,
                            infusao.DataInfusao,
                            infusao.Clinica.ValorDeInfusao,
                            Status = notaFiscal.Status(),
                            notaFiscal.Data,
                            notaFiscal.Numero
                        });
                    }
                }
            }
            return(Json(b, JsonRequestBehavior.AllowGet));
        }