Ejemplo n.º 1
0
        public void Gravar(String pontoForte, String oportunidadeMelhoria)
        {
            IdQuestionario        = int.Parse(this.HdnIdQuestionario.Value);
            IdQuestionarioEmpresa = int.Parse(this.HdnIdQuestionarioEmpresa.Value);
            IdEmpresaCadastro     = int.Parse(this.HdnIdEmpresaCadastro.Value);
            IdTurma             = int.Parse(this.HdnIdTurma.Value);
            Pergunta            = new EntPergunta();
            Pergunta.IdPergunta = int.Parse(TxtResposta61.Attributes["perguntaId"]);

            List <EntQuestionarioEmpresaResposta> listaResposta = new List <EntQuestionarioEmpresaResposta>();

            listaResposta.Add(retornaResposta(IdQuestionarioEmpresa, 61, pontoForte, oportunidadeMelhoria));
            listaResposta.Add(retornaResposta(IdQuestionarioEmpresa, 62, pontoForte, oportunidadeMelhoria));
            listaResposta.Add(retornaResposta(IdQuestionarioEmpresa, 63, pontoForte, oportunidadeMelhoria));
            listaResposta.Add(retornaResposta(IdQuestionarioEmpresa, 64, pontoForte, oportunidadeMelhoria));
            listaResposta.Add(retornaResposta(IdQuestionarioEmpresa, 65, pontoForte, oportunidadeMelhoria));
            listaResposta.Add(retornaResposta(IdQuestionarioEmpresa, 66, pontoForte, oportunidadeMelhoria));
            listaResposta.Add(retornaResposta(IdQuestionarioEmpresa, 67, pontoForte, oportunidadeMelhoria));
            listaResposta.Add(retornaResposta(IdQuestionarioEmpresa, 68, pontoForte, oportunidadeMelhoria));
            listaResposta.Add(retornaResposta(IdQuestionarioEmpresa, 69, pontoForte, oportunidadeMelhoria));

            foreach (EntQuestionarioEmpresaResposta qer in listaResposta)
            {
                new BllQuestionarioEmpresaResposta().InserirAtualizar(qer);
            }
        }
Ejemplo n.º 2
0
        public void Gravar(String pontoForte, String oportunidadeMelhoria)
        {
            IdQuestionario        = int.Parse(this.HdnIdQuestionario.Value);
            IdQuestionarioEmpresa = int.Parse(this.HdnIdQuestionarioEmpresa.Value);
            IdEmpresaCadastro     = int.Parse(this.HdnIdEmpresaCadastro.Value);
            IdTurma             = int.Parse(this.HdnIdTurma.Value);
            Pergunta            = new EntPergunta();
            Pergunta.IdPergunta = int.Parse(this.HdnIdPergunta.Value);
            Pergunta            = new BllPergunta().ObterPerguntaPorQuestionarioEmpresaPergunta(IdQuestionarioEmpresa, Pergunta.IdPergunta, false);

            //armazena resposta em BD
            EntQuestionarioEmpresaResposta ent = new EntQuestionarioEmpresaResposta();

            ent.Justificativa       = this.TxtJustificativa.Text;
            ent.Pergunta.IdPergunta = this.Pergunta.IdPergunta;
            ent.QuestionarioEmpresa.IdQuestionarioEmpresa = this.IdQuestionarioEmpresa;
            ent.PontoForte           = pontoForte;
            ent.OportunidadeMelhoria = oportunidadeMelhoria;
            if (this.respostaSim.Checked)
            {
                ent.Resposta.IdPerguntaResposta = this.Pergunta.ListPerguntaResposta[0].IdPerguntaResposta;
                ent.RespostaBool = true;
            }
            else if (this.respostaNao.Checked)
            {
                ent.Resposta.IdPerguntaResposta = this.Pergunta.ListPerguntaResposta[1].IdPerguntaResposta;
                ent.RespostaBool = false;
            }
            ent.UsuarioAvaliador.IdUsuario = IdUsuarioLogado;
            if (ent.Resposta.IdPerguntaResposta > 0)
            {
                new BllQuestionarioEmpresaResposta().InserirAtualizar(ent);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Popula Questionario Empresa, conforme DataReader passado
        /// </summary>
        /// <autor>Thiago Moreira</autor>
        /// <param name="dtrDados">DataReader a ser percorrido.</param>
        /// <returns><list type="EntQuestionarioEmpresa">Lista de EntQuestionarioEmpresa</list></returns>
        private List <EntPergunta> Popular(DbDataReader dtrDados, DbTransaction transaction, Database db)
        {
            List <EntPergunta> listEntReturn = new List <EntPergunta>();
            EntPergunta        entReturn;

            try
            {
                while (dtrDados.Read())
                {
                    entReturn = new EntPergunta();

                    entReturn.Ativo = ObjectUtils.ToBoolean(dtrDados["FL_ATIVO"]);
                    entReturn.Criterio.IdCriterio = ObjectUtils.ToInt(dtrDados["CEA_CRITERIO"]);
                    entReturn.Glossario           = ObjectUtils.ToString(dtrDados["TX_GLOSSARIO"]);
                    entReturn.IdPergunta          = ObjectUtils.ToInt(dtrDados["CDA_PERGUNTA"]);
                    entReturn.Ordem                       = ObjectUtils.ToInt(dtrDados["NU_ORDEM"]);
                    entReturn.Pergunta                    = ObjectUtils.ToString(dtrDados["TX_PERGUNTA"]);
                    entReturn.SaibaMais                   = ObjectUtils.ToString(dtrDados["TX_SAIBA_MAIS"]);
                    entReturn.PerguntaInterna             = ObjectUtils.ToBoolean(dtrDados["FL_PERGUNTA_INTERNA"]);
                    entReturn.PerguntaTipo.IdPerguntaTipo = ObjectUtils.ToInt(dtrDados["CEA_PERGUNTA_TIPO"]);
                    entReturn.NumeroQuestao               = ObjectUtils.ToString(dtrDados["NU_QUESTAO"]);
                    listEntReturn.Add(entReturn);
                }

                dtrDados.Close();
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(listEntReturn);
        }
Ejemplo n.º 4
0
        protected void Gravar()
        {
            IdQuestionario        = int.Parse(this.HdnIdQuestionario.Value);
            IdQuestionarioEmpresa = int.Parse(this.HdnIdQuestionarioEmpresa.Value);
            IdEmpresaCadastro     = int.Parse(this.HdnIdEmpresaCadastro.Value);
            IdTurma             = int.Parse(this.HdnIdTurma.Value);
            Pergunta            = new EntPergunta();
            Pergunta.IdPergunta = int.Parse(TxtResposta61.Attributes["perguntaId"]);

            List <EntQuestionarioEmpresaResposta> listaResposta = new List <EntQuestionarioEmpresaResposta>();

            listaResposta.Add(retornaResposta(IdQuestionarioEmpresa, 61));
            listaResposta.Add(retornaResposta(IdQuestionarioEmpresa, 62));
            listaResposta.Add(retornaResposta(IdQuestionarioEmpresa, 63));
            listaResposta.Add(retornaResposta(IdQuestionarioEmpresa, 64));
            listaResposta.Add(retornaResposta(IdQuestionarioEmpresa, 65));
            listaResposta.Add(retornaResposta(IdQuestionarioEmpresa, 66));
            listaResposta.Add(retornaResposta(IdQuestionarioEmpresa, 67));
            listaResposta.Add(retornaResposta(IdQuestionarioEmpresa, 68));
            listaResposta.Add(retornaResposta(IdQuestionarioEmpresa, 69));

            foreach (EntQuestionarioEmpresaResposta qer in listaResposta)
            {
                new BllQuestionarioEmpresaResposta().InserirAtualizar(qer);
            }
        }
Ejemplo n.º 5
0
        protected void Gravar()
        {
            IdQuestionario        = int.Parse(this.HdnIdQuestionario.Value);
            IdQuestionarioEmpresa = int.Parse(this.HdnIdQuestionarioEmpresa.Value);
            IdEmpresaCadastro     = int.Parse(this.HdnIdEmpresaCadastro.Value);
            IdTurma             = int.Parse(this.HdnIdTurma.Value);
            Pergunta            = new EntPergunta();
            Pergunta.IdPergunta = int.Parse(this.HdnIdPergunta.Value);
            Pergunta            = new BllPergunta().ObterPerguntaPorQuestionarioEmpresaPergunta(IdQuestionarioEmpresa, Pergunta.IdPergunta, false);

            //armazena resposta em BD
            EntQuestionarioEmpresaResposta ent = new EntQuestionarioEmpresaResposta();

            ent.Pergunta.IdPergunta = this.Pergunta.IdPergunta;
            ent.QuestionarioEmpresa.IdQuestionarioEmpresa = this.IdQuestionarioEmpresa;
            ent.Resposta.IdPerguntaResposta = this.Pergunta.ListPerguntaResposta[0].IdPerguntaResposta;
            ent.RespostaTexto = this.TxtResposta.Text;
            if (IdUsuarioLogado > 0)
            {
                ent.UsuarioDigitador.IdUsuario = IdUsuarioLogado;
            }
            if (ent.Resposta.IdPerguntaResposta > 0)
            {
                new BllQuestionarioEmpresaResposta().InserirAtualizar(ent);
            }
        }
Ejemplo n.º 6
0
 private void MontarTabelaQuestao18(EntPergunta Pergunta)
 {
     this.resposta1_1.Text = Pergunta.QuestionarioEmpresaResposta.Valor01;
     this.resposta1_2.Text = Pergunta.QuestionarioEmpresaResposta.Valor02;
     this.resposta2_1.Text = Pergunta.QuestionarioEmpresaResposta.Valor03;
     this.resposta2_2.Text = Pergunta.QuestionarioEmpresaResposta.Valor04;
 }
Ejemplo n.º 7
0
        public void GerarPerguntas(List <EntPergunta> lstEntPergunta, EnumType.Questionario Questionario)
        {
            String html = "";

            switch (Questionario)
            {
            case EnumType.Questionario.ResponsabilidadeSocial:
                html += "<table>";
                html += this.MontarQuestionarioResponsabilidadeSocial(lstEntPergunta);
                this.divPerguntas.Visible = true;
                html += "</table>";
                html += "<br/>";
                break;

            default:
                this.divPerguntas.Visible = false;
                foreach (EntPergunta objPergunta in lstEntPergunta)
                {
                    html            += "<table style='width:850px;' cellspacing='10'>";
                    this.objPergunta = objPergunta;
                    html            += GerarPergunta(objPergunta);
                    html            += "</table>";
                    html            += "<br/>";
                }
                break;
            }


            this.ltrPerguntas.Text = html;
        }
Ejemplo n.º 8
0
        protected void Gravar()
        {
            IdQuestionario        = int.Parse(this.HdnIdQuestionario.Value);
            IdQuestionarioEmpresa = int.Parse(this.HdnIdQuestionarioEmpresa.Value);
            IdEmpresaCadastro     = int.Parse(this.HdnIdEmpresaCadastro.Value);
            IdTurma             = int.Parse(this.HdnIdTurma.Value);
            Pergunta            = new EntPergunta();
            Pergunta.IdPergunta = int.Parse(HdnIdPergunta.Value);
            Int32 IdResposta = int.Parse(HdnIdResposta.Value);

            EntQuestionarioEmpresaResposta temp = new EntQuestionarioEmpresaResposta();

            temp.QuestionarioEmpresa.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
            temp.Pergunta.IdPergunta         = Pergunta.IdPergunta;
            temp.Resposta.IdPerguntaResposta = IdResposta;
            temp.Valor01 = this.resposta1_1.Text;
            temp.Valor02 = this.resposta1_2.Text;
            temp.Valor03 = this.resposta2_1.Text;
            temp.Valor04 = this.resposta2_2.Text;
            if (IdUsuarioLogado > 0)
            {
                temp.UsuarioDigitador.IdUsuario = IdUsuarioLogado;
            }

            new BllQuestionarioEmpresaResposta().InserirAtualizar(temp);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Retorna uma entidade de Pergunta
        /// </summary>
        /// <autor>Thiago Moreira</autor>
        /// <returns><type="EntPergunta">EntPergunta</list></returns>
        public EntPergunta ObterPerguntaAnteriorPorQuestionarioPergunta(Int32 IdQuestionario, Int32 IdPergunta)
        {
            EntPergunta objPergunta = new EntPergunta();

            using (DbConnection connection = db.CreateConnection())
            {
                connection.Open();
                DbTransaction transaction = connection.BeginTransaction();
                try
                {
                    objPergunta = dalPergunta.ObterPerguntaAnteriorPorQuestionarioEmpresa(IdQuestionario, IdPergunta, transaction, db);

                    transaction.Commit();
                }
                catch
                {
                    transaction.Rollback();
                    throw;
                }
                finally
                {
                    connection.Close();
                }
            }
            return(objPergunta);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Retorna uma entidade de Pergunta
        /// </summary>
        /// <autor>Thiago Moreira</autor>
        /// <returns><type="EntPergunta">EntPergunta</list></returns>
        public EntPergunta ObterProximaPerguntaQuestionario(Int32 IdQuestionarioEmpresa, Int32 IdQuestionario)
        {
            EntPergunta objPergunta = new EntPergunta();

            using (DbConnection connection = db.CreateConnection())
            {
                connection.Open();
                DbTransaction transaction = connection.BeginTransaction();
                try
                {
                    objPergunta = dalPergunta.ObterProximaPerguntaPorQuestionarioEmpresa(IdQuestionarioEmpresa, transaction, db);
                    if (objPergunta == null)
                    {
                        objPergunta = dalPergunta.ObterPerguntasPorQuestionario(IdQuestionario, transaction, db)[0];
                    }
                    objPergunta.ListPerguntaResposta        = new DalPerguntaResposta().ObterRespostasPorPergunta(objPergunta.IdPergunta, transaction, db);
                    objPergunta.QuestionarioEmpresaResposta = new DalQuestionarioEmpresaResposta().ObterQuestionarioEmpresaRespostaPorPergunta(IdQuestionarioEmpresa, objPergunta.IdPergunta, false, transaction, db);

                    transaction.Commit();
                }
                catch
                {
                    transaction.Rollback();
                    throw;
                }
                finally
                {
                    connection.Close();
                }
            }
            return(objPergunta);
        }
Ejemplo n.º 11
0
        public void Gravar(String pontoForte, String oportunidadeMelhoria)
        {
            IdQuestionario        = int.Parse(this.HdnIdQuestionario.Value);
            IdQuestionarioEmpresa = int.Parse(this.HdnIdQuestionarioEmpresa.Value);
            IdEmpresaCadastro     = int.Parse(this.HdnIdEmpresaCadastro.Value);
            IdTurma             = int.Parse(this.HdnIdTurma.Value);
            Pergunta            = new EntPergunta();
            Pergunta.IdPergunta = int.Parse(HdnIdPergunta.Value);
            Int32 IdResposta = int.Parse(HdnIdResposta.Value);

            EntQuestionarioEmpresaResposta temp = new EntQuestionarioEmpresaResposta();

            temp.QuestionarioEmpresa.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
            temp.Pergunta.IdPergunta         = Pergunta.IdPergunta;
            temp.Resposta.IdPerguntaResposta = IdResposta;
            temp.Valor01                    = this.resposta1_1.Text;
            temp.Valor02                    = this.resposta1_2.Text;
            temp.Valor03                    = this.resposta2_1.Text;
            temp.Valor04                    = this.resposta2_2.Text;
            temp.PontoForte                 = pontoForte;
            temp.OportunidadeMelhoria       = oportunidadeMelhoria;
            temp.UsuarioAvaliador.IdUsuario = IdUsuarioLogado;

            new BllQuestionarioEmpresaResposta().InserirAtualizar(temp);
        }
Ejemplo n.º 12
0
        private String GerarPergunta(EntPergunta objPergunta)
        {
            String html = "";

            //  html += "<table cellspacing=1 cellpadding=3 bgcolor=\"#FFFFFF\" width=100%>";
            html += "    <tr bgcolor=\"#FFFFFF\">";
            html += "       <td style=\"width: 500px; font-size:small\">";
            html += objPergunta.Ordem;
            html += "       .&nbsp;&nbsp;";
            html += objPergunta.Pergunta;
            html += "       </td>";
            html += "    </tr>";

            foreach (EntPerguntaResposta objPerguntaResposta in objPergunta.ListPerguntaResposta)
            {
                html += "    <tr bgcolor=\"#FFFFFF\">";
                html += "       <td style=\"width: 800px; font-size:small\">";
                //html += this.OrdemDaResposta(objPerguntaResposta.Ordem);
                html += "       &nbsp;&nbsp;";
                html += objPerguntaResposta.PerguntaResposta;
                html += "       </td>";
                html += "    </tr>";
            }

            //html += GerarRespostas(objPergunta.ListPerguntaResposta);
            //      html += "    </table>";
            return(html);
        }
Ejemplo n.º 13
0
        public void Gravar(String pontoForte, String oportunidadeMelhoria)
        {
            IdQuestionario        = int.Parse(this.HdnIdQuestionario.Value);
            IdQuestionarioEmpresa = int.Parse(this.HdnIdQuestionarioEmpresa.Value);
            IdEmpresaCadastro     = int.Parse(this.HdnIdEmpresaCadastro.Value);
            IdTurma             = int.Parse(this.HdnIdTurma.Value);
            Pergunta            = new EntPergunta();
            Pergunta.IdPergunta = int.Parse(pergunta1respostaSim.Attributes["perguntaId"]);

            List <EntQuestionarioEmpresaResposta> listaResposta = new List <EntQuestionarioEmpresaResposta>();

            //pergunta 1
            EntQuestionarioEmpresaResposta temp = new EntQuestionarioEmpresaResposta();

            temp.Pergunta.IdPergunta = int.Parse(pergunta1respostaSim.Attributes["perguntaId"]);
            temp.QuestionarioEmpresa.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
            temp.Resposta.IdPerguntaResposta = int.Parse(pergunta1respostaSim.Attributes["respostaId"]);
            temp.PontoForte           = pontoForte;
            temp.OportunidadeMelhoria = oportunidadeMelhoria;
            if (pergunta1respostaSim.Checked)
            {
                temp.RespostaBool = true;
            }
            else if (pergunta1respostaNao.Checked)
            {
                temp.RespostaBool = false;
            }
            temp.UsuarioAvaliador.IdUsuario = IdUsuarioLogado;
            listaResposta.Add(temp);

            //tabela 1
            for (int i = 1; i < 11; i++)
            {
                temp = new EntQuestionarioEmpresaResposta();

                temp.QuestionarioEmpresa.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
                temp.PontoForte                  = pontoForte;
                temp.OportunidadeMelhoria        = oportunidadeMelhoria;
                temp.Pergunta.IdPergunta         = int.Parse(((TextBox)this.FindControl("resposta" + (i) + "_1")).Attributes["perguntaId"]);
                temp.Resposta.IdPerguntaResposta = int.Parse(((TextBox)this.FindControl("resposta" + (i) + "_1")).Attributes["respostaId"]);
                temp.Valor01 = ((TextBox)this.FindControl("resposta" + (i) + "_1")).Text;
                temp.Valor02 = ((TextBox)this.FindControl("resposta" + (i) + "_2")).Text;
                if (((RadioButton)this.FindControl("resposta" + (i) + "_P")).Checked)
                {
                    temp.RespostaBool = true;
                }
                else
                {
                    temp.RespostaBool = false;
                }
                temp.UsuarioAvaliador.IdUsuario = IdUsuarioLogado;
                listaResposta.Add(temp);
            }

            foreach (EntQuestionarioEmpresaResposta qer in listaResposta)
            {
                new BllQuestionarioEmpresaResposta().InserirAtualizar(qer);
            }
        }
Ejemplo n.º 14
0
 public void MontarTabela(EntPergunta Pergunta)
 {
     this.label1.Text    = Pergunta.ListPerguntaResposta[0].Valor1;
     this.label2.Text    = Pergunta.ListPerguntaResposta[0].Valor2;
     this.label3.Text    = Pergunta.ListPerguntaResposta[0].Valor3;
     this.label4.Text    = Pergunta.ListPerguntaResposta[0].Valor4;
     this.label5.Text    = Pergunta.ListPerguntaResposta[0].Valor5;
     this.resposta1.Text = Pergunta.QuestionarioEmpresaResposta.Valor01;
     this.resposta2.Text = Pergunta.QuestionarioEmpresaResposta.Valor02;
     this.resposta3.Text = Pergunta.QuestionarioEmpresaResposta.Valor03;
     this.resposta4.Text = Pergunta.QuestionarioEmpresaResposta.Valor04;
     this.resposta5.Text = Pergunta.QuestionarioEmpresaResposta.Valor05;
 }
Ejemplo n.º 15
0
 private void MontarTabelaCampoTexto(EntPergunta Pergunta)
 {
     this.label9.Text    = Pergunta.ListPerguntaResposta[0].Valor1;
     this.label10.Text   = Pergunta.ListPerguntaResposta[0].Valor2;
     this.label11.Text   = Pergunta.ListPerguntaResposta[0].Valor3;
     this.label12.Text   = Pergunta.ListPerguntaResposta[0].Valor4;
     this.label13.Text   = Pergunta.ListPerguntaResposta[0].Valor5;
     this.resposta1.Text = Pergunta.QuestionarioEmpresaResposta.Valor01;
     this.resposta2.Text = Pergunta.QuestionarioEmpresaResposta.Valor02;
     this.resposta3.Text = Pergunta.QuestionarioEmpresaResposta.Valor03;
     this.resposta4.Text = Pergunta.QuestionarioEmpresaResposta.Valor04;
     this.resposta5.Text = Pergunta.QuestionarioEmpresaResposta.Valor05;
 }
Ejemplo n.º 16
0
        /// <summary>
        /// Popula Questionario Empresa, conforme DataReader passado
        /// </summary>
        /// <autor>Thiago Moreira</autor>
        /// <param name="dtrDados">DataReader a ser percorrido.</param>
        /// <returns><list type="EntQuestionarioEmpresa">Lista de EntQuestionarioEmpresa</list></returns>
        private List <EntPergunta> PopularCustom(DbDataReader dtrDados, DbTransaction transaction, Database db)
        {
            List <EntPergunta> listEntReturn = new List <EntPergunta>();
            EntPergunta        entReturn;

            try
            {
                while (dtrDados.Read())
                {
                    entReturn = new EntPergunta();

                    entReturn.Ativo = ObjectUtils.ToBoolean(dtrDados["FL_ATIVO"]);
                    entReturn.Criterio.IdCriterio = ObjectUtils.ToInt(dtrDados["CEA_CRITERIO"]);
                    entReturn.Glossario           = ObjectUtils.ToString(dtrDados["TX_GLOSSARIO"]);
                    entReturn.IdPergunta          = ObjectUtils.ToInt(dtrDados["CDA_PERGUNTA"]);
                    entReturn.Ordem                       = ObjectUtils.ToInt(dtrDados["NU_ORDEM"]);
                    entReturn.Pergunta                    = ObjectUtils.ToString(dtrDados["TX_PERGUNTA"]);
                    entReturn.SaibaMais                   = ObjectUtils.ToString(dtrDados["TX_SAIBA_MAIS"]);
                    entReturn.PerguntaInterna             = ObjectUtils.ToBoolean(dtrDados["FL_PERGUNTA_INTERNA"]);
                    entReturn.PerguntaTipo.IdPerguntaTipo = ObjectUtils.ToInt(dtrDados["CEA_PERGUNTA_TIPO"]);
                    entReturn.NumeroQuestao               = ObjectUtils.ToString(dtrDados["NU_QUESTAO"]);
                    entReturn.QuestionarioEmpresaResposta.Resposta.IdPerguntaResposta = ObjectUtils.ToInt(dtrDados["FL_EMPRESA_PREENCHEU"]);
                    entReturn.QuestionarioEmpresaResposta.QuestionarioEmpresa.Questionario.IdQuestionario       = ObjectUtils.ToInt(dtrDados["CEA_QUESTIONARIO"]);
                    entReturn.QuestionarioEmpresaResposta.QuestionarioEmpresa.IdQuestionarioEmpresa             = ObjectUtils.ToInt(dtrDados["CDA_QUESTIONARIO_EMPRESA"]);
                    entReturn.QuestionarioEmpresaResposta.QuestionarioEmpresa.EmpresaCadastro.IdEmpresaCadastro = ObjectUtils.ToInt(dtrDados["CEA_EMP_CADASTRO"]);
                    entReturn.QuestionarioEmpresaResposta.QuestionarioEmpresa.Etapa.Turma.IdTurma = ObjectUtils.ToInt(dtrDados["CEA_TURMA"]);
                    if (ObjectUtils.ToInt(dtrDados["FL_EMPRESA_PREENCHEU"]) == 0)
                    {
                        entReturn.QuestionarioEmpresaResposta.RespostaBool = false;
                    }
                    else
                    {
                        entReturn.QuestionarioEmpresaResposta.RespostaBool = true;
                    }
                    listEntReturn.Add(entReturn);
                }

                dtrDados.Close();
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(listEntReturn);
        }
Ejemplo n.º 17
0
        protected void Gravar()
        {
            IdQuestionario        = int.Parse(this.HdnIdQuestionario.Value);
            IdQuestionarioEmpresa = int.Parse(this.HdnIdQuestionarioEmpresa.Value);
            IdEmpresaCadastro     = int.Parse(this.HdnIdEmpresaCadastro.Value);
            IdTurma             = int.Parse(this.HdnIdTurma.Value);
            Pergunta            = new EntPergunta();
            Pergunta.IdPergunta = int.Parse(resposta1_1.Attributes["perguntaId"]);

            List <EntQuestionarioEmpresaResposta> listaResposta = new List <EntQuestionarioEmpresaResposta>();

            //tabela 1
            for (int i = 1; i < 9; i++)
            {
                EntQuestionarioEmpresaResposta temp = new EntQuestionarioEmpresaResposta();

                temp.QuestionarioEmpresa.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
                temp.Pergunta.IdPergunta = int.Parse(((CheckBox)this.FindControl("resposta" + (i) + "_1")).Attributes["perguntaId"]);
                if (((RadioButton)this.FindControl("resposta" + (i) + "_1")).Checked)
                {
                    temp.Resposta.IdPerguntaResposta = int.Parse(((RadioButton)this.FindControl("resposta" + (i) + "_1")).Attributes["respostaId"]);
                }
                else if (((RadioButton)this.FindControl("resposta" + (i) + "_2")).Checked)
                {
                    temp.Resposta.IdPerguntaResposta = int.Parse(((RadioButton)this.FindControl("resposta" + (i) + "_2")).Attributes["respostaId"]);
                }
                else if (((RadioButton)this.FindControl("resposta" + (i) + "_3")).Checked)
                {
                    temp.Resposta.IdPerguntaResposta = int.Parse(((RadioButton)this.FindControl("resposta" + (i) + "_3")).Attributes["respostaId"]);
                }
                else if (((RadioButton)this.FindControl("resposta" + (i) + "_4")).Checked)
                {
                    temp.Resposta.IdPerguntaResposta = int.Parse(((RadioButton)this.FindControl("resposta" + (i) + "_4")).Attributes["respostaId"]);
                }
                if (IdUsuarioLogado > 0)
                {
                    temp.UsuarioDigitador.IdUsuario = IdUsuarioLogado;
                }
                listaResposta.Add(temp);
            }

            foreach (EntQuestionarioEmpresaResposta qer in listaResposta)
            {
                new BllQuestionarioEmpresaResposta().InserirAtualizar(qer);
            }
        }
Ejemplo n.º 18
0
        private String GerarPergunta(EntPergunta objPergunta)
        {
            String html = "";

            html += "    <tr>";
            html += "       <td colspan='2'><b>";
            html += objPergunta.NumeroQuestao;
            html += "       &nbsp;&nbsp;";
            html += objPergunta.Pergunta;
            html += "       </b></td>";
            html += "    </tr>";
            html += GerarRespostas(objPergunta.ListPerguntaResposta);
            objPergunta.QuestionarioEmpresaResposta.Resposta = new BllPerguntaResposta().ObterPorId(objPergunta.QuestionarioEmpresaResposta.Resposta.IdPerguntaResposta);
            html += GerarJustificativa(objPergunta.QuestionarioEmpresaResposta);
            html += GerarRespostaAutomatica(objPergunta.QuestionarioEmpresaResposta);
            html += "<br>";
            return(html);
        }
Ejemplo n.º 19
0
        protected void Gravar()
        {
            IdQuestionario        = int.Parse(this.HdnIdQuestionario.Value);
            IdQuestionarioEmpresa = int.Parse(this.HdnIdQuestionarioEmpresa.Value);
            IdEmpresaCadastro     = int.Parse(this.HdnIdEmpresaCadastro.Value);
            IdTurma             = int.Parse(this.HdnIdTurma.Value);
            Pergunta            = new EntPergunta();
            Pergunta.IdPergunta = int.Parse(rdSim31.Attributes["perguntaId"]);

            List <EntQuestionarioEmpresaResposta> listaResposta = new List <EntQuestionarioEmpresaResposta>();
            int i = 31;

            while (i < 39)
            {
                EntQuestionarioEmpresaResposta temp = new EntQuestionarioEmpresaResposta();
                temp.QuestionarioEmpresa.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
                temp.UsuarioDigitador.IdUsuario  = IdUsuarioLogado;
                temp.Pergunta.IdPergunta         = int.Parse(((RadioButton)this.FindControl("rdSim" + i)).Attributes["perguntaId"]);
                temp.Resposta.IdPerguntaResposta = int.Parse(((RadioButton)this.FindControl("rdSim" + i)).Attributes["respostaId"]);

                if (((RadioButton)this.FindControl("rdSim" + (i))).Checked)
                {
                    temp.RespostaBool = true;
                }
                else
                {
                    temp.RespostaBool = false;
                }
                temp.Valor01 = ((TextBox)this.FindControl("tx1_" + (i))).Text;
                temp.Valor02 = ((TextBox)this.FindControl("tx2_" + (i))).Text;
                temp.Valor03 = ((TextBox)this.FindControl("tx3_" + (i))).Text;
                i++;
                if (IdUsuarioLogado > 0)
                {
                    temp.UsuarioDigitador.IdUsuario = IdUsuarioLogado;
                }
                listaResposta.Add(temp);
            }

            foreach (EntQuestionarioEmpresaResposta qer in listaResposta)
            {
                new BllQuestionarioEmpresaResposta().InserirAtualizar(qer);
            }
        }
Ejemplo n.º 20
0
        protected void Gravar()
        {
            IdQuestionario        = int.Parse(this.HdnIdQuestionario.Value);
            IdQuestionarioEmpresa = int.Parse(this.HdnIdQuestionarioEmpresa.Value);
            IdEmpresaCadastro     = int.Parse(this.HdnIdEmpresaCadastro.Value);
            IdTurma             = int.Parse(this.HdnIdTurma.Value);
            Pergunta            = new EntPergunta();
            Pergunta.IdPergunta = int.Parse(this.HdnIdPergunta.Value);
            Pergunta            = new BllPergunta().ObterPerguntaPorQuestionarioEmpresaPergunta(IdQuestionarioEmpresa, Pergunta.IdPergunta, false);

            //armazena resposta em BD
            EntQuestionarioEmpresaResposta ent = new EntQuestionarioEmpresaResposta();

            ent.Valor01             = this.tx1_31.Text;
            ent.Valor02             = this.tx2_31.Text;
            ent.Valor03             = this.tx3_31.Text;
            ent.Pergunta.IdPergunta = this.Pergunta.IdPergunta;
            ent.QuestionarioEmpresa.IdQuestionarioEmpresa = this.IdQuestionarioEmpresa;
            if (this.respostaSelecionada.Value.Equals("A"))
            {
                ent.Resposta.IdPerguntaResposta = this.Pergunta.ListPerguntaResposta[0].IdPerguntaResposta;
            }
            else if (this.respostaSelecionada.Value.Equals("B"))
            {
                ent.Resposta.IdPerguntaResposta = this.Pergunta.ListPerguntaResposta[1].IdPerguntaResposta;
            }
            else if (this.respostaSelecionada.Value.Equals("C"))
            {
                ent.Resposta.IdPerguntaResposta = this.Pergunta.ListPerguntaResposta[2].IdPerguntaResposta;
            }
            else if (this.respostaSelecionada.Value.Equals("D"))
            {
                ent.Resposta.IdPerguntaResposta = this.Pergunta.ListPerguntaResposta[3].IdPerguntaResposta;
            }
            if (IdUsuarioLogado > 0)
            {
                ent.UsuarioDigitador.IdUsuario = IdUsuarioLogado;
            }
            if (ent.Resposta.IdPerguntaResposta > 0)
            {
                new BllQuestionarioEmpresaResposta().InserirAtualizar(ent);
            }
        }
Ejemplo n.º 21
0
        public void Gravar(String pontoForte, String oportunidadeMelhoria)
        {
            IdQuestionario        = int.Parse(this.HdnIdQuestionario.Value);
            IdQuestionarioEmpresa = int.Parse(this.HdnIdQuestionarioEmpresa.Value);
            IdEmpresaCadastro     = int.Parse(this.HdnIdEmpresaCadastro.Value);
            IdTurma             = int.Parse(this.HdnIdTurma.Value);
            Pergunta            = new EntPergunta();
            Pergunta.IdPergunta = int.Parse(this.HdnIdPergunta.Value);
            Pergunta            = new BllPergunta().ObterPerguntaPorQuestionarioEmpresaPergunta(IdQuestionarioEmpresa, Pergunta.IdPergunta, false);

            //armazena resposta em BD
            EntQuestionarioEmpresaResposta ent = new EntQuestionarioEmpresaResposta();

            ent.PontoForte           = pontoForte;
            ent.OportunidadeMelhoria = oportunidadeMelhoria;
            ent.Valor01             = this.tx1_31.Text;
            ent.Valor02             = this.tx2_31.Text;
            ent.Valor03             = this.tx3_31.Text;
            ent.Pergunta.IdPergunta = this.Pergunta.IdPergunta;
            ent.QuestionarioEmpresa.IdQuestionarioEmpresa = this.IdQuestionarioEmpresa;
            if (this.radioA.Checked)
            {
                ent.Resposta.IdPerguntaResposta = this.Pergunta.ListPerguntaResposta[0].IdPerguntaResposta;
            }
            else if (this.radioB.Checked)
            {
                ent.Resposta.IdPerguntaResposta = this.Pergunta.ListPerguntaResposta[1].IdPerguntaResposta;
            }
            else if (this.radioC.Checked)
            {
                ent.Resposta.IdPerguntaResposta = this.Pergunta.ListPerguntaResposta[2].IdPerguntaResposta;
            }
            else if (this.radioD.Checked)
            {
                ent.Resposta.IdPerguntaResposta = this.Pergunta.ListPerguntaResposta[3].IdPerguntaResposta;
            }

            ent.UsuarioAvaliador.IdUsuario = IdUsuarioLogado;
            if (ent.Resposta.IdPerguntaResposta > 0)
            {
                new BllQuestionarioEmpresaResposta().InserirAtualizar(ent);
            }
        }
Ejemplo n.º 22
0
        private String MontarQuestaoCampoTexto(EntPergunta Pergunta)
        {
            String html = "";

            html  = "<table>";
            html += "    <tr>";
            html += "       <td>";
            html += Pergunta.Ordem;
            html += "       .&nbsp;&nbsp;";
            html += Pergunta.Pergunta;
            html += "       </td>";
            html += "    </tr>";
            html += "    <tr>";
            html += "       <td>";
            html += "           <textarea name=" + Pergunta.IdPergunta + "rows=\"5\" cols=\"20\" id=" + Pergunta.IdPergunta + " style=\"font-family:Arial;font-size:12px;width:99%;\">" + Pergunta.QuestionarioEmpresaResposta.RespostaTexto + "</textarea>";
            html += "       </td>";
            html += "    </tr>";
            html += "</table>";

            return(html);
        }
Ejemplo n.º 23
0
        private void GeraJustificativa(EntPergunta objPergunta)
        {
            String html;

            html  = "<br>";
            html += "<table cellspacing=1 cellpadding=3 bgcolor=\"#000000\" width=100%>";
            html += "   <tr bgcolor=\"#FFFFFF\">";
            html += "       <td>";
            html += "           <strong>Justificativa:</strong>";
            html += "       </td>";
            html += "   </tr>";
            html += "   <tr bgcolor=\"#FFFFFF\">";
            html += "       <td>";
            html += objPergunta.QuestionarioEmpresaResposta.Justificativa;
            html += "       </td>";
            html += "   </tr>";
            html += "</table>";
            html += "<br>";

            this.Justificativa = html;
        }
Ejemplo n.º 24
0
        public void Editar(Int32 IdQuestionario, Int32 IdQuestionarioEmpresa, Int32 IdEmpresaCadastro, Int32 IdTurma, EntPergunta Pergunta)
        {
            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.HdnIdResposta.Value = Pergunta.ListPerguntaResposta[0].IdPerguntaResposta.ToString();

            MontarTabela(Pergunta);
        }
Ejemplo n.º 25
0
        public void Editar(Int32 IdQuestionario, Int32 IdQuestionarioEmpresa, Int32 IdEmpresaCadastro, Int32 IdTurma, EntPergunta Pergunta)
        {
            this.IdQuestionario        = IdQuestionario;
            this.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
            this.IdEmpresaCadastro     = IdEmpresaCadastro;
            this.IdTurma  = IdTurma;
            this.Pergunta = Pergunta;
            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.lblTabela.Text = this.Pergunta.Pergunta;
            if (this.Pergunta.QuestionarioEmpresaResposta.Resposta.IdPerguntaResposta == this.Pergunta.ListPerguntaResposta[0].IdPerguntaResposta)
            {
                this.radioA.Checked = true;
            }
            else if (this.Pergunta.QuestionarioEmpresaResposta.Resposta.IdPerguntaResposta == this.Pergunta.ListPerguntaResposta[1].IdPerguntaResposta)
            {
                this.radioB.Checked = true;
            }
            else if (this.Pergunta.QuestionarioEmpresaResposta.Resposta.IdPerguntaResposta == this.Pergunta.ListPerguntaResposta[2].IdPerguntaResposta)
            {
                this.radioC.Checked = true;
            }
            else if (this.Pergunta.QuestionarioEmpresaResposta.Resposta.IdPerguntaResposta == this.Pergunta.ListPerguntaResposta[3].IdPerguntaResposta)
            {
                this.radioD.Checked = true;
            }
            this.lblRespostaA.Text = this.Pergunta.ListPerguntaResposta[0].PerguntaResposta;
            this.lblRespostaB.Text = this.Pergunta.ListPerguntaResposta[1].PerguntaResposta;
            this.lblRespostaC.Text = this.Pergunta.ListPerguntaResposta[2].PerguntaResposta;
            this.lblRespostaD.Text = this.Pergunta.ListPerguntaResposta[3].PerguntaResposta;

            radioA.Attributes.Add("onClick", "DesabilitaCampos('" + ((TextBox)this.FindControl("tx1_31")).ClientID + "','" + ((TextBox)this.FindControl("tx2_31")).ClientID + "','" + ((TextBox)this.FindControl("tx3_31")).ClientID + "')");
            radioB.Attributes.Add("onClick", "HabilitaCampos('" + ((TextBox)this.FindControl("tx1_31")).ClientID + "','" + ((TextBox)this.FindControl("tx2_31")).ClientID + "','" + ((TextBox)this.FindControl("tx3_31")).ClientID + "')");
            radioC.Attributes.Add("onClick", "HabilitaCampos('" + ((TextBox)this.FindControl("tx1_31")).ClientID + "','" + ((TextBox)this.FindControl("tx2_31")).ClientID + "','" + ((TextBox)this.FindControl("tx3_31")).ClientID + "')");
            radioD.Attributes.Add("onClick", "HabilitaCampos('" + ((TextBox)this.FindControl("tx1_31")).ClientID + "','" + ((TextBox)this.FindControl("tx2_31")).ClientID + "','" + ((TextBox)this.FindControl("tx3_31")).ClientID + "')");

            if (this.Pergunta.QuestionarioEmpresaResposta != null && this.Pergunta.QuestionarioEmpresaResposta.QuestionarioEmpresa != null)
            {
                this.tx1_31.Text = this.Pergunta.QuestionarioEmpresaResposta.Valor01;
                this.tx2_31.Text = this.Pergunta.QuestionarioEmpresaResposta.Valor02;
                this.tx3_31.Text = this.Pergunta.QuestionarioEmpresaResposta.Valor03;
                if (this.Pergunta.QuestionarioEmpresaResposta.Resposta.PossuiJustificativa)
                {
                    this.tx1_31.Enabled = true;
                    this.tx1_31.Style.Add(HtmlTextWriterStyle.BackgroundColor, "#FFFFFF");
                    this.tx2_31.Enabled = true;
                    this.tx2_31.Style.Add(HtmlTextWriterStyle.BackgroundColor, "#FFFFFF");
                    this.tx3_31.Enabled = true;
                    this.tx3_31.Style.Add(HtmlTextWriterStyle.BackgroundColor, "#FFFFFF");
                }
            }
        }
Ejemplo n.º 26
0
        private String MontarQuestionarioResponsabilidadeSocial(List <EntPergunta> lstEntPergunta)
        {
            String  html = "";
            String  htmlTabelaPopulada  = "<table>";
            String  htmlTabelaPopulada2 = "<table>";
            String  htmlTabelaPopulada3 = "<table>";
            Boolean tabelaPopulada      = false;
            Boolean tabelaCampoTexto    = false;
            Boolean Questao18Preenchida = false;

            foreach (EntPergunta objPergunta in lstEntPergunta)
            {
                if (!tabelaPopulada && objPergunta.PerguntaTipo.IdPerguntaTipo == EntPerguntaTipo.PERGUNTA_TIPO_ESPECIAL_3_QUESTIONARIO_RESPONSABILIDADE_SOCIAL_2011)
                {
                    MontarTabelaRespSocial(lstEntPergunta);
                    tabelaPopulada = true;
                }
                else if (!tabelaPopulada && objPergunta.PerguntaTipo.IdPerguntaTipo == EntPerguntaTipo.PERGUNTA_TIPO_MULTIPLA_ESCOLHA_4_OPCOES)
                {
                    this.objPergunta = objPergunta;
                    html            += GerarPergunta(objPergunta);
                    html            += this.RespostaAutomatica;
                    html            += this.Justificativa;
                    html            += "<br/>";
                }
                else if (objPergunta.PerguntaTipo.IdPerguntaTipo == EntPerguntaTipo.PERGUNTA_TIPO_ESPECIAL_8B_QUESTIONARIO_RESPONSABILIDADE_SOCIAL_2011)
                {
                    MontarTabelaQuestao18(objPergunta);
                    Questao18Preenchida = true;
                }
                else if (!tabelaCampoTexto && tabelaPopulada && objPergunta.PerguntaTipo.IdPerguntaTipo == EntPerguntaTipo.PERGUNTA_TIPO_ESPECIAL_7A_QUESTIONARIO_RESPONSABILIDADE_SOCIAL_2011)
                {
                    MontarTabelaCampoTexto(objPergunta);
                    tabelaCampoTexto = true;
                }
                else if (tabelaPopulada && objPergunta.PerguntaTipo.IdPerguntaTipo == EntPerguntaTipo.PERGUNTA_TIPO_MULTIPLA_ESCOLHA_4_OPCOES)
                {
                    this.objPergunta = objPergunta;

                    if (tabelaCampoTexto)
                    {
                        htmlTabelaPopulada2 += GerarPergunta(objPergunta);
                        htmlTabelaPopulada2 += this.RespostaAutomatica;
                        htmlTabelaPopulada2 += this.Justificativa;
                        html += "<br/>";
                    }
                    else if (Questao18Preenchida)
                    {
                        htmlTabelaPopulada3 += GerarPergunta(objPergunta);
                        htmlTabelaPopulada3 += this.RespostaAutomatica;
                        htmlTabelaPopulada3 += this.Justificativa;
                        html += "<br/>";
                    }
                    else
                    {
                        htmlTabelaPopulada += GerarPergunta(objPergunta);
                        htmlTabelaPopulada += this.RespostaAutomatica;
                        htmlTabelaPopulada += this.Justificativa;
                        html += "<br/>";
                    }
                }
                else if (tabelaPopulada && objPergunta.PerguntaTipo.IdPerguntaTipo == EntPerguntaTipo.PERGUNTA_TIPO_TEXTO)
                {
                    if (tabelaCampoTexto && !Questao18Preenchida)
                    {
                        htmlTabelaPopulada2 += MontarQuestaoCampoTexto(objPergunta);
                    }
                    else if (Questao18Preenchida)
                    {
                        htmlTabelaPopulada3 += MontarQuestaoCampoTexto(objPergunta);
                    }
                }
            }

            htmlTabelaPopulada      += "</table>";
            this.ltrRespSocial.Text  = htmlTabelaPopulada;
            htmlTabelaPopulada2     += "</table>";
            this.ltrRespSocial2.Text = htmlTabelaPopulada2;
            htmlTabelaPopulada3     += "</table>";
            this.ltrRespSocial3.Text = htmlTabelaPopulada3;
            return(html);
        }
Ejemplo n.º 27
0
        private String VerificaPerguntaRespondida(EntPerguntaResposta objPerguntaResposta, EntPergunta objPergunta)
        {
            String style = "";

            if (objPergunta.QuestionarioEmpresaResposta.Resposta.IdPerguntaResposta == objPerguntaResposta.IdPerguntaResposta)
            {
                style = " style=\"background-color: red;\" ";
            }
            return(style);
        }
Ejemplo n.º 28
0
        public void Editar(Int32 IdQuestionario, Int32 IdQuestionarioEmpresa, Int32 IdEmpresaCadastro, Int32 IdTurma, EntPergunta Pergunta)
        {
            this.IdQuestionario        = IdQuestionario;
            this.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
            this.IdEmpresaCadastro     = IdEmpresaCadastro;
            this.IdTurma  = IdTurma;
            this.Pergunta = Pergunta;
            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;
            if (this.Pergunta.QuestionarioEmpresaResposta.Resposta.IdPerguntaResposta == this.Pergunta.ListPerguntaResposta[0].IdPerguntaResposta)
            {
                this.radioA.Checked = true;
            }
            else if (this.Pergunta.QuestionarioEmpresaResposta.Resposta.IdPerguntaResposta == this.Pergunta.ListPerguntaResposta[1].IdPerguntaResposta)
            {
                this.radioB.Checked = true;
            }
            else if (this.Pergunta.QuestionarioEmpresaResposta.Resposta.IdPerguntaResposta == this.Pergunta.ListPerguntaResposta[2].IdPerguntaResposta)
            {
                this.radioC.Checked = true;
            }
            this.lblRespostaA.Text = this.Pergunta.ListPerguntaResposta[0].PerguntaResposta;
            this.lblRespostaB.Text = this.Pergunta.ListPerguntaResposta[1].PerguntaResposta;
            this.lblRespostaC.Text = this.Pergunta.ListPerguntaResposta[2].PerguntaResposta;
        }
Ejemplo n.º 29
0
        public void Editar(Int32 IdQuestionario, Int32 IdQuestionarioEmpresa, Int32 IdEmpresaCadastro, Int32 IdTurma, EntPergunta Pergunta)
        {
            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();

            List <EntPergunta> lista = new BllPergunta().ObterPerguntasPorQuestionarioEmpresa(IdQuestionario, IdQuestionarioEmpresa, false);

            MontarTabela(lista);
        }
Ejemplo n.º 30
0
        public void Editar(Int32 IdQuestionario, Int32 IdQuestionarioEmpresa, Int32 IdEmpresaCadastro, Int32 IdTurma, EntPergunta Pergunta)
        {
            this.IdQuestionario        = IdQuestionario;
            this.IdQuestionarioEmpresa = IdQuestionarioEmpresa;
            this.IdEmpresaCadastro     = IdEmpresaCadastro;
            this.IdTurma  = IdTurma;
            this.Pergunta = Pergunta;
            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.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");
            }
        }