Beispiel #1
0
        private void PopulaQuestionarios()
        {
            List <EntQuestionario> listaQuestionarios = new BllQuestionario().ObterResumoPorIdTurmaIdEmpresa(this.objTurma.IdTurma, this.EmpresaLogada.IdEmpresaCadastro);

            cdcatalog.DataSource = listaQuestionarios;
            cdcatalog.DataBind();
        }
Beispiel #2
0
        private void AtualizaGridPerguntas()
        {
            List <EntQuestionario> listaQuestionarios = new BllQuestionario().ObterAbertosPorIdTurmaIdEmpresa(int.Parse(HddnFldIdTurma.Value), int.Parse(HddnFldIdEmpresaCadastro.Value));

            this.grdPerguntas.DataSource = listaQuestionarios;
            this.grdPerguntas.DataBind();
            this.grdPerguntas.SelectedIndex = -1;
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.HdnIdQuestionario.Value        = IdQuestionario.ToString();
                this.HdnIdQuestionarioEmpresa.Value = IdQuestionarioEmpresa.ToString();
                this.HdnIdEmpresaCadastro.Value     = IdEmpresaCadastro.ToString();
                this.HdnIdTurma.Value    = IdTurma.ToString();
                this.HdnIdPergunta.Value = Pergunta.IdPergunta.ToString();

                this.lblPergunta.Text       = this.Pergunta.Pergunta;
                this.lblNumeroPergunta.Text = this.Pergunta.NumeroQuestao;
                this.lblPerguntaAjuda.Text  = this.Pergunta.SaibaMais;
                this.cmbCriterios.Items.Clear();
                this.botaoJustificativa.Style.Add("display", "none");

                EntQuestionario q = new BllQuestionario().ObterPorIdTurmaIdQuestionarioEmpresa(IdTurma, IdQuestionarioEmpresa);
                porcent.InnerHtml        = q.PorcentagemPreenchida + "% preenchido";
                barraPercent.Style.Value = "width:" + q.PorcentagemPreenchida + "%";
                if (this.isUltimaPergunta(q.IdQuestionario, Pergunta.IdPergunta))
                {
                    this.BtnProximo.ImageUrl = "/Image/finalizar.gif";
                }

                foreach (EntCriterio c in new BllCriterio().ObterPorQuestionarioComPerguntas(IdQuestionario))
                {
                    ListItem li = new ListItem();
                    li.Text  = c.Criterio;
                    li.Value = c.IdCriterio.ToString();
                    if (c.IdCriterio.Equals(this.Pergunta.Criterio.IdCriterio))
                    {
                        li.Selected = true;
                        this.lblCriterioAjuda.Text = c.Ajuda;
                    }
                    this.cmbCriterios.Items.Add(li);
                }

                this.respostaSim.Attributes.Add("onClick", "mostraAjuda('" + this.botaoJustificativa.ClientID + "')");
                this.respostaNao.Attributes.Add("onClick", "escondeAjuda('" + this.botaoJustificativa.ClientID + "')");

                this.TxtJustificativa.Text = this.Pergunta.QuestionarioEmpresaResposta.Justificativa;
                if (this.Pergunta.QuestionarioEmpresaResposta.RespostaBool)
                {
                    this.respostaSim.Checked = true;
                    this.botaoJustificativa.Style.Add("display", "block");
                }
                else if (!this.Pergunta.QuestionarioEmpresaResposta.RespostaBool)
                {
                    this.respostaNao.Checked = true;
                    this.botaoJustificativa.Style.Add("display", "none");
                }
            }
        }
Beispiel #4
0
        private void PopulaQuestionarios()
        {
            List <EntQuestionario> listaQuestionarios = new BllQuestionario().ObterAbertosPorIdTurmaIdEmpresa(this.objTurma.IdTurma, this.EmpresaLogada.IdEmpresaCadastro);
            EntEtapa etapaInscricao = verificaEtapaInscricaoAberta();
            int      i = 1;

            foreach (EntQuestionario eq in listaQuestionarios)
            {
                object[] temp = new object[9];
                temp[0] = eq.IdQuestionario;
                temp[1] = i;
                temp[2] = eq.Questionario;
                temp[3] = eq.PorcentagemPreenchida;
                temp[4] = eq.Obrigatorio;
                temp[5] = eq.EmpresaParticipa;
                temp[6] = this.EmpresaLogada.IdEmpresaCadastro;
                temp[7] = this.objTurma.IdTurma;
                temp[8] = etapaInscricao.Ativo;
                Control QuestionarioControlTemp = LoadControl("~/User Controls/Questionario/UCSelecionaQuestionarioEmpresa.ascx", temp);
                if (i < 4)
                {
                    i++;
                }
                else
                {
                    i = 1;
                }
                this.PnlQuestionarios.Controls.Add(QuestionarioControlTemp);
            }
            while (i < 4)
            {
                Control  QuestionarioControlTemp;
                object[] temp = new object[9];
                temp[0] = -1;
                temp[1] = i;
                temp[2] = "";
                temp[3] = -1;
                temp[4] = false;
                temp[5] = false;
                temp[6] = -1;
                temp[7] = -1;
                temp[8] = false;
                QuestionarioControlTemp = LoadControl("~/User Controls/Questionario/UCSelecionaQuestionarioEmpresa.ascx", temp);
                this.PnlQuestionarios.Controls.Add(QuestionarioControlTemp);
                i++;
            }

            listaQuestionarios   = new BllQuestionario().ObterResumoPorIdTurmaIdEmpresa(this.objTurma.IdTurma, this.EmpresaLogada.IdEmpresaCadastro);
            cdcatalog.DataSource = listaQuestionarios;
            cdcatalog.DataBind();
        }
Beispiel #5
0
        private void VerificaJaEnviado()
        {
            List <EntQuestionario> listaQuestionariosEnviados = new BllQuestionario().ObterEnviadosPorIdTurmaIdEmpresa(this.objTurma.IdTurma, this.EmpresaLogada.IdEmpresaCadastro);

            if (listaQuestionariosEnviados.Count > 0)
            {
                PnlQuestionarios.Style.Add("display", "block");
                BtnEnviar.Style.Add("display", "block");
                LblJaEnviado.Text  = "O Questionário de Autoavaliação já foi enviado. O número do Protocolo é " + listaQuestionariosEnviados[0].Protocolo + ".";
                BtnEnviar.ImageUrl = "/Image/_file_send3.png";
            }
            else
            {
                LblJaEnviado.Visible = false;
            }
        }
Beispiel #6
0
        protected Boolean habilitaEnvioQuestionario()
        {
            List <EntQuestionario> listaQuestionarios = new BllQuestionario().ObterAbertosPorIdTurmaIdEmpresa(this.objTurma.IdTurma, this.EmpresaLogada.IdEmpresaCadastro);
            Boolean preenchimentoFinalizado           = true;

            foreach (EntQuestionario eq in listaQuestionarios)
            {
                if (eq.EmpresaParticipa)
                {
                    if (eq.PorcentagemPreenchida < 100)
                    {
                        preenchimentoFinalizado = false;
                    }
                }
            }
            return(preenchimentoFinalizado);
        }
Beispiel #7
0
        private Boolean VerificaQuestionariosPreenchidos()
        {
            List <EntQuestionario> listaQuestionarios = new BllQuestionario().ObterAbertosPorIdTurmaIdEmpresa(int.Parse(HddnFldIdTurma.Value), int.Parse(HddnFldIdEmpresaCadastro.Value));
            Boolean preenchimentoFinalizado           = true;

            foreach (EntQuestionario eq in listaQuestionarios)
            {
                if (eq.EmpresaParticipa)
                {
                    if (eq.PorcentagemPreenchida < 100)
                    {
                        preenchimentoFinalizado = false;
                    }
                }
            }
            return(preenchimentoFinalizado);
        }
Beispiel #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.HdnIdQuestionario.Value        = IdQuestionario.ToString();
                this.HdnIdQuestionarioEmpresa.Value = IdQuestionarioEmpresa.ToString();
                this.HdnIdEmpresaCadastro.Value     = IdEmpresaCadastro.ToString();
                this.HdnIdTurma.Value    = IdTurma.ToString();
                this.HdnIdPergunta.Value = Pergunta.IdPergunta.ToString();

                this.lblPergunta.Text       = this.Pergunta.Pergunta;
                this.lblNumeroPergunta.Text = this.Pergunta.NumeroQuestao;
                this.lblPerguntaAjuda.Text  = this.Pergunta.SaibaMais;
                this.cmbCriterios.Items.Clear();

                EntQuestionario q = new BllQuestionario().ObterPorIdTurmaIdQuestionarioEmpresa(IdTurma, IdQuestionarioEmpresa);
                porcent.InnerHtml        = q.PorcentagemPreenchida + "% preenchido";
                barraPercent.Style.Value = "width:" + q.PorcentagemPreenchida + "%";
                if (this.isUltimaPergunta(q.IdQuestionario, Pergunta.IdPergunta))
                {
                    this.BtnProximo.ImageUrl = "/Image/finalizar.gif";
                }

                foreach (EntCriterio c in new BllCriterio().ObterPorQuestionarioComPerguntas(IdQuestionario))
                {
                    ListItem li = new ListItem();
                    li.Text  = c.Criterio;
                    li.Value = c.IdCriterio.ToString();
                    if (c.IdCriterio.Equals(this.Pergunta.Criterio.IdCriterio))
                    {
                        li.Selected = true;
                        this.lblCriterioAjuda.Text = c.Ajuda;
                    }
                    this.cmbCriterios.Items.Add(li);
                }

                if (this.Pergunta.QuestionarioEmpresaResposta.RespostaTexto != null)
                {
                    this.TxtResposta.Text = this.Pergunta.QuestionarioEmpresaResposta.RespostaTexto;
                }
            }
        }
Beispiel #9
0
        private void VerificaJaEnviado()
        {
            List <EntQuestionario> listaQuestionariosEnviados = new BllQuestionario().ObterEnviadosPorIdTurmaIdEmpresa(this.objTurma.IdTurma, this.EmpresaLogada.IdEmpresaCadastro);

            if (listaQuestionariosEnviados.Count > 0)
            {
                PnlQuestionarios.Style.Add("display", "block");
                BtnEnviar.Style.Add("display", "block");
                LblJaEnviado.Text          = "O autodiagnóstico já foi enviado. O número do protocolo é " + listaQuestionariosEnviados[0].Protocolo + ".";
                LblEnviaQuestionario.Text  = "Para acessar o Relatório de Autodiagnóstico com os pontos fortes e oportunidades de melhorias para sua empresa, clique na seta \"Histórico de Relatórios\".";
                LblEnviaQuestionario2.Text = "Para reenviar o seu autodiagnóstico, caso tenha feito alguma alteração, selecione a opção REENVIAR.";
                BtnEnviar.ImageUrl         = "/Image/_file_send3.png";
            }
            else
            {
                LblJaEnviado.Visible       = false;
                LblEnviaQuestionario.Text  = "Para enviar o seu autodiagnóstico selecione a opção ENVIAR.";
                LblEnviaQuestionario2.Text = "Após o envio para acessar o Relatório de Autodiagnóstico com os pontos fortes e oportunidades de melhorias para sua empresa, clique na seta \"Histórico de Relatórios\".";
            }
        }
Beispiel #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.HdnIdQuestionario.Value        = IdQuestionario.ToString();
                this.HdnIdQuestionarioEmpresa.Value = IdQuestionarioEmpresa.ToString();
                this.HdnIdEmpresaCadastro.Value     = IdEmpresaCadastro.ToString();
                this.HdnIdTurma.Value    = IdTurma.ToString();
                this.HdnIdPergunta.Value = Pergunta.IdPergunta.ToString();

                this.lblPergunta.Text        = this.Pergunta.Pergunta;
                this.lblNumeroPergunta.Text  = this.Pergunta.NumeroQuestao;
                this.lblPerguntaAjuda.Text   = this.Pergunta.SaibaMais;
                this.lblRespostaA.Text       = this.Pergunta.ListPerguntaResposta[0].PerguntaResposta;
                this.hdnRespostaA_Just.Value = this.Pergunta.ListPerguntaResposta[0].PossuiJustificativa.ToString();
                this.tickRespA.Style.Add("display", "none");
                this.lblRespostaB.Text       = this.Pergunta.ListPerguntaResposta[1].PerguntaResposta;
                this.hdnRespostaB_Just.Value = this.Pergunta.ListPerguntaResposta[1].PossuiJustificativa.ToString();
                this.tickRespB.Style.Add("display", "none");
                this.lblRespostaC.Text       = this.Pergunta.ListPerguntaResposta[2].PerguntaResposta;
                this.hdnRespostaC_Just.Value = this.Pergunta.ListPerguntaResposta[2].PossuiJustificativa.ToString();
                this.tickRespC.Style.Add("display", "none");
                this.lblRespostaD.Text       = this.Pergunta.ListPerguntaResposta[3].PerguntaResposta;
                this.hdnRespostaD_Just.Value = this.Pergunta.ListPerguntaResposta[3].PossuiJustificativa.ToString();
                this.tickRespD.Style.Add("display", "none");
                this.cmbCriterios.Items.Clear();
                this.botaoJustificativa.Style.Add("display", "none");

                EntQuestionario q = new BllQuestionario().ObterPorIdTurmaIdQuestionarioEmpresa(IdTurma, IdQuestionarioEmpresa);
                porcent.InnerHtml        = q.PorcentagemPreenchida + "% preenchido";
                barraPercent.Style.Value = "width:" + q.PorcentagemPreenchida + "%";
                if (this.isUltimaPergunta(q.IdQuestionario, Pergunta.IdPergunta))
                {
                    this.BtnProximo.ImageUrl = "/Image/finalizar.gif";
                }

                foreach (EntCriterio c in new BllCriterio().ObterPorQuestionarioComPerguntas(IdQuestionario))
                {
                    ListItem li = new ListItem();
                    li.Text  = c.Criterio;
                    li.Value = c.IdCriterio.ToString();
                    if (c.IdCriterio.Equals(this.Pergunta.Criterio.IdCriterio))
                    {
                        li.Selected = true;
                        this.lblCriterioAjuda.Text = c.Ajuda;
                    }
                    this.cmbCriterios.Items.Add(li);
                }
                if (this.Pergunta.QuestionarioEmpresaResposta != null && this.Pergunta.QuestionarioEmpresaResposta.QuestionarioEmpresa != null)
                {
                    if (this.Pergunta.QuestionarioEmpresaResposta.Resposta.PossuiJustificativa)
                    {
                        this.TxtJustificativa.Text      = this.Pergunta.QuestionarioEmpresaResposta.Justificativa;
                        this.HddnFldJustificativa.Value = this.Pergunta.QuestionarioEmpresaResposta.Justificativa;
                        this.botaoJustificativa.Style.Add("display", "block");
                    }
                    if (this.Pergunta.QuestionarioEmpresaResposta.Resposta.IdPerguntaResposta == this.Pergunta.ListPerguntaResposta[0].IdPerguntaResposta)
                    {
                        this.respostaSelecionada.Value = "A";
                        this.tickRespA.Style.Add("display", "block");
                        this.coluna1RespostaA.Style.Add("background-color", "#89AFF5");
                        this.coluna2RespostaA.Style.Add("background-color", "#89AFF5");
                        this.respostaA.Style.Add("background-color", "#89AFF5");
                    }
                    else if (this.Pergunta.QuestionarioEmpresaResposta.Resposta.IdPerguntaResposta == this.Pergunta.ListPerguntaResposta[1].IdPerguntaResposta)
                    {
                        this.respostaSelecionada.Value = "B";
                        this.tickRespB.Style.Add("display", "block");
                        this.coluna1RespostaB.Style.Add("background-color", "#89AFF5");
                        this.coluna2RespostaB.Style.Add("background-color", "#89AFF5");
                        this.respostaB.Style.Add("background-color", "#89AFF5");
                    }
                    else if (this.Pergunta.QuestionarioEmpresaResposta.Resposta.IdPerguntaResposta == this.Pergunta.ListPerguntaResposta[2].IdPerguntaResposta)
                    {
                        this.respostaSelecionada.Value = "C";
                        this.tickRespC.Style.Add("display", "block");
                        this.coluna1RespostaC.Style.Add("background-color", "#89AFF5");
                        this.coluna2RespostaC.Style.Add("background-color", "#89AFF5");
                        this.respostaC.Style.Add("background-color", "#89AFF5");
                    }
                    else if (this.Pergunta.QuestionarioEmpresaResposta.Resposta.IdPerguntaResposta == this.Pergunta.ListPerguntaResposta[3].IdPerguntaResposta)
                    {
                        this.respostaSelecionada.Value = "D";
                        this.tickRespD.Style.Add("display", "block");
                        this.coluna1RespostaD.Style.Add("background-color", "#89AFF5");
                        this.coluna2RespostaD.Style.Add("background-color", "#89AFF5");
                        this.respostaD.Style.Add("background-color", "#89AFF5");
                    }
                }
            }
        }
Beispiel #11
0
        private void PopulaPergunta()
        {
            EntQuestionario questionario = new BllQuestionario().ObterPorId(IdQuestionario);

            this.lblNomeQuestionario.Text = questionario.Questionario;
            if (IdUsuarioLogado > 0)
            {
                String cnpj = new BllEmpresaCadastro().ObterPorId(IdEmpresaCadastro).CPF_CNPJ;
                this.lblNomeQuestionario.Text = this.lblNomeQuestionario.Text + " - Empresa: " + cnpj;
            }

            if (questionario.PreenchimentoRapido || this.IdUsuarioLogado > 0)
            {
                switch (questionario.IdQuestionario)
                {
                case EntQuestionario.QUESTIONARIO_EMPREENDEDORISMO_2009:
                case EntQuestionario.QUESTIONARIO_EMPREENDEDORISMO_2011:
                    this.UCAdministrativoEmpreendedorismo1.IdQuestionario        = IdQuestionario;
                    this.UCAdministrativoEmpreendedorismo1.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
                    this.UCAdministrativoEmpreendedorismo1.IdEmpresaCadastro     = IdEmpresaCadastro;
                    this.UCAdministrativoEmpreendedorismo1.IdTurma = IdTurma;

                    this.UCAdministrativoEmpreendedorismo1.Visible = true;

                    this.UCAdministrativoGestao1.Dispose();
                    this.UCAdministrativoGestao2011_1.Dispose();
                    this.UCPerguntaEspecialGestao32_1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial1.Dispose();
                    this.UCPerguntaEspecialGestao311.Dispose();
                    this.UCPerguntaMultiplaEscolha4Opcoes1.Dispose();
                    this.UCPerguntaSimNao1.Dispose();
                    this.UCPerguntaTexto1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial11.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial61.Dispose();
                    this.UCAdministrativoInovacao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial2011_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.Dispose();
                    break;

                case EntQuestionario.QUESTIONARIO_RESPONSABILIDADE_2009:
                    this.UCAdministrativoResponsabilidadeSocial1.IdQuestionario        = IdQuestionario;
                    this.UCAdministrativoResponsabilidadeSocial1.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
                    this.UCAdministrativoResponsabilidadeSocial1.IdEmpresaCadastro     = IdEmpresaCadastro;
                    this.UCAdministrativoResponsabilidadeSocial1.IdTurma = IdTurma;

                    this.UCAdministrativoResponsabilidadeSocial1.Visible = true;

                    this.UCAdministrativoEmpreendedorismo1.Dispose();
                    this.UCAdministrativoGestao1.Dispose();
                    this.UCPerguntaEspecialGestao311.Dispose();
                    this.UCAdministrativoGestao2011_1.Dispose();
                    this.UCPerguntaEspecialGestao32_1.Dispose();
                    this.UCPerguntaMultiplaEscolha4Opcoes1.Dispose();
                    this.UCPerguntaSimNao1.Dispose();
                    this.UCPerguntaTexto1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial11.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial61.Dispose();
                    this.UCAdministrativoInovacao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial2011_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.Dispose();
                    break;

                case EntQuestionario.QUESTIONARIO_RESPONSABILIDADE_2011:
                    this.UCAdministrativoResponsabilidadeSocial2011_1.IdQuestionario        = IdQuestionario;
                    this.UCAdministrativoResponsabilidadeSocial2011_1.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
                    this.UCAdministrativoResponsabilidadeSocial2011_1.IdEmpresaCadastro     = IdEmpresaCadastro;
                    this.UCAdministrativoResponsabilidadeSocial2011_1.IdTurma = IdTurma;

                    this.UCAdministrativoResponsabilidadeSocial2011_1.Visible = true;

                    this.UCAdministrativoEmpreendedorismo1.Dispose();
                    this.UCAdministrativoGestao1.Dispose();
                    this.UCPerguntaEspecialGestao311.Dispose();
                    this.UCAdministrativoGestao2011_1.Dispose();
                    this.UCPerguntaEspecialGestao32_1.Dispose();
                    this.UCPerguntaMultiplaEscolha4Opcoes1.Dispose();
                    this.UCPerguntaSimNao1.Dispose();
                    this.UCPerguntaTexto1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial11.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial61.Dispose();
                    this.UCAdministrativoInovacao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.Dispose();
                    break;

                case EntQuestionario.QUESTIONARIO_GESTAO_2009:
                    this.UCAdministrativoGestao1.IdQuestionario        = IdQuestionario;
                    this.UCAdministrativoGestao1.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
                    this.UCAdministrativoGestao1.IdEmpresaCadastro     = IdEmpresaCadastro;
                    this.UCAdministrativoGestao1.IdTurma = IdTurma;

                    this.UCAdministrativoGestao1.Visible = true;

                    this.UCAdministrativoEmpreendedorismo1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial1.Dispose();
                    this.UCAdministrativoGestao2011_1.Dispose();
                    this.UCPerguntaEspecialGestao32_1.Dispose();
                    this.UCPerguntaEspecialGestao311.Dispose();
                    this.UCPerguntaMultiplaEscolha4Opcoes1.Dispose();
                    this.UCPerguntaSimNao1.Dispose();
                    this.UCPerguntaTexto1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial11.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial61.Dispose();
                    this.UCAdministrativoInovacao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial2011_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.Dispose();
                    break;

                case EntQuestionario.QUESTIONARIO_GESTAO_2011:
                    this.UCAdministrativoGestao2011_1.IdQuestionario        = IdQuestionario;
                    this.UCAdministrativoGestao2011_1.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
                    this.UCAdministrativoGestao2011_1.IdEmpresaCadastro     = IdEmpresaCadastro;
                    this.UCAdministrativoGestao2011_1.IdTurma = IdTurma;

                    this.UCAdministrativoGestao2011_1.Visible = true;

                    this.UCAdministrativoEmpreendedorismo1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial1.Dispose();
                    this.UCAdministrativoGestao1.Dispose();
                    this.UCPerguntaEspecialGestao32_1.Dispose();
                    this.UCPerguntaEspecialGestao311.Dispose();
                    this.UCPerguntaMultiplaEscolha4Opcoes1.Dispose();
                    this.UCPerguntaSimNao1.Dispose();
                    this.UCPerguntaTexto1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial11.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial61.Dispose();
                    this.UCAdministrativoInovacao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial2011_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.Dispose();
                    break;

                case EntQuestionario.QUESTIONARIO_INOVACAO_2011:
                    this.UCAdministrativoInovacao1.IdQuestionario        = IdQuestionario;
                    this.UCAdministrativoInovacao1.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
                    this.UCAdministrativoInovacao1.IdEmpresaCadastro     = IdEmpresaCadastro;
                    this.UCAdministrativoGestao2011_1.IdTurma            = IdTurma;

                    this.UCAdministrativoInovacao1.Visible = true;

                    this.UCAdministrativoEmpreendedorismo1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial1.Dispose();
                    this.UCAdministrativoGestao1.Dispose();
                    this.UCPerguntaEspecialGestao32_1.Dispose();
                    this.UCPerguntaEspecialGestao311.Dispose();
                    this.UCPerguntaMultiplaEscolha4Opcoes1.Dispose();
                    this.UCPerguntaSimNao1.Dispose();
                    this.UCPerguntaTexto1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial11.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial61.Dispose();
                    this.UCAdministrativoGestao2011_1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial2011_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.Dispose();
                    break;
                }
            }
            else
            {
                EntPergunta proximaPergunta = new BllPergunta().ObterPerguntaPorQuestionarioEmpresaPergunta(IdQuestionarioEmpresa, IdPergunta, false);

                switch (proximaPergunta.PerguntaTipo.IdPerguntaTipo)
                {
                case EntPerguntaTipo.PERGUNTA_TIPO_MULTIPLA_ESCOLHA_4_OPCOES:
                    this.UCPerguntaMultiplaEscolha4Opcoes1.Pergunta              = proximaPergunta;
                    this.UCPerguntaMultiplaEscolha4Opcoes1.IdQuestionario        = IdQuestionario;
                    this.UCPerguntaMultiplaEscolha4Opcoes1.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
                    this.UCPerguntaMultiplaEscolha4Opcoes1.IdEmpresaCadastro     = IdEmpresaCadastro;
                    this.UCPerguntaMultiplaEscolha4Opcoes1.IdTurma = IdTurma;

                    this.UCPerguntaMultiplaEscolha4Opcoes1.Visible = true;

                    this.UCAdministrativoEmpreendedorismo1.Dispose();
                    this.UCAdministrativoGestao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial1.Dispose();
                    this.UCPerguntaEspecialGestao311.Dispose();
                    this.UCPerguntaSimNao1.Dispose();
                    this.UCPerguntaTexto1.Dispose();
                    this.UCAdministrativoGestao2011_1.Dispose();
                    this.UCPerguntaEspecialGestao32_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial11.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial61.Dispose();
                    this.UCAdministrativoInovacao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial2011_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.Dispose();
                    break;

                case EntPerguntaTipo.PERGUNTA_TIPO_MULTIPLA_ESCOLHA_3_OPCOES:
                    this.UCPerguntaMultiplaEscolha4Opcoes1.Pergunta              = proximaPergunta;
                    this.UCPerguntaMultiplaEscolha4Opcoes1.IdQuestionario        = IdQuestionario;
                    this.UCPerguntaMultiplaEscolha4Opcoes1.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
                    this.UCPerguntaMultiplaEscolha4Opcoes1.IdEmpresaCadastro     = IdEmpresaCadastro;
                    this.UCPerguntaMultiplaEscolha4Opcoes1.IdTurma = IdTurma;

                    this.UCPerguntaMultiplaEscolha4Opcoes1.Visible = true;

                    this.UCAdministrativoEmpreendedorismo1.Dispose();
                    this.UCAdministrativoGestao1.Dispose();
                    this.UCAdministrativoGestao2011_1.Dispose();
                    this.UCPerguntaEspecialGestao32_1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial1.Dispose();
                    this.UCPerguntaEspecialGestao311.Dispose();
                    this.UCPerguntaMultiplaEscolha4Opcoes1.Dispose();
                    this.UCPerguntaSimNao1.Dispose();
                    this.UCPerguntaTexto1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial11.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial61.Dispose();
                    this.UCAdministrativoInovacao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial2011_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.Dispose();
                    break;

                case EntPerguntaTipo.PERGUNTA_TIPO_TEXTO:
                    this.UCPerguntaTexto1.Pergunta              = proximaPergunta;
                    this.UCPerguntaTexto1.IdQuestionario        = IdQuestionario;
                    this.UCPerguntaTexto1.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
                    this.UCPerguntaTexto1.IdEmpresaCadastro     = IdEmpresaCadastro;
                    this.UCPerguntaTexto1.IdTurma = IdTurma;

                    this.UCPerguntaTexto1.Visible = true;

                    this.UCAdministrativoEmpreendedorismo1.Dispose();
                    this.UCAdministrativoGestao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial1.Dispose();
                    this.UCAdministrativoGestao2011_1.Dispose();
                    this.UCPerguntaEspecialGestao32_1.Dispose();
                    this.UCPerguntaEspecialGestao311.Dispose();
                    this.UCPerguntaMultiplaEscolha4Opcoes1.Dispose();
                    this.UCPerguntaSimNao1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial11.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial61.Dispose();
                    this.UCAdministrativoInovacao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial2011_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.Dispose();
                    break;

                case EntPerguntaTipo.PERGUNTA_TIPO_SIM_NAO:
                    this.UCPerguntaSimNao1.Pergunta              = proximaPergunta;
                    this.UCPerguntaSimNao1.IdQuestionario        = IdQuestionario;
                    this.UCPerguntaSimNao1.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
                    this.UCPerguntaSimNao1.IdEmpresaCadastro     = IdEmpresaCadastro;
                    this.UCPerguntaSimNao1.IdTurma = IdTurma;

                    this.UCPerguntaSimNao1.Visible = true;

                    this.UCAdministrativoEmpreendedorismo1.Dispose();
                    this.UCAdministrativoGestao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial1.Dispose();
                    this.UCPerguntaEspecialGestao311.Dispose();
                    this.UCAdministrativoGestao2011_1.Dispose();
                    this.UCPerguntaEspecialGestao32_1.Dispose();
                    this.UCPerguntaMultiplaEscolha4Opcoes1.Dispose();
                    this.UCPerguntaTexto1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial11.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial61.Dispose();
                    this.UCAdministrativoInovacao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial2011_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.Dispose();
                    break;

                case EntPerguntaTipo.PERGUNTA_TIPO_ESPECIAL_31_QUESTIONARIO_GESTAO_2009_2010:
                    this.UCPerguntaEspecialGestao311.Pergunta              = proximaPergunta;
                    this.UCPerguntaEspecialGestao311.IdQuestionario        = IdQuestionario;
                    this.UCPerguntaEspecialGestao311.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
                    this.UCPerguntaEspecialGestao311.IdEmpresaCadastro     = IdEmpresaCadastro;
                    this.UCPerguntaEspecialGestao311.IdTurma = IdTurma;

                    this.UCPerguntaEspecialGestao311.Visible = true;

                    this.UCAdministrativoEmpreendedorismo1.Dispose();
                    this.UCAdministrativoGestao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial1.Dispose();
                    this.UCPerguntaMultiplaEscolha4Opcoes1.Dispose();
                    this.UCAdministrativoGestao2011_1.Dispose();
                    this.UCPerguntaEspecialGestao32_1.Dispose();
                    this.UCPerguntaSimNao1.Dispose();
                    this.UCPerguntaTexto1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial11.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial61.Dispose();
                    this.UCAdministrativoInovacao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial2011_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.Dispose();
                    break;

                case EntPerguntaTipo.PERGUNTA_TIPO_ESPECIAL_32_QUESTIONARIO_GESTAO_2011:
                    this.UCPerguntaEspecialGestao32_1.Pergunta              = proximaPergunta;
                    this.UCPerguntaEspecialGestao32_1.IdQuestionario        = IdQuestionario;
                    this.UCPerguntaEspecialGestao32_1.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
                    this.UCPerguntaEspecialGestao32_1.IdEmpresaCadastro     = IdEmpresaCadastro;
                    this.UCPerguntaEspecialGestao32_1.IdTurma = IdTurma;

                    this.UCPerguntaEspecialGestao32_1.Visible = true;

                    this.UCAdministrativoEmpreendedorismo1.Dispose();
                    this.UCAdministrativoGestao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial1.Dispose();
                    this.UCPerguntaMultiplaEscolha4Opcoes1.Dispose();
                    this.UCPerguntaSimNao1.Dispose();
                    this.UCPerguntaTexto1.Dispose();
                    this.UCAdministrativoGestao2011_1.Dispose();
                    this.UCPerguntaEspecialGestao311.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial11.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial61.Dispose();
                    this.UCAdministrativoInovacao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial2011_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.Dispose();
                    break;

                case EntPerguntaTipo.PERGUNTA_TIPO_ESPECIAL_1_QUESTIONARIO_RESPONSABILIDADE_SOCIAL_2009_2010:
                    this.UCPerguntaEspecialResponsabilidadeSocial11.Pergunta              = proximaPergunta;
                    this.UCPerguntaEspecialResponsabilidadeSocial11.IdQuestionario        = IdQuestionario;
                    this.UCPerguntaEspecialResponsabilidadeSocial11.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
                    this.UCPerguntaEspecialResponsabilidadeSocial11.IdEmpresaCadastro     = IdEmpresaCadastro;
                    this.UCPerguntaEspecialResponsabilidadeSocial11.IdTurma = IdTurma;

                    this.UCPerguntaEspecialResponsabilidadeSocial11.Visible = true;

                    this.UCAdministrativoEmpreendedorismo1.Dispose();
                    this.UCAdministrativoGestao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial1.Dispose();
                    this.UCPerguntaMultiplaEscolha4Opcoes1.Dispose();
                    this.UCPerguntaSimNao1.Dispose();
                    this.UCAdministrativoGestao2011_1.Dispose();
                    this.UCPerguntaEspecialGestao32_1.Dispose();
                    this.UCPerguntaTexto1.Dispose();
                    this.UCPerguntaEspecialGestao311.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial61.Dispose();
                    this.UCAdministrativoInovacao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial2011_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.Dispose();
                    break;

                case EntPerguntaTipo.PERGUNTA_TIPO_ESPECIAL_6_QUESTIONARIO_RESPONSABILIDADE_SOCIAL_2009_2010:
                    this.UCPerguntaEspecialResponsabilidadeSocial61.Pergunta              = proximaPergunta;
                    this.UCPerguntaEspecialResponsabilidadeSocial61.IdQuestionario        = IdQuestionario;
                    this.UCPerguntaEspecialResponsabilidadeSocial61.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
                    this.UCPerguntaEspecialResponsabilidadeSocial61.IdEmpresaCadastro     = IdEmpresaCadastro;
                    this.UCPerguntaEspecialResponsabilidadeSocial61.IdTurma = IdTurma;

                    this.UCPerguntaEspecialResponsabilidadeSocial61.Visible = true;

                    this.UCAdministrativoEmpreendedorismo1.Dispose();
                    this.UCAdministrativoGestao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial1.Dispose();
                    this.UCAdministrativoInovacao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial2011_1.Dispose();
                    this.UCPerguntaSimNao1.Dispose();
                    this.UCPerguntaTexto1.Dispose();
                    this.UCPerguntaMultiplaEscolha4Opcoes1.Dispose();
                    this.UCAdministrativoGestao2011_1.Dispose();
                    this.UCPerguntaEspecialGestao32_1.Dispose();
                    this.UCPerguntaEspecialGestao311.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial11.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.Dispose();
                    break;

                case EntPerguntaTipo.PERGUNTA_TIPO_ESPECIAL_3_QUESTIONARIO_RESPONSABILIDADE_SOCIAL_2011:
                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.Pergunta              = proximaPergunta;
                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.IdQuestionario        = IdQuestionario;
                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.IdEmpresaCadastro     = IdEmpresaCadastro;
                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.IdTurma = IdTurma;

                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.Visible = true;

                    this.UCAdministrativoEmpreendedorismo1.Dispose();
                    this.UCAdministrativoGestao1.Dispose();
                    this.UCAdministrativoGestao2011_1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial1.Dispose();
                    this.UCAdministrativoInovacao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial2011_1.Dispose();
                    this.UCPerguntaMultiplaEscolha4Opcoes1.Dispose();
                    this.UCPerguntaSimNao1.Dispose();
                    this.UCPerguntaTexto1.Dispose();
                    this.UCPerguntaEspecialGestao311.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial61.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial11.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.Dispose();
                    this.UCPerguntaEspecialGestao32_1.Dispose();
                    break;

                case EntPerguntaTipo.PERGUNTA_TIPO_ESPECIAL_7A_QUESTIONARIO_RESPONSABILIDADE_SOCIAL_2011:
                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.Pergunta              = proximaPergunta;
                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.IdQuestionario        = IdQuestionario;
                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.IdEmpresaCadastro     = IdEmpresaCadastro;
                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.IdTurma = IdTurma;

                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.Visible = true;

                    this.UCAdministrativoEmpreendedorismo1.Dispose();
                    this.UCAdministrativoGestao1.Dispose();
                    this.UCAdministrativoGestao2011_1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial1.Dispose();
                    this.UCAdministrativoInovacao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial2011_1.Dispose();
                    this.UCPerguntaMultiplaEscolha4Opcoes1.Dispose();
                    this.UCPerguntaSimNao1.Dispose();
                    this.UCPerguntaTexto1.Dispose();
                    this.UCPerguntaEspecialGestao311.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial61.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial11.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.Dispose();
                    this.UCPerguntaEspecialGestao32_1.Dispose();
                    break;

                case EntPerguntaTipo.PERGUNTA_TIPO_ESPECIAL_8B_QUESTIONARIO_RESPONSABILIDADE_SOCIAL_2011:
                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.Pergunta              = proximaPergunta;
                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.IdQuestionario        = IdQuestionario;
                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.IdEmpresaCadastro     = IdEmpresaCadastro;
                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.IdTurma = IdTurma;

                    this.UCPerguntaEspecialResponsabilidadeSocial8b_1.Visible = true;

                    this.UCAdministrativoEmpreendedorismo1.Dispose();
                    this.UCAdministrativoGestao1.Dispose();
                    this.UCAdministrativoGestao2011_1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial1.Dispose();
                    this.UCAdministrativoInovacao1.Dispose();
                    this.UCAdministrativoResponsabilidadeSocial2011_1.Dispose();
                    this.UCPerguntaMultiplaEscolha4Opcoes1.Dispose();
                    this.UCPerguntaSimNao1.Dispose();
                    this.UCPerguntaTexto1.Dispose();
                    this.UCPerguntaEspecialGestao311.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial61.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial3_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial7a_1.Dispose();
                    this.UCPerguntaEspecialResponsabilidadeSocial11.Dispose();
                    this.UCPerguntaEspecialGestao32_1.Dispose();
                    break;
                }
            }
        }
Beispiel #12
0
        private void ObjectToPage(EntInscricoesEmpresa objInscricoesEmpresa, Boolean ImportacaoOutrosProgramas)
        {
            this.HddnFldEmpresaCadastro.Value = IntUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.EmpresaCadastro.IdEmpresaCadastro);
            this.HddnFldTurma.Value           = IntUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.Turma.IdTurma);

            this.PopulaTurma();
            SetSelectedItemInDropDownList(CmbBxTurma, IntUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.Turma.IdTurma));

            this.PopulaEstado();
            SetSelectedItemInDropDownList(CmbBxEstado, IntUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.Estado.IdEstado));

            this.PopulaCidade(objInscricoesEmpresa.TurmaEmpresa.Estado.IdEstado);
            SetSelectedItemInDropDownList(CmbBxCidade, IntUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.Cidade.IdCidade));

            this.PopulaBairro(objInscricoesEmpresa.TurmaEmpresa.Cidade.IdCidade);
            SetSelectedItemInDropDownList(CmbBxBairro, IntUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.Bairro.IdBairro));

            // Dados da Empresa
            this.TxtBxRazaoSocial.Text  = objInscricoesEmpresa.TurmaEmpresa.EmpresaCadastro.RazaoSocial;
            this.TxtBxNomeFantasia.Text = objInscricoesEmpresa.TurmaEmpresa.EmpresaCadastro.NomeFantasia;
            this.TxtBxCNPJCPF.Text      = FormatUtils.FormataCNPJ_CPF(objInscricoesEmpresa.TurmaEmpresa.EmpresaCadastro.CPF_CNPJ);

            this.TxtBxCNPJCPFValido.Text = this.TxtBxCNPJCPF.Text;

            this.TxtBxDataAbertura.Text       = DateUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.EmpresaCadastro.AberturaEmpresa);
            this.TxtBxEndereco.Text           = objInscricoesEmpresa.TurmaEmpresa.Endereco;
            this.TxtBxNumero.Text             = objInscricoesEmpresa.TurmaEmpresa.NumeroEndereco;
            this.TxtBxComplemento.Text        = objInscricoesEmpresa.TurmaEmpresa.Complemento;
            this.TxtBxCEP.Text                = FormatUtils.FormatCEP(objInscricoesEmpresa.TurmaEmpresa.CEP);
            this.TxtBxPrincipalAtividade.Text = objInscricoesEmpresa.TurmaEmpresa.AtividadeEconomicaComplemento;
            this.PopulaTipoEmpresa();
            SetSelectedItemInDropDownList(CmbBxTipoEmpresa, IntUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.TipoEmpresa.IdTipoEmpresa));

            if (!ImportacaoOutrosProgramas)
            {
                this.PopulaFaturamento(4);
                SetSelectedItemInDropDownList(CmbBxFaturamento, IntUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.Faturamento.IdFaturamento));
                this.TxtBxNumeroEmpregados.Text = IntUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.NumeroFuncionario);
            }

            this.PopulaCategoria(objInscricoesEmpresa.TurmaEmpresa.EmpresaCadastro.PessoaJuridica);
            SetSelectedItemInDropDownList(CmbBxCategoria, IntUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.Categoria.IdCategoria));

            this.PopulaAtividadeEconomica(objInscricoesEmpresa.TurmaEmpresa.AtividadeEconomica);

            // Dados do Contato
            this.TxtBxNomeCompleto.Text = objInscricoesEmpresa.TurmaEmpresa.NomeContato;
            this.TxtBxCPF.Text          = FormatUtils.FormatCPF(objInscricoesEmpresa.TurmaEmpresa.CPFContato);
            this.TxtBxCelular.Text      = FormatUtils.FormatTelefone(objInscricoesEmpresa.TurmaEmpresa.CelularContato);
            this.TxtBxEmail.Text        = objInscricoesEmpresa.TurmaEmpresa.EmailContato;

            this.TxtBxDtNascimento.Text       = DateUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.NascimentoContato);
            this.TxtBxEnderecoCompleto.Text   = objInscricoesEmpresa.TurmaEmpresa.EnderecoContato;
            this.TxtBxNumeroContato.Text      = objInscricoesEmpresa.TurmaEmpresa.NumeroEnderecoContato;
            this.TxtBxComplementoContato.Text = objInscricoesEmpresa.TurmaEmpresa.ComplementoContato;
            this.TxtBxCEPContato.Text         = FormatUtils.FormatCEP(objInscricoesEmpresa.TurmaEmpresa.CEPContato);
            this.TxtBxTelefoneFixo.Text       = FormatUtils.FormatTelefone(objInscricoesEmpresa.TurmaEmpresa.TelefoneContato);

            this.PopulaCargo();
            SetSelectedItemInDropDownList(CmbBxCargo, IntUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.Cargo.IdCargo));

            this.PopulaEstadoContato();
            SetSelectedItemInDropDownList(CmbBxEstadoContato, IntUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.EstadoContato.IdEstado));

            this.PopulaCidadeContato(objInscricoesEmpresa.TurmaEmpresa.EstadoContato.IdEstado);
            SetSelectedItemInDropDownList(CmbBxCidadeContato, IntUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.CidadeContato.IdCidade));

            this.PopulaBairroContato(objInscricoesEmpresa.TurmaEmpresa.CidadeContato.IdCidade);
            SetSelectedItemInDropDownList(CmbBxBairroContato, IntUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.BairroContato.IdBairro));

            this.PopulaNivelEscolaridade();
            SetSelectedItemInDropDownList(CmbBxNivelEscolaridade, IntUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.ContatoNivelEscolaridade.IdContatoNivelEscolaridade));

            SetSelectedItemInDropDownList(RdBttnLstSexo, objInscricoesEmpresa.TurmaEmpresa.SexoContato);

            List <EntQuestionario> listaQuestionarios = new BllQuestionario().ObterAbertosPorIdTurmaIdEmpresa(this.objTurma.IdTurma, this.EmpresaLogada.IdEmpresaCadastro);

            foreach (EntQuestionario eq in listaQuestionarios)
            {
                if (eq.IdQuestionario == EntQuestionario.QUESTIONARIO_INOVACAO_2011)
                {
                    if (eq.EmpresaParticipa)
                    {
                        Destaque2.SelectedValue = "1";
                    }
                    else
                    {
                        Destaque2.SelectedValue = "0";
                    }
                }
                else if (eq.IdQuestionario == EntQuestionario.QUESTIONARIO_RESPONSABILIDADE_2011)
                {
                    if (eq.EmpresaParticipa)
                    {
                        Destaque1.SelectedValue = "1";
                    }
                    else
                    {
                        Destaque1.SelectedValue = "0";
                    }
                }
                else if (eq.IdQuestionario == EntQuestionario.QUESTIONARIO_EMPREENDEDORISMO_2011)
                {
                    if (eq.EmpresaParticipa)
                    {
                        Destaque3.SelectedValue = "1";
                    }
                    else
                    {
                        Destaque3.SelectedValue = "0";
                    }
                }
            }

            // Teste de AutoAvaliação
            this.RdBttnLstPergunta1.SelectedValue = BooleanUtils.ToInt(objInscricoesEmpresa.TurmaEmpresa.Pergunta1).ToString();
            this.RdBttnLstPergunta2.SelectedValue = BooleanUtils.ToInt(objInscricoesEmpresa.TurmaEmpresa.Pergunta2).ToString();
            this.RdBttnLstPergunta3.SelectedValue = BooleanUtils.ToInt(objInscricoesEmpresa.TurmaEmpresa.Pergunta3).ToString();
            this.RdBttnLstPergunta4.SelectedValue = BooleanUtils.ToInt(objInscricoesEmpresa.TurmaEmpresa.Pergunta4).ToString();
        }
Beispiel #13
0
        private void PopulaQuestionarios(EntEtapa etapaInscricao)
        {
            List <EntQuestionario> listaQuestionariosEnviados = new BllQuestionario().ObterEnviadosPorIdTurmaIdEmpresa(this.objTurma.IdTurma, this.EmpresaLogada.IdEmpresaCadastro);

            if (listaQuestionariosEnviados.Count > 0)
            {
                EntTurmaEmpresaSatisfacao turmaEmpresaSatisfacao = new BllTurmaEmpresaSatisfacao().ObterPorTurmaEmpresa(this.objTurma.IdTurma, this.EmpresaLogada.IdEmpresaCadastro);
                if (turmaEmpresaSatisfacao == null)
                {
                    avaliacaoProcesso.Style.Add("display", "block");
                    PnlQuestionarios.Style.Add("display", "none");
                    BtnEnviar.Style.Add("display", "none");
                }
                else
                {
                    avaliacaoProcesso.Style.Add("display", "none");
                    PnlQuestionarios.Style.Add("display", "block");
                    BtnEnviar.Style.Add("display", "block");
                    relatorioJaEnviado.Style.Add("display", "block");
                    LblJaEnviado.Text = "Sua autoavaliação já foi enviada. O número do Protocolo é " + listaQuestionariosEnviados[0].Protocolo + ". Selecione a opção abaixo para fazer seu download:";
                    //Encaminha para página com pdf de RAA
                    String Url = "/MPE/Paginas/DownloadPDF.aspx?protocolo=" + listaQuestionariosEnviados[0].Protocolo + "&comentarios=false&programaId=" + objPrograma.IdPrograma;
                    HyperLink1.NavigateUrl = Url;

                    /*BtnEnviar.ImageUrl = "/Image/reenviar.gif";*/
                }
            }

            List <EntQuestionario> listaQuestionarios = new BllQuestionario().ObterAbertosPorIdTurmaIdEmpresa(this.objTurma.IdTurma, this.EmpresaLogada.IdEmpresaCadastro);
            int i = 1;

            foreach (EntQuestionario eq in listaQuestionarios)
            {
                if (eq.EmpresaParticipa)
                {
                    object[] temp = new object[8];
                    temp[0] = eq.IdQuestionario;
                    temp[1] = i;
                    temp[2] = eq.Questionario;
                    temp[3] = eq.PorcentagemPreenchida;
                    temp[4] = eq.Obrigatorio;
                    temp[5] = this.EmpresaLogada.IdEmpresaCadastro;
                    temp[6] = this.objTurma.IdTurma;
                    temp[7] = etapaInscricao.Ativo;
                    Control QuestionarioControlTemp = LoadControl("~/User Controls/Questionario/UCEnviaQuestionarioEmpresa.ascx", temp);
                    if (i < 4)
                    {
                        i++;
                    }
                    else
                    {
                        i = 1;
                    }
                    if (eq.PorcentagemPreenchida < 100)
                    {
                        BtnEnviar.Enabled = false;
                    }

                    this.PnlQuestionarios.Controls.Add(QuestionarioControlTemp);
                }
            }
            while (i < 4)
            {
                Control  QuestionarioControlTemp;
                object[] temp = new object[8];
                temp[0] = -1;
                temp[1] = i;
                temp[2] = "";
                temp[3] = -1;
                temp[4] = false;
                temp[5] = -1;
                temp[6] = -1;
                temp[7] = false;
                QuestionarioControlTemp = LoadControl("~/User Controls/Questionario/UCEnviaQuestionarioEmpresa.ascx", temp);
                this.PnlQuestionarios.Controls.Add(QuestionarioControlTemp);
                i++;
            }
        }
Beispiel #14
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";
                    }
                }
            }
        }