protected override void CarregaParcelasReais(GDASession sessao, ref List <DadosParcelaReal> valores, decimal valorReal) { #region Carrega os valores para liberações if (idsLiberarPedido.Length > 0) { using (LiberarPedidoDAO dao = LiberarPedidoDAO.Instance) foreach (uint id in idsLiberarPedido) { var total = dao.ObtemValorCampo <decimal>(sessao, "total", "idLiberarPedido=" + id); valores.Add(new DadosParcelaReal() { IdReferencia = id, ValorVencimento = total / valorReal, Reposicao = dao.ContemPedidosReposicao(sessao, id) }); } } #endregion #region Carrega os valores para pedidos else if (idsPedido.Length > 0) { using (PedidoDAO dao = PedidoDAO.Instance) foreach (uint id in idsPedido) { decimal total = dao.GetTotalParaLiberacao(sessao, id); valores.Add(new DadosParcelaReal() { IdReferencia = id, ValorVencimento = total / valorReal, Reposicao = dao.IsPedidoReposicao(sessao, id.ToString()) }); } } #endregion }