Esempio n. 1
0
        private void RelatorioInadimplentes_load()
        {
            RelatorioNegocio relatorioNegocio = new RelatorioNegocio();
            Relatorio        relatorio        = new Relatorio();

            lblTituloRelatorio.Text = "Relatório de Alunos Inadimplentes";
            lblDataAtual.Text       = DateTime.Now.ToLongDateString();
            GridViewInadimplentes.Columns.Clear();

            relatorio = relatorioNegocio.ObterRelatorioInadimplentes();
            if (relatorio.NumProjetos > 0 || relatorio.NumAlunos > 0)
            {
                List <AlunoParcela> listAlunoProjeto = relatorioNegocio.ObterAlunosInadimplentes();
                GridViewInadimplentes.Visible = true;
                bttImpressao.Visible          = true;
                lbl1.Text        = "R$ " + relatorio.ValorTotal.ToString();
                textLBL1.Text    = "Total: ";
                lbl2.Text        = relatorio.NumAlunos.ToString() + " alunos";
                textLBL2.Text    = "Número de Alunos: ";
                lbl3.Text        = relatorio.MediaDiasAtrasados.ToString() + " dias";
                textLBL3.Text    = "Média de dias Atrasados: ";
                lbl4.Text        = relatorio.MaiorAtraso.ToString() + " dias";
                textLBL4.Text    = "Maior Atraso: ";
                textLBL4.Visible = true;
                lbl4.Visible     = true;

                GridViewInadimplentes.DataSource          = listAlunoProjeto;
                GridViewInadimplentes.AutoGenerateColumns = false;

                BoundField bfNomeAluno = new BoundField();
                bfNomeAluno.DataField  = "Nome";
                bfNomeAluno.HeaderText = "Nome do Aluno";
                GridViewInadimplentes.Columns.Add(bfNomeAluno);

                BoundField bfNumeroPece = new BoundField();
                bfNumeroPece.DataField  = "NumeroPECE";
                bfNumeroPece.HeaderText = "Número PECE";
                GridViewInadimplentes.Columns.Add(bfNumeroPece);

                BoundField bfParcelaVencida = new BoundField();
                bfParcelaVencida.HtmlEncode       = false;
                bfParcelaVencida.DataField        = "ParcelaVencida";
                bfParcelaVencida.DataFormatString = "{0:d}";
                bfParcelaVencida.HeaderText       = "Parcela Vencida";
                GridViewInadimplentes.Columns.Add(bfParcelaVencida);

                BoundField bfValorDevido = new BoundField();
                bfValorDevido.DataFormatString = "R$ {0:F2}";
                bfValorDevido.DataField        = "ValorParcela";
                bfValorDevido.HeaderText       = "Valor Devido";
                GridViewInadimplentes.Columns.Add(bfValorDevido);

                GridViewInadimplentes.DataBind();
            }
            else
            {
                PanelSucesso.Visible = true;
            }
        }
Esempio n. 2
0
        private void RelatorioArrecadacaoMes_load()
        {
            RelatorioNegocio relatorioNegocio = new RelatorioNegocio();
            Relatorio        relatorio        = new Relatorio();
            int mes = Convert.ToInt32(mnMesReferencia.Text);
            int ano = Convert.ToInt32(txtAnoReferencia.Text);

            lblTituloRelatorio.Text = "Relatório Mensal da Arrecadação Confirmada";
            lblDataAtual.Text       = DateTime.Now.ToLongDateString();
            GridViewInadimplentes.Columns.Clear();

            relatorio = relatorioNegocio.ObterRelatorioArrecadacaoMes(mes, ano);
            if (relatorio.NumProjetos > 0 || relatorio.NumAlunos > 0)
            {
                GridViewInadimplentes.Visible = true;
                bttImpressao.Visible          = true;
                List <Projeto> listProjeto = relatorioNegocio.ObterArrecadacaoMes(mes, ano);
                lbl1.Text        = "R$ " + relatorio.ValorTotal.ToString();
                textLBL1.Text    = "Total Arrecadado: ";
                lbl2.Text        = "R$ " + relatorio.ValorJuros.ToString();
                textLBL2.Text    = "Arrecadação com os juros: ";
                lbl3.Text        = relatorio.NumAlunos.ToString() + " alunos";
                textLBL3.Text    = "Número de Alunos: ";
                lbl4.Text        = relatorio.NumProjetos.ToString() + " projetos";
                textLBL4.Text    = "Número de Projetos: ";
                textLBL4.Visible = true;
                lbl4.Visible     = true;

                GridViewInadimplentes.DataSource          = listProjeto;
                GridViewInadimplentes.AutoGenerateColumns = false;

                BoundField bfNomeProjeto = new BoundField();
                bfNomeProjeto.DataField  = "Nome";
                bfNomeProjeto.HeaderText = "Nome do Projeto";
                GridViewInadimplentes.Columns.Add(bfNomeProjeto);

                BoundField bfCodProjeto = new BoundField();
                bfCodProjeto.DataField  = "Codigo";
                bfCodProjeto.HeaderText = "Código do Projeto";
                GridViewInadimplentes.Columns.Add(bfCodProjeto);

                BoundField bfValorArrecadado = new BoundField();
                bfValorArrecadado.DataField        = "Valor";
                bfValorArrecadado.DataFormatString = "R$ {0:F2}";
                bfValorArrecadado.HeaderText       = "Arrecadação no Mês";
                GridViewInadimplentes.Columns.Add(bfValorArrecadado);

                GridViewInadimplentes.DataBind();
            }
            else
            {
                PanelSucesso.Visible = true;
            }
        }