public Saldo GetSaldo(SaldoFilter filter) { Saldo saldo = new Saldo(); saldo.Estatisticas = GetEstatisticas(filter); saldo.SaldoContas = ListSaldoContas(filter).ToList(); return(saldo); }
public GenericResult <IEnumerable <SaldoConta> > ListSaldoContas(SaldoFilter filter) { GenericResult <IEnumerable <SaldoConta> > result = new GenericResult <IEnumerable <SaldoConta> >(); try { result.Result = service.ListSaldoContas(filter); } catch (Exception ex) { result.Errors = new string[] { ex.Message }; } return(result); }
public GenericResult <Estatisticas> GetEstatisticas(SaldoFilter filter) { GenericResult <Estatisticas> result = new GenericResult <Estatisticas>(); try { result.Result = service.GetEstatisticas(filter); } catch (Exception ex) { result.Errors = new string[] { ex.Message }; } return(result); }
public IEnumerable <SaldoConta> ListSaldoContas(SaldoFilter filter) { var result = connection.Query("Exec GetListSaldoConta @todasConta, @text", filter); var listSaldoContas = new List <SaldoConta>(); foreach (var row in result) { SaldoConta saldo = new SaldoConta(); saldo.Conta = contaRep.GetById(row.contaId); saldo.TotalVendido = row.totalVendido; saldo.Saldo = row.saldo; listSaldoContas.Add(saldo); } return(listSaldoContas); }
public Estatisticas GetEstatisticas(SaldoFilter filter) { var result = connection.QueryFirstOrDefault <Estatisticas>("Exec GetEstatisticas @todasConta, @text", filter); return(result); }
public GenericResult <IEnumerable <SaldoConta> > ListSaldoContas([FromBody] SaldoFilter filter) { return(appService.ListSaldoContas(filter)); }
public GenericResult <Estatisticas> GetEstatisticas([FromBody] SaldoFilter filter) { return(appService.GetEstatisticas(filter)); }