Example #1
0
        protected void btnGerar_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                SalvarBusca();

                string report, parameter;
                parameter = string.Empty;
                report    = ((int)ReportNameGestaoAcademica.GraficoConsolidadoAtividadeAvaliativa).ToString();
                XtraReport         DevReport = null;
                SymmetricAlgorithm sa        = new SymmetricAlgorithm(SymmetricAlgorithm.Tipo.TripleDES);

                DevReport = new RelGrafConsolidadoAtivAvaliada
                                (UCBuscaDocenteTurma.ComboEscola.Esc_ID,
                                UCBuscaDocenteTurma.ComboEscola.Uni_ID,
                                UCBuscaDocenteTurma.ComboEscola.Uad_ID,
                                UCBuscaDocenteTurma.ComboCalendario.Valor,
                                UCBuscaDocenteTurma.ComboCursoCurriculo.Valor[0],
                                UCBuscaDocenteTurma.ComboCursoCurriculo.Valor[1],
                                UCBuscaDocenteTurma.ComboCurriculoPeriodo.Valor[2],
                                UCBuscaDocenteTurma.ComboTurma.Valor[0],
                                UCCPeriodoCalendario.Valor[0],
                                UCCPeriodoCalendario.Valor[1],
                                UCComboTipoDisciplina.Valor,
                                __SessionWEB.__UsuarioWEB.Usuario.usu_id,
                                __SessionWEB.__UsuarioWEB.Grupo.gru_id,
                                GestaoEscolarUtilBO.nomePadraoPeriodo_Calendario(__SessionWEB.__UsuarioWEB.Usuario.ent_id),
                                ACA_ParametroAcademicoBO.ParametroValorPorEntidade(eChaveAcademico.MATRICULA_ESTADUAL, __SessionWEB.__UsuarioWEB.Usuario.ent_id),
                                GestaoEscolarUtilBO.nomePadraoCurso(__SessionWEB.__UsuarioWEB.Usuario.ent_id),
                                GestaoEscolarUtilBO.nomePadraoPeriodo_Calendario(__SessionWEB.__UsuarioWEB.Usuario.ent_id),
                                ACA_ParametroAcademicoBO.ParametroValorInt32PorEntidade(eChaveAcademico.TIPO_NIVEL_ENSINO_EDUCACAO_INFANTIL, __SessionWEB.__UsuarioWEB.Usuario.ent_id),
                                (__SessionWEB.__UsuarioWEB.Grupo.vis_id == SysVisaoID.Administracao),
                                __SessionWEB.__UsuarioWEB.Usuario.ent_id,
                                GetGlobalResourceObject("Reporting", "Reporting.DocDctSubCabecalhoRetrato.Municipio").ToString(),
                                GetGlobalResourceObject("Reporting", "Reporting.DocDctSubCabecalhoRetrato.Secretaria").ToString(),
                                ApplicationWEB.LogoRelatorioDB);

                GestaoEscolarUtilBO.SendParametersToReport(DevReport);
                Response.Redirect(String.Format("~/Documentos/RelatorioDev.aspx?dummy='{0}'", HttpUtility.UrlEncode(sa.Encrypt(report))), false);
                HttpContext.Current.ApplicationInstance.CompleteRequest();
            }
        }
Example #2
0
        private void VisualizarHistorico_Click()
        {
            try
            {
                string report = ((int)MSTech.GestaoEscolar.BLL.ReportNameDocumentos.HistoricoEscolarPedagogico).ToString();

                XtraReport DevReport = new MSTech.GestaoEscolar.RelatoriosDevExpress.Doctos.Spo.HistoricoEscolar(VS_alu_id.ToString(),
                                                                                                                 VS_mtu_id.ToString(), __SessionWEB.__UsuarioWEB.Usuario.ent_id,
                                                                                                                 GetGlobalResourceObject("Reporting", "Reporting.DocHistoricoEscolarPedagogico.Municipio").ToString(),
                                                                                                                 GetGlobalResourceObject("Reporting", "Reporting.DocHistoricoEscolarPedagogico.Secretaria").ToString());

                SymmetricAlgorithm sa = new SymmetricAlgorithm(SymmetricAlgorithm.Tipo.TripleDES);

                GestaoEscolarUtilBO.SendParametersToReport(DevReport);
                Response.Redirect("~/Documentos/RelatorioDev.aspx", false);
                HttpContext.Current.ApplicationInstance.CompleteRequest();
            }
            catch (Exception ex)
            {
                ApplicationWEB._GravaErro(ex);
                UCEnsinoFundamental.message = UtilBO.GetErroMessage((string)GetGlobalResourceObject("HistoricoEscolar", "HistoricoEscolar.ErroCarregarHistoricoAluno"),
                                                                    UtilBO.TipoMensagem.Erro);
            }
        }
Example #3
0
        /// <summary>
        /// Gera o relatorio com base nos filtros selecionados.
        /// </summary>
        private void GerarRel()
        {
            SalvarBusca();

            string report, parameter;

            parameter = string.Empty;
            report    = ((int)MSTech.GestaoEscolar.BLL.ReportNameGestaoAcademica.GraficoJustificativaFalta).ToString();
            XtraReport         DevReport = null;
            SymmetricAlgorithm sa        = new SymmetricAlgorithm(SymmetricAlgorithm.Tipo.TripleDES);

            string DRE     = "";
            string escola  = "";
            string filtros = "";

            if (UCComboUAEscola.Uad_ID != Guid.Empty)
            {
                DRE = UCComboUAEscola.TextoComboUA;
            }
            else if (UCComboUAEscola.Esc_ID > 0)
            {
                ESC_Escola esc = new ESC_Escola {
                    esc_id = UCComboUAEscola.Esc_ID
                };
                ESC_EscolaBO.GetEntity(esc);
                SYS_UnidadeAdministrativa uadSup = new SYS_UnidadeAdministrativa {
                    uad_id = esc.uad_idSuperiorGestao, ent_id = __SessionWEB.__UsuarioWEB.Usuario.ent_id
                };
                SYS_UnidadeAdministrativaBO.GetEntity(uadSup);

                DRE = uadSup.uad_nome;
            }
            if (UCComboUAEscola.Esc_ID > 0)
            {
                escola = UCComboUAEscola.TextoComboEscola;
            }

            if (UCComboCursoCurriculo1.Valor[0] > 0)
            {
                filtros = UCComboCursoCurriculo1.Texto;
            }
            if (UCComboCurriculoPeriodo1.Valor[2] > 0)
            {
                filtros += (string.IsNullOrEmpty(filtros) ? "" : " - ") + UCComboCurriculoPeriodo1.Texto;
            }
            if (UCComboTurma1.Valor[0] > 0)
            {
                filtros += (string.IsNullOrEmpty(filtros) ? "" : " - ") + UCComboTurma1.Texto;
            }

            DevReport = new MSTech.GestaoEscolar.RelatoriosDevExpress.Doctos.Spo.GraficoJustificativaFalta
                            (UCComboUAEscola.Uad_ID,
                            UCComboUAEscola.Esc_ID,
                            UCComboUAEscola.Uni_ID,
                            UCComboCalendario1.Valor,
                            UCComboCursoCurriculo1.Valor[0],
                            UCComboCursoCurriculo1.Valor[1],
                            UCComboCurriculoPeriodo1.Valor[2],
                            UCComboTurma1.Valor[0],
                            __SessionWEB.__UsuarioWEB.Usuario.usu_id,
                            __SessionWEB.__UsuarioWEB.Grupo.gru_id,
                            (__SessionWEB.__UsuarioWEB.Grupo.vis_id == SysVisaoID.Administracao),
                            __SessionWEB.__UsuarioWEB.Usuario.ent_id,
                            GetGlobalResourceObject("Reporting", "Reporting.DocDctSubCabecalhoRetrato.Municipio").ToString(),
                            GetGlobalResourceObject("Reporting", "Reporting.DocDctSubCabecalhoRetrato.Secretaria").ToString(),
                            DRE,
                            escola,
                            UCComboCalendario1.Texto,
                            filtros,
                            ApplicationWEB.LogoRelatorioDB);

            GestaoEscolarUtilBO.SendParametersToReport(DevReport);
            Response.Redirect(String.Format("~/Documentos/RelatorioDev.aspx?dummy='{0}'", HttpUtility.UrlEncode(sa.Encrypt(report))), false);
            HttpContext.Current.ApplicationInstance.CompleteRequest();
        }
Example #4
0
        protected void btnGerarRelatorio_Click(object sender, EventArgs e)
        {
            try
            {
                SalvarBusca();

                __SessionWEB.PostMessages = String.Empty;
                string esc_ids         = String.Empty;
                string alu_ids_boletim = String.Empty;

                // Alu_ids não ordenado pelo id, e sim pelo nome
                string alu_ids_boletim_nao_ordenado = String.Empty;

                _VS_AlunosSelecionados.Clear();

                //bool bTodasPaginas = false;
                //Boolean.TryParse(hdnSelecionaGrid.Value, out bTodasPaginas);

                if (chkTodos.Checked)
                {
                    DataTable dtAlunos = ACA_AlunoBO.BuscaAlunos_Documentos_GraficoIndividualNotas
                                         (
                        UCBuscaDocenteTurma.ComboCalendario.Valor,
                        UCBuscaDocenteTurma.ComboEscola.Esc_ID,
                        UCBuscaDocenteTurma.ComboEscola.Uni_ID,
                        UCBuscaDocenteTurma.ComboCursoCurriculo.Valor[0],
                        UCBuscaDocenteTurma.ComboCursoCurriculo.Valor[1],
                        UCBuscaDocenteTurma.ComboCurriculoPeriodo.Valor[2],
                        UCBuscaDocenteTurma.ComboTurma.Valor[0],
                        Convert.ToByte(UCCamposBuscaAluno1.TipoBuscaNomeAluno),
                        UCCamposBuscaAluno1.NomeAluno,
                        Convert.ToDateTime(string.IsNullOrEmpty(UCCamposBuscaAluno1.DataNascAluno) ? new DateTime().ToString() : UCCamposBuscaAluno1.DataNascAluno),
                        UCCamposBuscaAluno1.NomeMaeAluno,
                        UCCamposBuscaAluno1.MatriculaAluno,
                        UCCamposBuscaAluno1.MatriculaEstadualAluno,
                        __SessionWEB.__UsuarioWEB.Usuario.ent_id,
                        UCBuscaDocenteTurma.ComboEscola.Uad_ID,
                        (__SessionWEB.__UsuarioWEB.Grupo.vis_id == SysVisaoID.Administracao),
                        __SessionWEB.__UsuarioWEB.Usuario.usu_id,
                        __SessionWEB.__UsuarioWEB.Grupo.gru_id,
                        0,
                        0,
                        (int)VS_SortDirection,
                        VS_Ordenacao,
                        false
                                         );

                    foreach (DataRow row in dtAlunos.Rows)
                    {
                        alu_ids_boletim_nao_ordenado = (String.IsNullOrEmpty(alu_ids_boletim_nao_ordenado) ? "" : alu_ids_boletim_nao_ordenado + ",") + row["alu_id"];

                        if (!_VS_AlunosSelecionados.ContainsKey(Convert.ToInt64(row["alu_id"])))
                        {
                            esc_ids = !String.IsNullOrEmpty(esc_ids) ? String.Concat(esc_ids + ',', row["esc_id"].ToString()) : row["esc_id"].ToString();
                            _VS_AlunosSelecionados.Add(Convert.ToInt64(row["alu_id"]), true);
                        }
                    }
                }
                else // se só a pagina atual tem selecionados corre as linhas do grid pegando os alu_ids atuais
                {
                    foreach (GridViewRow row in grvDocumentoAluno.Rows)
                    {
                        CheckBox chkSelecionar = (CheckBox)row.FindControl("chkSelecionar");

                        if (chkSelecionar.Checked)
                        {
                            alu_ids_boletim_nao_ordenado = (String.IsNullOrEmpty(alu_ids_boletim_nao_ordenado) ? "" : alu_ids_boletim_nao_ordenado + ",") + grvDocumentoAluno.DataKeys[row.RowIndex].Values["alu_id"];

                            if (!_VS_AlunosSelecionados.ContainsKey(Convert.ToInt64(grvDocumentoAluno.DataKeys[row.RowIndex].Values["alu_id"])))
                            {
                                _VS_AlunosSelecionados.Add(Convert.ToInt64(grvDocumentoAluno.DataKeys[row.RowIndex].Values["alu_id"]), true);
                                esc_ids = !String.IsNullOrEmpty(esc_ids) ? String.Concat(esc_ids + ',', Convert.ToString(grvDocumentoAluno.DataKeys[row.RowIndex].Values["esc_id"])) : Convert.ToString(grvDocumentoAluno.DataKeys[row.RowIndex].Values["esc_id"]);
                            }
                        }
                    }
                }

                if (_VS_AlunosSelecionados.Count > 0)
                {
                    string alu_ids = String.Empty;

                    foreach (KeyValuePair <long, bool> kvp in _VS_AlunosSelecionados)
                    {
                        alu_ids = !String.IsNullOrEmpty(alu_ids) ? String.Concat(alu_ids + ',', kvp.Key) : kvp.Key.ToString();
                    }

                    string report, parameter;
                    parameter = string.Empty;
                    report    = ((int)MSTech.GestaoEscolar.BLL.ReportNameGestaoAcademica.GraficoIndividualNotaComponente).ToString();
                    XtraReport         DevReport = null;
                    SymmetricAlgorithm sa        = new SymmetricAlgorithm(SymmetricAlgorithm.Tipo.TripleDES);

                    DevReport = new RelGrafIndividualNotaComponente
                                    (UCBuscaDocenteTurma.ComboEscola.Esc_ID,
                                    UCBuscaDocenteTurma.ComboEscola.Uni_ID,
                                    UCBuscaDocenteTurma.ComboCalendario.Valor,
                                    UCCPeriodoCalendario.Valor[0],
                                    UCBuscaDocenteTurma.ComboCursoCurriculo.Valor[0],
                                    UCBuscaDocenteTurma.ComboCursoCurriculo.Valor[1],
                                    UCBuscaDocenteTurma.ComboCurriculoPeriodo.Valor[2],
                                    alu_ids,
                                    __SessionWEB.__UsuarioWEB.Usuario.ent_id,
                                    GetGlobalResourceObject("Reporting", "Reporting.DocDctSubCabecalhoRetrato.Municipio").ToString(),
                                    GetGlobalResourceObject("Reporting", "Reporting.DocDctSubCabecalhoRetrato.Secretaria").ToString(),
                                    ApplicationWEB.LogoRelatorioDB);

                    GestaoEscolarUtilBO.SendParametersToReport(DevReport);
                    Response.Redirect(String.Format("~/Documentos/RelatorioDev.aspx?dummy='{0}'", HttpUtility.UrlEncode(sa.Encrypt(report))), false);
                    HttpContext.Current.ApplicationInstance.CompleteRequest();
                }
                else
                {
                    lblMessage.Text = UtilBO.GetErroMessage("Selecione pelo menos um aluno para gerar documento.", UtilBO.TipoMensagem.Alerta);
                }
            }
            catch (ValidationException ex)
            {
                lblMessage.Text = UtilBO.GetErroMessage(ex.Message, UtilBO.TipoMensagem.Alerta);
            }
            catch (Exception err)
            {
                ApplicationWEB._GravaErro(err);
                lblMessage.Text = UtilBO.GetErroMessage("Erro ao tentar carregar o documento do aluno.", UtilBO.TipoMensagem.Erro);
            }
        }
Example #5
0
        protected void _grvDocumentoAluno_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "Editar")
            {
                try
                {
                    int index = int.Parse(e.CommandArgument.ToString());
                    Session["alu_id"] = _grvDocumentoAluno.DataKeys[index].Values["alu_id"].ToString();
                    Session["mtu_id"] = _grvDocumentoAluno.DataKeys[index].Values["mtu_id"].ToString();

                    switch (VS_mod)
                    {
                    case 1:
                        RedirecionarPagina("DadosAluno.aspx");
                        break;

                    case 2:
                        RedirecionarPagina("EnsinoFundamental.aspx");
                        break;

                    case 3:
                        RedirecionarPagina("Transferencia.aspx");
                        break;

                    case 4:
                        RedirecionarPagina("InformacoesComplementares.aspx");
                        break;

                    default:
                        RedirecionarPagina("DadosAluno.aspx");
                        break;
                    }
                }
                catch (Exception ex)
                {
                    ApplicationWEB._GravaErro(ex);
                    _lblMessage.Text = UtilBO.GetErroMessage("Erro ao tentar editar o histórico.", UtilBO.TipoMensagem.Erro);
                    _lblMessage.Focus();
                }
            }
            else if (e.CommandName == "HistoricoEscolar")
            {
                int index = int.Parse(e.CommandArgument.ToString());

                string alu_id = _grvDocumentoAluno.DataKeys[index].Values["alu_id"].ToString();
                string mtu_id = _grvDocumentoAluno.DataKeys[index].Values["mtu_id"].ToString();

                XtraReport DevReport = new MSTech.GestaoEscolar.RelatoriosDevExpress.Doctos.Spo.HistoricoEscolar
                                           (alu_id,
                                           mtu_id,
                                           __SessionWEB.__UsuarioWEB.Usuario.ent_id,
                                           GetGlobalResourceObject("Reporting", "Reporting.DocHistoricoEscolarPedagogico.Municipio").ToString(),
                                           GetGlobalResourceObject("Reporting", "Reporting.DocHistoricoEscolarPedagogico.Secretaria").ToString());

                SymmetricAlgorithm sa = new SymmetricAlgorithm(SymmetricAlgorithm.Tipo.TripleDES);

                GestaoEscolarUtilBO.SendParametersToReport(DevReport);
                Response.Redirect("~/Documentos/RelatorioDev.aspx", false);
                HttpContext.Current.ApplicationInstance.CompleteRequest();
            }
        }