Ejemplo n.º 1
0
        protected void grdSimplificado_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int Index = ObjectUtils.ToInt(e.CommandArgument) - (grdSimplificado.PageIndex * grdSimplificado.PageSize);

            if (e.CommandName == "Download")
            {
                Boolean comentarios = false;
                Int32   intro       = 0;
                String  estado      = null;
                String  categoria   = null;
                String  protocolo   = ((Label)grdSimplificado.Rows[Index].Cells[2].Controls[1]).Text;
                Int32   programaId  = objPrograma.IdPrograma;
                Boolean avaliador   = false;
                String  caminho     = "";

                List <EntQuestionarioEmpresa> listQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterPorProtocolo(protocolo);

                if (listQuestionarioEmpresa != null)
                {
                    List <EntEmpresaCadastro> listEmpresaCadastro = new BllEmpresaCadastro().ObterPorIdPrograma(listQuestionarioEmpresa[0].EmpresaCadastro.IdEmpresaCadastro, programaId);

                    if (listEmpresaCadastro != null)
                    {
                        caminho = new PaginaBase().gerarRelatorioPDF(listEmpresaCadastro[0].IdEmpresaCadastro.ToString(), listEmpresaCadastro[0].CPF_CNPJ, listQuestionarioEmpresa[0].IdQuestionarioEmpresa.ToString(), protocolo, estado, categoria, comentarios, programaId, objTurma.IdTurma, BooleanUtils.ToInt(avaliador), intro, false, this.Page);
                        if (caminho != "")
                        {
                            NovaJanela(this.Page, caminho);
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void PageToObject()
        {
            EntQuestionarioEmpresa objQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterPorId(int.Parse(HddnFldIdQuestionarioEmpresa.Value));

            switch (objQuestionarioEmpresa.Questionario.IdQuestionario)
            {
            case EntQuestionario.QUESTIONARIO_EMPREENDEDORISMO_2009:
                this.UCAdministrativoEmpreendedorismo1.Gravar();
                break;

            case EntQuestionario.QUESTIONARIO_EMPREENDEDORISMO_2011:
                this.UCAdministrativoEmpreendedorismo1.Gravar();
                break;

            case EntQuestionario.QUESTIONARIO_GESTAO_2009:
                this.UCAdministrativoGestao1.Gravar();
                break;

            case EntQuestionario.QUESTIONARIO_GESTAO_2011:
                this.UCAdministrativoGestao20111.Gravar();
                break;

            case EntQuestionario.QUESTIONARIO_INOVACAO_2011:
                this.UCAdministrativoInovacao1.Gravar();
                break;

            case EntQuestionario.QUESTIONARIO_RESPONSABILIDADE_2009:
                this.UCAdministrativoResponsabilidadeSocial1.Gravar();
                break;

            case EntQuestionario.QUESTIONARIO_RESPONSABILIDADE_2011:
                this.UCAdministrativoResponsabilidadeSocial20111.Gravar();
                break;
            }
        }
Ejemplo n.º 3
0
        private void EnviarEmail(String Email)
        {
            Int32   RowIndex  = ObjectUtils.ToInt(hddRowIndex.Value);
            String  protocolo = ((Label)grdRelatorioRAA.Rows[RowIndex].Cells[15].Controls[1]).Text;
            Int32   programa  = StringUtils.ToInt(((Label)grdRelatorioRAA.Rows[RowIndex].Cells[16].Controls[1]).Text);
            Boolean avaliador = StringUtils.ToBoolean(((Label)grdRelatorioRAA.Rows[RowIndex].Cells[17].Controls[1]).Text);
            String  caminho   = "";

            if (protocolo != "")
            {
                String estado    = null;
                String categoria = null;

                List <EntQuestionarioEmpresa> listQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterPorProtocolo(protocolo);

                if (listQuestionarioEmpresa != null)
                {
                    List <EntEmpresaCadastro> listEmpresaCadastro = new BllEmpresaCadastro().ObterPorIdPrograma(listQuestionarioEmpresa[0].EmpresaCadastro.IdEmpresaCadastro, programa);

                    if (listEmpresaCadastro != null)
                    {
                        caminho = gerarRelatorioPDF(listEmpresaCadastro[0].IdEmpresaCadastro.ToString(), listEmpresaCadastro[0].CPF_CNPJ, listQuestionarioEmpresa[0].IdQuestionarioEmpresa.ToString(), protocolo, estado, categoria, false, programa, objTurma.IdTurma, BooleanUtils.ToInt(avaliador), 0, true, this.Page);
                    }
                }
                if (caminho != "")
                {
                    WebUtils.EnviaEmailRaa(Email, "", caminho);
                }
            }
            UCStatus1.UpdateControls();
        }
Ejemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request["protocolo"] != null)
            {
                String estado    = null;
                String categoria = null;

                List <EntQuestionarioEmpresa> listQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterPorProtocolo(Request["protocolo"]);

                new BllQuestionarioEmpresa().AlterarRelatorioGeradoPorProtocolo(Request["protocolo"], true);

                if (listQuestionarioEmpresa != null)
                {
                    List <EntEmpresaCadastro> listEmpresaCadastro = new BllEmpresaCadastro().ObterPorIdPrograma(listQuestionarioEmpresa[0].EmpresaCadastro.IdEmpresaCadastro, StringUtils.ToInt(Request["programaId"]));

                    if (listEmpresaCadastro != null)
                    {
                        Boolean comentarios = ObjectUtils.ToBoolean(Request["comentarios"]);
                        Int32   programaId  = ObjectUtils.ToInt(Request["programaId"]);
                        Int32   turmaId     = ObjectUtils.ToInt(Request["turmaId"]);
                        Int32   avaliador   = ObjectUtils.ToInt(Request["avaliacao"]);
                        Int32   intro       = ObjectUtils.ToInt(Request["intro"]);
                        gerarRelatorioPDF(listEmpresaCadastro[0].IdEmpresaCadastro.ToString(), listEmpresaCadastro[0].CPF_CNPJ, listQuestionarioEmpresa[0].IdQuestionarioEmpresa.ToString(), Request["protocolo"], estado, categoria, comentarios, programaId, turmaId, avaliador, intro, false, this.Page);
                    }
                }
            }
        }
    }
Ejemplo n.º 5
0
        protected void grdSimplificado_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int Index = ObjectUtils.ToInt(e.CommandArgument) - (grdSimplificado.PageIndex * grdSimplificado.PageSize);

            if (e.CommandName == "Avaliar")
            {
                //Avaliar
                Label lblIdEmpresaCadastro = ((Label)grdSimplificado.Rows[Index].FindControl("lblIdEmpresaCadastro"));
                int   IdEmpresaCadastro    = StringUtils.ToInt(lblIdEmpresaCadastro.Text);
                Label lblIdEtapa           = ((Label)grdSimplificado.Rows[Index].FindControl("lblIdEtapa"));
                int   IdEtapa = StringUtils.ToInt(lblIdEtapa.Text);
                int   IdTurma = UCFiltroAvaliacao1.IdTurma();
                this.UCListaQuestionariosAvaliacao1.Editar(IdEmpresaCadastro, IdEtapa, IdTurma);
            }
            else if (e.CommandName == "Formulario")
            {
                //Formulario
                Boolean comentarios = false;
                Int32   intro       = 0;
                String  estado      = null;
                String  categoria   = null;
                String  protocolo   = ((Label)grdSimplificado.Rows[Index].FindControl("lblProtocolo")).Text;
                Int32   programaId  = objPrograma.IdPrograma;
                Boolean avaliador   = false;
                String  caminho     = "";

                List <EntQuestionarioEmpresa> listQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterPorProtocolo(protocolo);

                if (listQuestionarioEmpresa != null)
                {
                    List <EntEmpresaCadastro> listEmpresaCadastro = new BllEmpresaCadastro().ObterPorIdPrograma(listQuestionarioEmpresa[0].EmpresaCadastro.IdEmpresaCadastro, programaId);

                    if (listEmpresaCadastro != null)
                    {
                        caminho = new PaginaBase().gerarRelatorioPDF(listEmpresaCadastro[0].IdEmpresaCadastro.ToString(), listEmpresaCadastro[0].CPF_CNPJ, listQuestionarioEmpresa[0].IdQuestionarioEmpresa.ToString(), protocolo, estado, categoria, comentarios, programaId, objTurma.IdTurma, BooleanUtils.ToInt(avaliador), intro, false, this.Page);
                        if (caminho != "")
                        {
                            NovaJanela(this.Page, caminho);
                        }
                    }
                }
            }
            else if (e.CommandName == "Devolucao")
            {
                //Devolucao
                Label  labelIdQuestionarioEmpresa             = ((Label)grdSimplificado.Rows[Index].FindControl("lblIdQuestionarioEmpresa"));
                String motivoDevolucao                        = "";
                EntQuestionarioEmpresa objQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterPorId(int.Parse(labelIdQuestionarioEmpresa.Text));
                if (objQuestionarioEmpresa.MotivoExcluiu != null)
                {
                    motivoDevolucao = objQuestionarioEmpresa.MotivoExcluiu;
                }
                this.TxtDevolucao.Text = motivoDevolucao;

                this.divDevolucao.Style.Add("display", "block");
            }
        }
Ejemplo n.º 6
0
        protected void grdPerguntas_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int Index = ObjectUtils.ToInt(e.CommandArgument) - (grdPerguntas.PageIndex * grdPerguntas.PageSize);

            if (e.CommandName == "Responder")
            {
                Label lblIdQuestionario = ((Label)grdPerguntas.Rows[Index].FindControl("lblIdQuestionario"));
                int   IdQuestionario    = StringUtils.ToInt(lblIdQuestionario.Text);
                this.grdPerguntas.SelectedIndex = -1;
                EntQuestionarioEmpresa objQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterQuestionarioAberto(IdQuestionario, int.Parse(HddnFldIdEmpresaCadastro.Value), int.Parse(HddnFldIdTurma.Value));
                this.UCQuestionarioResponder1.Editar(objQuestionarioEmpresa.IdQuestionarioEmpresa);
            }
        }
Ejemplo n.º 7
0
        //Inscreve ou remove inscrição de empresa em questionário
        protected void AlteraParticipacao(Int32 IdQuestionario, Boolean queroParticipar)
        {
            EntQuestionarioEmpresa questionarioAberto = new BllQuestionarioEmpresa().ObterQuestionarioAberto(IdQuestionario, this.EmpresaLogada.IdEmpresaCadastro, this.objTurma.IdTurma);

            if (queroParticipar)
            {
                //Cria QUESTIONARIO_EMPRESA para o questionario e empresa em questao
                if (questionarioAberto == null)
                {
                    questionarioAberto             = new EntQuestionarioEmpresa();
                    questionarioAberto.Ativo       = false;
                    questionarioAberto.DtCadastro  = DateTime.Now;
                    questionarioAberto.DtAlteracao = DateTime.Now;
                    questionarioAberto.EmpresaCadastro.IdEmpresaCadastro = this.EmpresaLogada.IdEmpresaCadastro;
                    questionarioAberto.Leitura                     = false;
                    questionarioAberto.PassaProximaEtapa           = false;
                    questionarioAberto.PreencheQuestionario        = true;
                    questionarioAberto.Programa.IdPrograma         = this.objPrograma.IdPrograma;
                    questionarioAberto.Questionario.IdQuestionario = IdQuestionario;
                    questionarioAberto.SincronizadoSiac            = false;

                    questionarioAberto.Etapa.IdEtapa = verificaEtapaInscricaoAberta().IdEtapa;

                    if (IdUsuarioLogado > 0)
                    {
                        questionarioAberto.Usuario.IdUsuario = IdUsuarioLogado;
                    }
                    new BllQuestionarioEmpresa().Inserir(questionarioAberto);
                }
                else
                {
                    questionarioAberto.PreencheQuestionario = true;
                    questionarioAberto.EnviaQuestionario    = false;
                    new BllQuestionarioEmpresa().Alterar(questionarioAberto);
                }
            }
            else
            {
                if (questionarioAberto != null)
                {
                    //Inativa QUESTIONARIO_EMPRESA atual para o questionario e empresa em questao
                    questionarioAberto.PreencheQuestionario = false;
                    questionarioAberto.EnviaQuestionario    = false;
                    new BllQuestionarioEmpresa().Alterar(questionarioAberto);
                }
            }
        }
Ejemplo n.º 8
0
        private void GeraQuestionarioEmpreendedorismo(Int32 IdEmpresaCadastro, Boolean IsAvaliador, Int32 IdTurma)
        {
            EntQuestionarioEmpresa objQuestionarioEmpresa = new EntQuestionarioEmpresa();

            objQuestionarioEmpresa.Questionario.IdQuestionario       = (int)EnumType.Questionario.Empreendedorismo;
            objQuestionarioEmpresa.EmpresaCadastro.IdEmpresaCadastro = IdEmpresaCadastro;
            EntTurma objTurma = new EntTurma();

            objTurma.IdTurma       = IdTurma;
            objQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterQuestionarioEmpresaRelatorioRAAPorFiltros(objQuestionarioEmpresa, objTurma);
            if (objQuestionarioEmpresa.IdQuestionarioEmpresa > 0)
            {
                List <EntPergunta> lstEntPergunta = new BllPergunta().ObterPerguntasPorQuestionarioEmpresa((int)EnumType.Questionario.Empreendedorismo, objQuestionarioEmpresa.IdQuestionarioEmpresa, IsAvaliador);

                String html = "<table cellspacing=1 cellpadding=3 bgcolor=\"#000000\" width=100%>";
                foreach (EntPergunta objPergunta in lstEntPergunta)
                {
                    html += "   <tr bgcolor=\"#FFFFFF\">";
                    html += "       <td>";
                    html += objPergunta.Ordem + ". ";
                    html += "       &nbsp;";
                    html += objPergunta.Pergunta;
                    html += "       </td>";
                    foreach (EntPerguntaResposta objPerguntaResposta in objPergunta.ListPerguntaResposta)
                    {
                        html += "       <td " + VerificaPerguntaRespondida(objPerguntaResposta, objPergunta) + ">";
                        html += objPerguntaResposta.PerguntaResposta;
                        html += "       </td>";
                    }
                    html += "   </tr>";
                }

                html += "</table>";
                html += "<br>";

                this.ltrEmpreendedorResposta.Text = html;
            }
            else
            {
                this.ltrEmpreendedorResposta.Visible = false;
            }
        }
Ejemplo n.º 9
0
        protected void grdRelatorioRAA_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "Email")
            {
                hddRowIndex.Value = ObjectUtils.ToString(e.CommandArgument);
                this.UCConfirmaEmail1.Show();
            }
            else if (e.CommandName == "Download")
            {
                hddRowIndex.Value = ObjectUtils.ToString(e.CommandArgument);
                Boolean comentarios = false;
                Int32   intro       = 0;
                Int32   RowIndex    = ObjectUtils.ToInt(hddRowIndex.Value);
                String  estado      = null;
                String  categoria   = null;
                String  protocolo   = ((Label)grdRelatorioRAA.Rows[RowIndex].Cells[15].Controls[1]).Text;
                Int32   programaId  = StringUtils.ToInt(((Label)grdRelatorioRAA.Rows[RowIndex].Cells[16].Controls[1]).Text);
                Boolean avaliador   = StringUtils.ToBoolean(((Label)grdRelatorioRAA.Rows[RowIndex].Cells[17].Controls[1]).Text);
                String  caminho     = "";

                List <EntQuestionarioEmpresa> listQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterPorProtocolo(protocolo);

                if (listQuestionarioEmpresa != null)
                {
                    List <EntEmpresaCadastro> listEmpresaCadastro = new BllEmpresaCadastro().ObterPorIdPrograma(listQuestionarioEmpresa[0].EmpresaCadastro.IdEmpresaCadastro, programaId);

                    if (listEmpresaCadastro != null)
                    {
                        caminho = new PaginaBase().gerarRelatorioPDF(listEmpresaCadastro[0].IdEmpresaCadastro.ToString(), listEmpresaCadastro[0].CPF_CNPJ, listQuestionarioEmpresa[0].IdQuestionarioEmpresa.ToString(), protocolo, estado, categoria, comentarios, programaId, objTurma.IdTurma, BooleanUtils.ToInt(avaliador), intro, false, this.Page);
                        if (caminho != "")
                        {
                            NovaJanela(this.Page, caminho);
                        }
                    }
                }

                UCStatus1.UpdateControls();
//                Response.Redirect("~/FGA/Paginas/RelatorioRAA.aspx");
            }
        }
Ejemplo n.º 10
0
        private void GeraQuestionarioInovacao(Int32 IdQuestionarioEmpresa, Int32 IdEmpresaCadastro, Int32 IdTurma, Boolean IsAvaliador)
        {
            EntQuestionarioEmpresa objQuestionarioEmpresa = new EntQuestionarioEmpresa();

            objQuestionarioEmpresa.Questionario.IdQuestionario       = (int)EnumType.Questionario.Inovacao;
            objQuestionarioEmpresa.EmpresaCadastro.IdEmpresaCadastro = IdEmpresaCadastro;
            EntTurma objTurma = new EntTurma();

            objTurma.IdTurma       = IdTurma;
            objQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterQuestionarioEmpresaRelatorioRAAPorFiltros(objQuestionarioEmpresa, objTurma);

            if (objQuestionarioEmpresa.IdQuestionarioEmpresa > 0)
            {
                this.Inovacao.Visible = true;
                List <EntPergunta> lista = new BllPergunta().ObterPerguntasPorQuestionarioEmpresa(objQuestionarioEmpresa.Questionario.IdQuestionario, objQuestionarioEmpresa.IdQuestionarioEmpresa, false);
                this.UCRelatorioPerguntaInovacao1.GerarPerguntas(lista, EnumType.Questionario.Inovacao, IsAvaliador, IdQuestionarioEmpresa);
            }
            else
            {
                this.Inovacao.Visible = false;
            }
        }
Ejemplo n.º 11
0
        protected void grdSimplificado_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int Index = ObjectUtils.ToInt(e.CommandArgument) - (grdSimplificado.PageIndex * grdSimplificado.PageSize);

            if (e.CommandName == "Gravar")
            {
                //Gravar
                DropDownList DrpDwnLstSenior = ((DropDownList)grdSimplificado.Rows[Index].FindControl("DrpDwnLstSenior"));

                if (DrpDwnLstSenior.SelectedIndex == 0)
                {
                    MessageBox(this, "Selecione o Consultor!");
                }
                else
                {
                    Label       lblIdEmpresaCadastro     = ((Label)grdSimplificado.Rows[Index].FindControl("lblIdEmpresaCadastro"));
                    Label       lblIdQuestionarioEmpresa = ((Label)grdSimplificado.Rows[Index].FindControl("lblIdQuestionarioEmpresa"));
                    ImageButton imgBtnSalvar             = ((ImageButton)grdSimplificado.Rows[Index].FindControl("ImgBttnGravar"));
                    int         IdEmpresaCadastro        = StringUtils.ToInt(((Label)this.grdSimplificado.Rows[Index].Cells[1].FindControl("lblIdEmpresaCadastro")).Text);
                    int         IdEtapa = StringUtils.ToInt(((Label)this.grdSimplificado.Rows[Index].Cells[1].FindControl("lblIdEtapa")).Text);

                    RelFiltroRanking objRelFiltroRanking = this.UCFiltroRanking1.GetFiltro(int.Parse(Request["TipoEtapaId"]));
                    foreach (EntQuestionarioEmpresa qe in new BllQuestionarioEmpresa().ObterQuestionarioEmpresaAtivoPorTurmaEmpresa(int.Parse(lblIdEmpresaCadastro.Text), objRelFiltroRanking.Turma))
                    {
                        EntQuestionarioEmpresaAvaliador objQuestionarioEmpresaAvaliador = new EntQuestionarioEmpresaAvaliador();

                        objQuestionarioEmpresaAvaliador.QuestionarioEmpresa.IdQuestionarioEmpresa = qe.IdQuestionarioEmpresa;
                        objQuestionarioEmpresaAvaliador.Usuario.IdUsuario = StringUtils.ToInt(DrpDwnLstSenior.SelectedValue);
                        objQuestionarioEmpresaAvaliador.Avaliado          = false;
                        objQuestionarioEmpresaAvaliador.Primario          = true;

                        new BllQuestionarioEmpresaAvaliador().Inserir(objQuestionarioEmpresaAvaliador);
                    }

                    new BllRelatorioRanking().EncaminharProximaEtapa(IdEmpresaCadastro, (int)EnumType.Questionario.Gestao, IdEtapa, false);

                    DrpDwnLstSenior.Enabled = false;
                    imgBtnSalvar.Visible    = false;
                }
            }
            else
            if (e.CommandName == "Desclassificar")
            {
                Label lblIdQuestionarioEmpresa = ((Label)grdSimplificado.Rows[Index].FindControl("lblIdQuestionarioEmpresa"));
                Label lblFlDesclassificado     = ((Label)grdSimplificado.Rows[Index].FindControl("lblFlDesclassificado"));

                int IdQuestionarioEmpresa = StringUtils.ToInt(lblIdQuestionarioEmpresa.Text);

                if (lblFlDesclassificado.Text == "True")
                {
                    EntQuestionarioEmpresa objQuestionarioEmpresa = new EntQuestionarioEmpresa();
                    objQuestionarioEmpresa.IdQuestionarioEmpresa = int.Parse(lblIdQuestionarioEmpresa.Text);
                    objQuestionarioEmpresa.Excluido = false;
                    new BllQuestionarioEmpresa().AlterarSomenteDesclassificar(objQuestionarioEmpresa);
                }
                else if (lblFlDesclassificado.Text == "False")
                {
                    switch (objPrograma.IdPrograma)
                    {
                    case (int)EnumType.Programa.MPE:
                        this.UCJustificativaRanking1.Show(IdQuestionarioEmpresa, (int)EnumType.TipoEtapaMpe.ClassificaçãoEstadual, EnumType.Questionario.Gestao);
                        break;

                    case (int)EnumType.Programa.FGA:
                        this.UCJustificativaRanking1.Show(IdQuestionarioEmpresa, (int)EnumType.TipoEtapaFga.ValidacaoAnaliseRespostas, EnumType.Questionario.Gestao);
                        break;

                    case (int)EnumType.Programa.PEG:
                        this.UCJustificativaRanking1.Show(IdQuestionarioEmpresa, (int)EnumType.TipoEtapaPeg.ValidacaoAnaliseRespostas, EnumType.Questionario.Gestao);
                        break;

                    default:
                        this.UCJustificativaRanking1.Show(IdQuestionarioEmpresa, (int)EnumType.TipoEtapaMpe.ClassificaçãoEstadual, EnumType.Questionario.Gestao);
                        break;
                    }
                }

                CheckBox ChckBxDesclassificar = ((CheckBox)grdSimplificado.Rows[Index].FindControl("ChckBxDesclassificar"));
                CheckBox ChckBxClassificar    = ((CheckBox)grdSimplificado.Rows[Index].FindControl("ChckBxClassificar"));

                ImageButton imgBttnDesclassificar = ((ImageButton)grdSimplificado.Rows[Index].FindControl("imgBttnDesclassificar"));
                ImageButton ImgBttnClassificar    = ((ImageButton)grdSimplificado.Rows[Index].FindControl("ImgBttnClassificar"));

                if (ChckBxDesclassificar.Checked)
                {
                    imgBttnDesclassificar.ImageUrl = "~/Image/unchecked.gif";
                    ChckBxDesclassificar.Checked   = false;
                    HabilitaDesabilitaBotao(ImgBttnClassificar, true);
                }
                else
                {
                    imgBttnDesclassificar.ImageUrl = "~/Image/checked.gif";
                    ChckBxDesclassificar.Checked   = true;
                    HabilitaDesabilitaBotao(ImgBttnClassificar, false);
                }
            }
            else if (e.CommandName == "Visualizar")
            {
                RelFiltroRanking objRelFiltroRanking = this.UCFiltroRanking1.GetFiltro(int.Parse(Request["TipoEtapaId"]));
                int IdTurma           = objRelFiltroRanking.Turma;
                int IdEmpresaCadastro = StringUtils.ToInt(((Label)grdSimplificado.Rows[Index].FindControl("lblIdQuestionarioEmpresa")).Text);
                this.UCVisualizarAutodiagnosticoInicial1.Visualiar(IdEmpresaCadastro, IdTurma);
            }
            else if (e.CommandName == "Update")
            {
                CheckBox           ChckBxClassificar        = ((CheckBox)grdSimplificado.Rows[Index].FindControl("ChckBxClassificar"));
                Label              lblIdEmpresaCadastro     = ((Label)grdSimplificado.Rows[Index].FindControl("lblIdEmpresaCadastro"));
                Label              lblIdQuestionarioEmpresa = ((Label)grdSimplificado.Rows[Index].FindControl("lblIdQuestionarioEmpresa"));
                Label              lblIdEstado         = ((Label)grdSimplificado.Rows[Index].FindControl("lblIdEstado"));
                Label              lblIdEtapa          = ((Label)grdSimplificado.Rows[Index].FindControl("lblIdEtapa"));
                RelFiltroRanking   objRelFiltroRanking = this.UCFiltroRanking1.GetFiltro(int.Parse(Request["TipoEtapaId"]));
                DropDownList       DrpDwnLstSenior     = ((DropDownList)grdSimplificado.Rows[Index].FindControl("DrpDwnLstSenior"));
                EntEmpresaCadastro objEmpresaCadastro  = new BllEmpresaCadastro().ObterPorId(int.Parse(lblIdEmpresaCadastro.Text));

                if (!ChckBxClassificar.Checked)
                {
                    List <EntAdmUsuario> ListaUser = new BllAdmUsuario().ObterPorFuncionalidade("Avaliações", objEmpresaCadastro.Estado.IdEstado, objPrograma.IdPrograma, objRelFiltroRanking.Turma);
                    DrpDwnLstSenior.Items.Clear();
                    DrpDwnLstSenior.DataSource = ListaUser;
                    DrpDwnLstSenior.DataBind();
                    DrpDwnLstSenior.Items.Insert(0, new ListItem("<< Selecionar >>", "0"));
                    DrpDwnLstSenior.SelectedValue = "0";
                }
                else
                {
                    EntEtapa objEtapa = new BllEtapa().ObterProximaEtapaPorEtapaEstadoOrdem(int.Parse(lblIdEtapa.Text));

                    new BllQuestionarioEmpresaAvaliador().RemoverPorQuestionarioEmpresa(int.Parse(lblIdQuestionarioEmpresa.Text));
                    new BllQuestionarioEmpresa().AlterarSomentePassaProximaEtapa(int.Parse(lblIdQuestionarioEmpresa.Text));
                    new BllQuestionarioEmpresa().DesabilitaAnteriores(int.Parse(lblIdEmpresaCadastro.Text), objEtapa.IdEtapa, EntQuestionario.QUESTIONARIO_GESTAO_2011);
                }
            }
            else if (e.CommandName == "Download")
            {
                Boolean comentarios = false;
                Int32   intro       = 0;
                String  estado      = null;
                String  categoria   = null;
                String  protocolo   = ((Label)grdSimplificado.Rows[Index].Cells[8].Controls[1]).Text;
                Int32   programaId  = objPrograma.IdPrograma;
                Boolean avaliador   = false;
                String  caminho     = "";

                List <EntQuestionarioEmpresa> listQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterPorProtocolo(protocolo);

                if (listQuestionarioEmpresa != null)
                {
                    List <EntEmpresaCadastro> listEmpresaCadastro = new BllEmpresaCadastro().ObterPorIdPrograma(listQuestionarioEmpresa[0].EmpresaCadastro.IdEmpresaCadastro, programaId);

                    if (listEmpresaCadastro != null)
                    {
                        caminho = new PaginaBase().gerarRelatorioPDF(listEmpresaCadastro[0].IdEmpresaCadastro.ToString(), listEmpresaCadastro[0].CPF_CNPJ, listQuestionarioEmpresa[0].IdQuestionarioEmpresa.ToString(), protocolo, estado, categoria, comentarios, programaId, objTurma.IdTurma, BooleanUtils.ToInt(avaliador), intro, false, this.Page);
                        if (caminho != "")
                        {
                            NovaJanela(this.Page, caminho);
                        }
                    }
                }
            }
        }
Ejemplo n.º 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (IdQuestionario == -1)
                {
                    PnlFundo.Visible = false;
                }
                else
                {
                    if (FlObrigatorio)
                    {
                        this.LblTipo.Text          = "Obrigatório";
                        this.BtnParticipar.Visible = false;
                    }
                    else
                    {
                        this.LblTipo.Text = "Opcional";
                    }
                    this.LblNome.Text        = LblTitulo;
                    this.LblPorcentagem.Text = NuPorcentagem + " % Concluído";
                    this.BtnResponder.Attributes.Add("IdQuestionario", IdQuestionario.ToString());
                    this.BtnParticipar.Attributes.Add("IdQuestionario", IdQuestionario.ToString());

                    if (FlParticipa)
                    {
                        this.BtnParticipar.ImageUrl    = "/Image/queroPreencher_selecionado.png";
                        this.BtnParticipar.PostBackUrl = "~/Paginas/Empresa/SelecionaQuestionario.aspx?IdQuestionario=" + this.IdQuestionario + "&QueroParticipar=0";
                        EntQuestionarioEmpresa questionarioAberto = new BllQuestionarioEmpresa().ObterQuestionarioAberto(this.IdQuestionario, this.IdEmpCadastro, this.IdTurma);
                        EntPergunta            proximaPergunta    = new BllPergunta().ObterProximaPerguntaQuestionario(questionarioAberto.IdQuestionarioEmpresa, this.IdQuestionario);
                        this.BtnResponder.PostBackUrl = "~/Paginas/Empresa/RespondePerguntaQuestionario.aspx?IdQuestionario=" + this.IdQuestionario + "&IdQuestionarioEmpresa=" + questionarioAberto.IdQuestionarioEmpresa + "&IdEmpresaCadastro=" + IdEmpCadastro + "&IdTurma=" + IdTurma + "&IdPergunta=" + proximaPergunta.IdPergunta;
                    }
                    else
                    {
                        this.BtnParticipar.ImageUrl    = "/Image/queroPreencher_nao_selecionado.png";
                        this.BtnParticipar.PostBackUrl = "~/Paginas/Empresa/SelecionaQuestionario.aspx?IdQuestionario=" + this.IdQuestionario + "&QueroParticipar=1";
                        this.BtnResponder.Enabled      = false;
                    }
                    if (FlObrigatorio)
                    {
                        this.BtnParticipar.Enabled = false;
                    }

                    if (!FlInscricaoAberta)
                    {
                        this.BtnResponder.Enabled = false;
                        this.BtnResponder.Style.Add("cursor", "default");
                        this.BtnParticipar.Enabled = false;
                        this.BtnParticipar.Style.Add("cursor", "default");
                    }
                }

                if (NuOrdem == 1)
                {
                    this.LtrQuebraLinhaInicio.Text = "<tr>";
                }
                else if (NuOrdem == 4)
                {
                    this.LtrQuebraLinhaFim.Text = "</tr>";
                }
            }
        }
Ejemplo n.º 13
0
        public void UpdateControls()
        {
            this.ImgBttnVerificarRelatorios.Enabled = false;
            this.ImgBttnVerificarRelatorios.Style.Add("cursor", "default");

            // Preencher Cadastro
            EntTurmaEmpresa objTurmaEmpresa = new EntTurmaEmpresa();

            objTurmaEmpresa.Turma.IdTurma = objTurma.IdTurma;
            objTurmaEmpresa.EmpresaCadastro.IdEmpresaCadastro = EmpresaLogada.IdEmpresaCadastro;
            objTurmaEmpresa = new BllTurmaEmpresa().ObterPorTurmaEmpresa(objTurmaEmpresa);
            this.ImgBttnPreencherCadastro.Enabled = true;
            if (this.Page.Title == "Cadastro Inscrição Empresa")
            {
                this.ImgBttnPreencherCadastro.ImageUrl = "~/Image/PreencheCadastro-Az.png";
            }
            else if ((EmpresaLogada.IdEmpresaCadastro == 0 || objTurmaEmpresa.CPFContato == "") && this.Page.Title != "Cadastro Inscrição Empresa")
            {
                this.ImgBttnPreencherCadastro.ImageUrl = "~/Image/PreencheCadastro.png";
            }
            else
            {
                this.ImgBttnPreencherCadastro.ImageUrl = "~/Image/PreencheCadastro-Vd.png";
            }


            // Responder Questionário
            List <EntQuestionarioEmpresa> lstQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterQuestionarioPorTurmaEmpresa(this.EmpresaLogada.IdEmpresaCadastro, this.objTurma.IdTurma);

            if (lstQuestionarioEmpresa == null)
            {
                this.ImgBttnResponderQuestionario.Enabled = false;
                this.ImgBttnResponderQuestionario.Style.Add("cursor", "default");
                this.ImgBttnResponderQuestionario.ImageUrl = "~/Image/ResponderQuest-C.png";

                // Enviar Questionário
                this.ImgBttnEnviarQuestionario.Enabled = false;
                this.ImgBttnEnviarQuestionario.Style.Add("cursor", "default");
                this.ImgBttnEnviarQuestionario.ImageUrl = "~/Image/EnviaQuestionario-C.png";
            }
            else
            {
                List <EntQuestionario> listaQuestionarios = new BllQuestionario().ObterAbertosPorIdTurmaIdEmpresa(this.objTurma.IdTurma, this.EmpresaLogada.IdEmpresaCadastro);

                Boolean bHistorico = false;
                Boolean bParticipa = false;

                foreach (EntQuestionario eq in listaQuestionarios)
                {
                    if (eq.EmpresaParticipa)
                    {
                        bParticipa = true;
                        if (eq.Obrigatorio)
                        {
                            if (eq.PorcentagemPreenchida > 0 && eq.PorcentagemPreenchida < 100)
                            {
                                bHistorico = true;
                                break;
                            }
                        }
                        else
                        {
                            if (eq.PorcentagemPreenchida >= 0 && eq.PorcentagemPreenchida < 100)
                            {
                                bHistorico = true;
                                break;
                            }
                        }
                    }
                }

                if (bHistorico && bParticipa)
                {
                    this.ImgBttnResponderQuestionario.Enabled = true;
                    this.ImgBttnResponderQuestionario.Style.Add("cursor", "pointer");
                    this.ImgBttnResponderQuestionario.ImageUrl = "~/Image/ResponderQuest-A.png";

                    // Enviar Questionário
                    this.ImgBttnEnviarQuestionario.Enabled = false;
                    this.ImgBttnEnviarQuestionario.Style.Add("cursor", "default");
                    this.ImgBttnEnviarQuestionario.ImageUrl = "~/Image/EnviaQuestionario-C.png";
                }
                else
                {
                    bHistorico = listaQuestionarios.Count > 0;
                    bParticipa = false;
                    foreach (EntQuestionario eq in listaQuestionarios)
                    {
                        if (eq.EmpresaParticipa)
                        {
                            bParticipa = true;
                            if (eq.PorcentagemPreenchida < 100)
                            {
                                bHistorico = false;
                                break;
                            }
                        }
                    }


                    if (bHistorico && bParticipa)
                    {
                        this.ImgBttnResponderQuestionario.Enabled = true;
                        this.ImgBttnResponderQuestionario.Style.Add("cursor", "pointer");
                        this.ImgBttnResponderQuestionario.ImageUrl = "~/Image/ResponderQuest-Vd.png";

                        // Enviar Questionário
                        this.ImgBttnEnviarQuestionario.Enabled = true;
                        this.ImgBttnEnviarQuestionario.Style.Add("cursor", "pointer");
                        this.ImgBttnEnviarQuestionario.ImageUrl = "~/Image/EnviaQuestionario-Vm.png";

                        // Gerar Relatório

                        EntEtapa objEtapa = new BllEtapa().ObterPorTipoEtapaTurmaEstado(EntTipoEtapa.TIPO_ETAPA_FGA_INSCRICAO_AUTODIAGNOSTICO_EMPRESA, this.objTurma.IdTurma, EmpresaLogada.Estado.IdEstado);

                        lstQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterQuestionarioEmpresaAtivoPorEmpresaEtapa(this.EmpresaLogada.IdEmpresaCadastro, objEtapa.IdEtapa);



                        //


                        Int32 nEmpresaParticipa = 0;
                        foreach (EntQuestionario eq in listaQuestionarios)
                        {
                            if (eq.EmpresaParticipa)
                            {
                                nEmpresaParticipa++;
                            }
                        }

                        Boolean bRelatorioGerado   = false;
                        Int32   nEnviaQuestionario = 0;
                        foreach (EntQuestionarioEmpresa eq in lstQuestionarioEmpresa)
                        {
                            if (eq.EnviaQuestionario)
                            {
                                nEnviaQuestionario++;
                            }

                            bRelatorioGerado = eq.RelatorioGerado;
                        }

                        if (nEmpresaParticipa != nEnviaQuestionario)
                        {
                            this.ImgBttnVerificarRelatorios.Enabled = false;
                            this.ImgBttnVerificarRelatorios.Style.Add("cursor", "default");
                            this.ImgBttnVerificarRelatorios.ImageUrl = "~/Image/GerarRelatorio-C.png";
                        }
                        else
                        {
                            this.ImgBttnVerificarRelatorios.Enabled = true;
                            this.ImgBttnVerificarRelatorios.Style.Add("cursor", "pointer");
                            this.ImgBttnVerificarRelatorios.ImageUrl = "~/Image/GerarRelatorio-Vm.png";

                            // Enviar Questionário
                            this.ImgBttnEnviarQuestionario.Enabled = true;
                            this.ImgBttnEnviarQuestionario.Style.Add("cursor", "pointer");
                            this.ImgBttnEnviarQuestionario.ImageUrl = "~/Image/EnviaQuestionario-Vd.png";
                        }

                        if (bRelatorioGerado)
                        {
                            this.ImgBttnVerificarRelatorios.Enabled = true;
                            this.ImgBttnVerificarRelatorios.Style.Add("cursor", "pointer");
                            this.ImgBttnVerificarRelatorios.ImageUrl = "~/Image/GerarRelatorio-Vd.png";
                        }
                    }
                    else
                    {
                        this.ImgBttnResponderQuestionario.Enabled = true;
                        this.ImgBttnResponderQuestionario.Style.Add("cursor", "pointer");
                        this.ImgBttnResponderQuestionario.ImageUrl = "~/Image/ResponderQuest-Vm.png";

                        // Enviar Questionário
                        this.ImgBttnEnviarQuestionario.Enabled = false;
                        this.ImgBttnEnviarQuestionario.Style.Add("cursor", "default");
                        this.ImgBttnEnviarQuestionario.ImageUrl = "~/Image/EnviaQuestionario-C.png";
                    }
                }
            }
        }
Ejemplo n.º 14
0
        protected void grdRanking_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int index = ObjectUtils.ToInt(e.CommandArgument) - (grdRanking.PageIndex * grdRanking.PageSize);

            int  IdQuestionarioEmpresa = StringUtils.ToInt(((Label)this.grdRanking.Rows[index].Cells[0].FindControl("lblIdQuestionarioEmpresa")).Text);
            int  IdEmpresaCadastro     = StringUtils.ToInt(((Label)this.grdRanking.Rows[index].Cells[1].FindControl("lblIdEmpresaCadastro")).Text);
            int  IdEtapa             = StringUtils.ToInt(((Label)this.grdRanking.Rows[index].Cells[2].FindControl("lblIdEtapa")).Text);
            bool FlPassaProximaEtapa = StringUtils.ToBoolean(((Label)this.grdRanking.Rows[index].Cells[2].FindControl("lblFlPassaProximaEtapa")).Text);

            if (e.CommandName == "Devolver")
            {
                switch (objPrograma.IdPrograma)
                {
                case (int)EnumType.Programa.FGA:
                    this.UCJustificativaRanking1.Show(IdQuestionarioEmpresa, (int)EnumType.TipoEtapaFga.ValidacaoAnaliseRespostas, EnumType.Questionario.Gestao);
                    break;

                case (int)EnumType.Programa.PEG:
                    this.UCJustificativaRanking1.Show(IdQuestionarioEmpresa, (int)EnumType.TipoEtapaPeg.ValidacaoAnaliseRespostas, EnumType.Questionario.Gestao);
                    break;
                }
            }
            else if (e.CommandName == "FinalistaGestao")
            {
                if (FlPassaProximaEtapa)
                {
                    new BllRelatorioRanking().EncaminharEtapaAnterior(IdEmpresaCadastro, (int)EnumType.Questionario.Gestao, IdEtapa, false);
                }
                else
                {
                    new BllRelatorioRanking().EncaminharProximaEtapa(IdEmpresaCadastro, (int)EnumType.Questionario.Gestao, IdEtapa, false);
                }
            }
            else if (e.CommandName == "Desclassificar")
            {
                Label lblIdQuestionarioEmpresa = ((Label)grdRanking.Rows[index].FindControl("lblIdQuestionarioEmpresa"));
                Label lblFlDesclassificado     = ((Label)grdRanking.Rows[index].FindControl("lblFlDesclassificado"));

                if (lblFlDesclassificado.Text == "True")
                {
                    EntQuestionarioEmpresa objQuestionarioEmpresa = new EntQuestionarioEmpresa();
                    objQuestionarioEmpresa.IdQuestionarioEmpresa = int.Parse(lblIdQuestionarioEmpresa.Text);
                    objQuestionarioEmpresa.Excluido = false;
                    new BllQuestionarioEmpresa().AlterarSomenteDesclassificar(objQuestionarioEmpresa);
                }
                else if (lblFlDesclassificado.Text == "False")
                {
                    this.UCJustificativaRanking1.Show(IdQuestionarioEmpresa, (int)EnumType.TipoEtapaFga.ValidacaoAnaliseRespostas, EnumType.Questionario.Gestao);
                }

                CheckBox ChckBxDesclassificar = ((CheckBox)grdRanking.Rows[index].FindControl("ChckBxDesclassificar"));
                CheckBox ChckBxClassificar    = ((CheckBox)grdRanking.Rows[index].FindControl("ChckBxClassificar"));

                ImageButton imgBttnDesclassificar = ((ImageButton)grdRanking.Rows[index].FindControl("imgBttnDesclassificar"));
                ImageButton ImgBttnClassificar    = ((ImageButton)grdRanking.Rows[index].FindControl("ImgBttnClassificar"));

                if (ChckBxDesclassificar.Checked)
                {
                    imgBttnDesclassificar.ImageUrl = "~/Image/unchecked.gif";
                    ChckBxDesclassificar.Checked   = false;
                    ImgBttnClassificar.Enabled     = true;
                }
                else
                {
                    imgBttnDesclassificar.ImageUrl = "~/Image/checked.gif";
                    ChckBxDesclassificar.Checked   = true;
                    ImgBttnClassificar.Enabled     = false;
                }
            }
            else if (e.CommandName == "Download")
            {
                Boolean comentarios = false;
                Int32   intro       = 0;
                String  estado      = null;
                String  categoria   = null;
                String  protocolo   = ((Label)grdRanking.Rows[index].Cells[7].Controls[1]).Text;
                Int32   programaId  = objPrograma.IdPrograma;
                Boolean avaliador   = false;
                String  caminho     = "";

                List <EntQuestionarioEmpresa> listQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterPorProtocolo(protocolo);

                if (listQuestionarioEmpresa != null)
                {
                    List <EntEmpresaCadastro> listEmpresaCadastro = new BllEmpresaCadastro().ObterPorIdPrograma(listQuestionarioEmpresa[0].EmpresaCadastro.IdEmpresaCadastro, programaId);

                    if (listEmpresaCadastro != null)
                    {
                        caminho = new PaginaBase().gerarRelatorioPDF(listEmpresaCadastro[0].IdEmpresaCadastro.ToString(), listEmpresaCadastro[0].CPF_CNPJ, listQuestionarioEmpresa[0].IdQuestionarioEmpresa.ToString(), protocolo, estado, categoria, comentarios, programaId, objTurma.IdTurma, BooleanUtils.ToInt(avaliador), intro, false, this.Page);
                        if (caminho != "")
                        {
                            NovaJanela(this.Page, caminho);
                        }
                    }
                }
            }
            else if (e.CommandName == "DownloadRa")
            {
                Boolean comentarios = false;
                Int32   intro       = 0;
                String  estado      = null;
                String  categoria   = null;
                String  protocolo   = ((Label)grdRanking.Rows[index].Cells[7].Controls[1]).Text;
                Int32   programaId  = objPrograma.IdPrograma;
                String  caminho     = "";

                List <EntQuestionarioEmpresa> listQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterPorProtocolo(protocolo);

                if (listQuestionarioEmpresa != null)
                {
                    List <EntEmpresaCadastro> listEmpresaCadastro = new BllEmpresaCadastro().ObterPorIdPrograma(listQuestionarioEmpresa[0].EmpresaCadastro.IdEmpresaCadastro, programaId);

                    if (listEmpresaCadastro != null)
                    {
                        caminho = new PaginaBase().gerarRelatorioPDF(listEmpresaCadastro[0].IdEmpresaCadastro.ToString(), listEmpresaCadastro[0].CPF_CNPJ, listQuestionarioEmpresa[0].IdQuestionarioEmpresa.ToString(), protocolo, estado, categoria, comentarios, programaId, objTurma.IdTurma, 1, intro, false, this.Page);
                        if (caminho != "")
                        {
                            NovaJanela(this.Page, caminho);
                        }
                    }
                }
            }
            PopulaGridEmpresa();
        }
Ejemplo n.º 15
0
        private void ObjectToPage()
        {
            String Justificativa = String.Empty;
            EntQuestionarioEmpresa          objQuestionarioEmpresa;
            EntQuestionarioEmpresaAvaliador objQuestionarioEmpresaAvaliador;

            switch (StringUtils.ToEnum <EnumType.TipoEtapaMpe>(HddnFldProximaEtapa.Value))
            {
            case EnumType.TipoEtapaMpe.InscriçãoCandidaturaEmpresa:

                break;

            case EnumType.TipoEtapaMpe.InscriçãoCandidaturaAdministrativo:

                break;

            case EnumType.TipoEtapaMpe.ClassificaçãoEstadual:

                objQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterPorId(StringUtils.ToInt(HddnFldIdQuestionarioEmpresa.Value));

                Justificativa = objQuestionarioEmpresa.MotivoExcluiu;

                break;

            case EnumType.TipoEtapaMpe.AvaliacaoEstadual:

                objQuestionarioEmpresaAvaliador = new BllQuestionarioEmpresaAvaliador().ObterPorIdQuestionarioEmpresa(StringUtils.ToInt(HddnFldIdQuestionarioEmpresa.Value))[0];

                Justificativa = objQuestionarioEmpresaAvaliador.MotivoDevolucao;

                break;

            case EnumType.TipoEtapaMpe.JulgamentoFinalistasEstaduais:

                break;

            case EnumType.TipoEtapaMpe.EncerramentoEstadual:


                break;

            case EnumType.TipoEtapaMpe.ClassificacaoNacional:

                objQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterPorId(StringUtils.ToInt(HddnFldIdQuestionarioEmpresa.Value));

                Justificativa = objQuestionarioEmpresa.MotivoVenceu;

                break;

            case EnumType.TipoEtapaMpe.AvaliacaoNacional:

                break;

            case EnumType.TipoEtapaMpe.JulgamentoFinalistasNacionais:

                break;

            case EnumType.TipoEtapaMpe.EncerramentoNacional:

                objQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterPorId(StringUtils.ToInt(HddnFldIdQuestionarioEmpresa.Value));

                Justificativa = objQuestionarioEmpresa.MotivoVenceu;

                break;
            }

            this.TxtBxJustificativa.Text = Justificativa;
        }
Ejemplo n.º 16
0
        private void ObjectToPage(Int32 IdQuestionarioEmpresa)
        {
            OcultaUserControls();
            this.HddnFldIdQuestionarioEmpresa.Value = IdQuestionarioEmpresa.ToString();
            EntQuestionarioEmpresa objQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterPorId(IdQuestionarioEmpresa);

            switch (objQuestionarioEmpresa.Questionario.IdQuestionario)
            {
            case EntQuestionario.QUESTIONARIO_EMPREENDEDORISMO_2009:
            case EntQuestionario.QUESTIONARIO_EMPREENDEDORISMO_2011:
                this.UCAdministrativoEmpreendedorismo1.SetValores(objQuestionarioEmpresa.Questionario.IdQuestionario, IdQuestionarioEmpresa, objQuestionarioEmpresa.EmpresaCadastro.IdEmpresaCadastro, objTurma.IdTurma);

                this.UCAdministrativoEmpreendedorismo1.Visible = true;

                this.UCAdministrativoGestao1.Dispose();
                this.UCAdministrativoGestao20111.Dispose();
                this.UCAdministrativoResponsabilidadeSocial20111.Dispose();
                this.UCAdministrativoResponsabilidadeSocial1.Dispose();
                this.UCAdministrativoInovacao1.Dispose();
                break;

            case EntQuestionario.QUESTIONARIO_RESPONSABILIDADE_2009:
                this.UCAdministrativoResponsabilidadeSocial1.SetValores(objQuestionarioEmpresa.Questionario.IdQuestionario, IdQuestionarioEmpresa, objQuestionarioEmpresa.EmpresaCadastro.IdEmpresaCadastro, objTurma.IdTurma);

                this.UCAdministrativoResponsabilidadeSocial1.Visible = true;

                this.UCAdministrativoGestao1.Dispose();
                this.UCAdministrativoGestao20111.Dispose();
                this.UCAdministrativoResponsabilidadeSocial20111.Dispose();
                this.UCAdministrativoEmpreendedorismo1.Dispose();
                this.UCAdministrativoInovacao1.Dispose();
                break;

            case EntQuestionario.QUESTIONARIO_RESPONSABILIDADE_2011:
                this.UCAdministrativoResponsabilidadeSocial20111.SetValores(objQuestionarioEmpresa.Questionario.IdQuestionario, IdQuestionarioEmpresa, objQuestionarioEmpresa.EmpresaCadastro.IdEmpresaCadastro, objTurma.IdTurma);

                this.UCAdministrativoResponsabilidadeSocial20111.Visible = true;

                this.UCAdministrativoGestao1.Dispose();
                this.UCAdministrativoGestao20111.Dispose();
                this.UCAdministrativoEmpreendedorismo1.Dispose();
                this.UCAdministrativoResponsabilidadeSocial1.Dispose();
                this.UCAdministrativoInovacao1.Dispose();
                break;

            case EntQuestionario.QUESTIONARIO_GESTAO_2009:
                this.UCAdministrativoGestao1.SetValores(objQuestionarioEmpresa.Questionario.IdQuestionario, IdQuestionarioEmpresa, objQuestionarioEmpresa.EmpresaCadastro.IdEmpresaCadastro, objTurma.IdTurma);

                this.UCAdministrativoGestao1.Visible = true;

                this.UCAdministrativoEmpreendedorismo1.Dispose();
                this.UCAdministrativoGestao20111.Dispose();
                this.UCAdministrativoResponsabilidadeSocial20111.Dispose();
                this.UCAdministrativoResponsabilidadeSocial1.Dispose();
                this.UCAdministrativoInovacao1.Dispose();
                break;

            case EntQuestionario.QUESTIONARIO_GESTAO_2011:
                this.UCAdministrativoGestao20111.SetValores(objQuestionarioEmpresa.Questionario.IdQuestionario, IdQuestionarioEmpresa, objQuestionarioEmpresa.EmpresaCadastro.IdEmpresaCadastro, objTurma.IdTurma);

                this.UCAdministrativoGestao20111.Visible = true;

                this.UCAdministrativoGestao1.Dispose();
                this.UCAdministrativoEmpreendedorismo1.Dispose();
                this.UCAdministrativoResponsabilidadeSocial20111.Dispose();
                this.UCAdministrativoResponsabilidadeSocial1.Dispose();
                this.UCAdministrativoInovacao1.Dispose();
                break;

            case EntQuestionario.QUESTIONARIO_INOVACAO_2011:
                this.UCAdministrativoInovacao1.SetValores(objQuestionarioEmpresa.Questionario.IdQuestionario, IdQuestionarioEmpresa, objQuestionarioEmpresa.EmpresaCadastro.IdEmpresaCadastro, objTurma.IdTurma);

                this.UCAdministrativoInovacao1.Visible = true;

                this.UCAdministrativoGestao1.Dispose();
                this.UCAdministrativoGestao20111.Dispose();
                this.UCAdministrativoResponsabilidadeSocial20111.Dispose();
                this.UCAdministrativoResponsabilidadeSocial1.Dispose();
                this.UCAdministrativoEmpreendedorismo1.Dispose();
                break;
            }
        }
Ejemplo n.º 17
0
        private void EncaminharProximaEtapa()
        {
            EntQuestionarioEmpresa          objQuestionarioEmpresa;
            EntQuestionarioEmpresaAvaliador objQuestionarioEmpresaAvaliador;

            switch (StringUtils.ToEnum <EnumType.TipoEtapaMpe>(HddnFldProximaEtapa.Value))
            {
            case EnumType.TipoEtapaMpe.ClassificaçãoEstadual:
                objQuestionarioEmpresa = new EntQuestionarioEmpresa();
                objQuestionarioEmpresa.IdQuestionarioEmpresa = StringUtils.ToInt(HddnFldIdQuestionarioEmpresa.Value);
                objQuestionarioEmpresa.MotivoExcluiu         = TxtBxJustificativa.Text.ToString();
                objQuestionarioEmpresa.Excluido      = true;
                objQuestionarioEmpresa.ParaAvaliador = true;
                new BllQuestionarioEmpresa().AlterarSomenteDesclassificar(objQuestionarioEmpresa);
                break;

            case EnumType.TipoEtapaMpe.AvaliacaoEstadual:
            case EnumType.TipoEtapaMpe.AvaliacaoNacional:
                objQuestionarioEmpresaAvaliador = new EntQuestionarioEmpresaAvaliador();
                objQuestionarioEmpresaAvaliador.QuestionarioEmpresa.IdQuestionarioEmpresa = StringUtils.ToInt(HddnFldIdQuestionarioEmpresa.Value);
                objQuestionarioEmpresaAvaliador.MotivoDevolucao = TxtBxJustificativa.Text.ToString();
                objQuestionarioEmpresaAvaliador.QuestionarioEmpresa.ParaAvaliador = true;
                new BllRelatorioRanking().DevolverParaAvaliador(objQuestionarioEmpresaAvaliador);
                break;

            case EnumType.TipoEtapaMpe.EncerramentoNacional:
            case EnumType.TipoEtapaMpe.ClassificacaoNacional:
            case EnumType.TipoEtapaMpe.JulgamentoFinalistasEstaduais:
            case EnumType.TipoEtapaMpe.JulgamentoFinalistasNacionais:
                objQuestionarioEmpresa = new EntQuestionarioEmpresa();
                objQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterPorId(StringUtils.ToInt(HddnFldIdQuestionarioEmpresa.Value));
                objQuestionarioEmpresa.Questionario.IdQuestionario = StringUtils.ToInt(HddnFldIdQuestionario.Value);
                objQuestionarioEmpresa.Etapa.TipoEtapa.IdTipoEtapa = StringUtils.ToInt(HddnFldProximaEtapa.Value);
                objQuestionarioEmpresa.MotivoVenceu = TxtBxJustificativa.Text.ToString();
                new BllRelatorioRanking().EncaminharProximaEtapa(objQuestionarioEmpresa.EmpresaCadastro.IdEmpresaCadastro, objQuestionarioEmpresa.Questionario.IdQuestionario, objQuestionarioEmpresa.Etapa.IdEtapa, true);
                break;
            }
            switch (StringUtils.ToEnum <EnumType.TipoEtapaPeg>(HddnFldProximaEtapa.Value))
            {
            case EnumType.TipoEtapaPeg.ValidacaoAnaliseRespostas:
                objQuestionarioEmpresa = new EntQuestionarioEmpresa();
                objQuestionarioEmpresa.IdQuestionarioEmpresa = StringUtils.ToInt(HddnFldIdQuestionarioEmpresa.Value);
                objQuestionarioEmpresa.MotivoExcluiu         = TxtBxJustificativa.Text.ToString();
                objQuestionarioEmpresa.Excluido      = true;
                objQuestionarioEmpresa.ParaAvaliador = true;
                new BllQuestionarioEmpresa().AlterarSomenteDesclassificar(objQuestionarioEmpresa);
                break;

            case EnumType.TipoEtapaPeg.VisitaPreviaPreClassificadas:
            case EnumType.TipoEtapaPeg.PlanoEmpresarialFase2:
            case EnumType.TipoEtapaPeg.GestãoDoResultadoFase3:
            case EnumType.TipoEtapaPeg.NovoCicloFase4:
                objQuestionarioEmpresa = new EntQuestionarioEmpresa();
                objQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterPorId(StringUtils.ToInt(HddnFldIdQuestionarioEmpresa.Value));
                objQuestionarioEmpresa.Questionario.IdQuestionario = StringUtils.ToInt(HddnFldIdQuestionario.Value);
                objQuestionarioEmpresa.Etapa.TipoEtapa.IdTipoEtapa = StringUtils.ToInt(HddnFldProximaEtapa.Value);
                objQuestionarioEmpresa.MotivoVenceu = TxtBxJustificativa.Text.ToString();
                new BllRelatorioRanking().EncaminharProximaEtapa(objQuestionarioEmpresa.EmpresaCadastro.IdEmpresaCadastro, objQuestionarioEmpresa.Questionario.IdQuestionario, objQuestionarioEmpresa.Etapa.IdEtapa, false);

                break;
            }
            switch (StringUtils.ToEnum <EnumType.TipoEtapaFga>(HddnFldProximaEtapa.Value))
            {
            case EnumType.TipoEtapaFga.ValidacaoAnaliseRespostas:
                objQuestionarioEmpresa = new EntQuestionarioEmpresa();
                objQuestionarioEmpresa.IdQuestionarioEmpresa = StringUtils.ToInt(HddnFldIdQuestionarioEmpresa.Value);
                objQuestionarioEmpresa.MotivoExcluiu         = TxtBxJustificativa.Text.ToString();
                objQuestionarioEmpresa.Excluido      = true;
                objQuestionarioEmpresa.ParaAvaliador = true;
                new BllQuestionarioEmpresa().AlterarSomenteDesclassificar(objQuestionarioEmpresa);
                break;

            case EnumType.TipoEtapaFga.VisitaPreviaPreClassificadas:
            case EnumType.TipoEtapaFga.NovoCicloFase4:
                objQuestionarioEmpresa = new EntQuestionarioEmpresa();
                objQuestionarioEmpresa = new BllQuestionarioEmpresa().ObterPorId(StringUtils.ToInt(HddnFldIdQuestionarioEmpresa.Value));
                objQuestionarioEmpresa.Questionario.IdQuestionario = StringUtils.ToInt(HddnFldIdQuestionario.Value);
                objQuestionarioEmpresa.Etapa.TipoEtapa.IdTipoEtapa = StringUtils.ToInt(HddnFldProximaEtapa.Value);
                objQuestionarioEmpresa.MotivoVenceu = TxtBxJustificativa.Text.ToString();
                new BllRelatorioRanking().EncaminharProximaEtapa(objQuestionarioEmpresa.EmpresaCadastro.IdEmpresaCadastro, objQuestionarioEmpresa.Questionario.IdQuestionario, objQuestionarioEmpresa.Etapa.IdEtapa, false);
                break;
            }
        }