예제 #1
0
        /// <summary>
        /// Retorna um Desempenho Global
        /// </summary>
        /// <autor>Fernando Carvalho</autor>
        /// <param name="transaction">Transaction</param>
        /// <param name="db">DataBase</param>
        /// <returns><list type="EntCargo">Lista de EntDesempenhoGlobal</list></returns>
        public List <EntDesempenhoGlobal> GerarDesempenhoGlobal2011(EntDesempenhoGlobal objDesempenhoGlobal, DbTransaction transaction, Database db)
        {
            DbCommand dbCommand = db.GetStoredProcCommand("STP_SelecionaDesempenhoGlobal2011");

            dbCommand.CommandTimeout = BdConfig.CommmandTimeout;

            db.AddInParameter(dbCommand, "@NomeFantasia", DbType.String, objDesempenhoGlobal.NomeFantasia);
            db.AddInParameter(dbCommand, "@CPF_CNPJ", DbType.String, objDesempenhoGlobal.CPF_CNPJ);
            db.AddInParameter(dbCommand, "@Regiao", DbType.Int32, IntUtils.ToIntNull(objDesempenhoGlobal.Regiao));
            db.AddInParameter(dbCommand, "@Categoria", DbType.Int32, IntUtils.ToIntNull(objDesempenhoGlobal.Categoria));
            db.AddInParameter(dbCommand, "@Grupo", DbType.Int32, IntUtils.ToIntNull(objDesempenhoGlobal.Grupo));
            db.AddInParameter(dbCommand, "@Estado", DbType.Int32, IntUtils.ToIntNull(objDesempenhoGlobal.Estado));
            db.AddInParameter(dbCommand, "@EstadoRegiao", DbType.Int32, IntUtils.ToIntNull(objDesempenhoGlobal.EstadoRegiao));
            db.AddInParameter(dbCommand, "@Cidade", DbType.Int32, IntUtils.ToIntNull(objDesempenhoGlobal.Cidade));
            db.AddInParameter(dbCommand, "@EscritorioRegional", DbType.Int32, IntUtils.ToIntNull(objDesempenhoGlobal.EscritorioRegional));
            db.AddInParameter(dbCommand, "@Status", DbType.Int32, IntUtils.ToIntNull(objDesempenhoGlobal.Status));
            db.AddInParameter(dbCommand, "@PremioEspecial", DbType.Int32, BooleanUtils.ToInt(objDesempenhoGlobal.PremioEspecial));
            db.AddInParameter(dbCommand, "@Turma", DbType.Int32, IntUtils.ToIntNull(objDesempenhoGlobal.Turma));



            dbCommand.CommandTimeout = BdConfig.CommmandTimeout;

            using (DbDataReader dtrDados = (System.Data.Common.DbDataReader)db.ExecuteReader(dbCommand, transaction))
            {
                if (dtrDados != null && dtrDados.HasRows)
                {
                    return(this.Popular(dtrDados));
                }
                else
                {
                    return(new List <EntDesempenhoGlobal>());
                }
            }
        }
예제 #2
0
 private void ObjectToPage(EntTurma objTurma)
 {
     this.HddnFldTurma.Value      = objTurma.IdTurma.ToString();
     this.ddlEstado.SelectedValue = objTurma.Estado.IdEstado.ToString();
     this.TxtNome.Text            = objTurma.Turma;
     this.TxtDescricao.Text       = objTurma.Descricao;
     this.rbTipo.SelectedValue    = BooleanUtils.ToInt(objTurma.Privada).ToString();
 }
예제 #3
0
        private void EnviarEmail(String Email)
        {
            Int32   RowIndex  = ObjectUtils.ToInt(hddRowIndex.Value);
            String  protocolo = ((Label)grdRelatorioRAA.Rows[RowIndex].Cells[15].Controls[1]).Text;
            Int32   programa  = StringUtils.ToInt(((Label)grdRelatorioRAA.Rows[RowIndex].Cells[16].Controls[1]).Text);
            Boolean avaliador = StringUtils.ToBoolean(((Label)grdRelatorioRAA.Rows[RowIndex].Cells[17].Controls[1]).Text);
            String  caminho   = "";

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

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

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

                    if (listEmpresaCadastro != null)
                    {
                        caminho = gerarRelatorioPDF(listEmpresaCadastro[0].IdEmpresaCadastro.ToString(), listEmpresaCadastro[0].CPF_CNPJ, listQuestionarioEmpresa[0].IdQuestionarioEmpresa.ToString(), protocolo, estado, categoria, false, programa, objTurma.IdTurma, BooleanUtils.ToInt(avaliador), 0, true, this.Page);
                    }
                }
                if (caminho != "")
                {
                    WebUtils.EnviaEmailRaa(Email, "", caminho);
                }
            }
            UCStatus1.UpdateControls();
        }
예제 #4
0
        protected void grdRelatorioRAA_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "Email")
            {
                hddRowIndex.Value = ObjectUtils.ToString(e.CommandArgument);
                this.UCConfirmaEmail1.Show();
            }
            else if (e.CommandName == "Download")
            {
                hddRowIndex.Value = ObjectUtils.ToString(e.CommandArgument);
                Boolean comentarios = false;
                Int32   intro       = 0;
                Int32   RowIndex    = ObjectUtils.ToInt(hddRowIndex.Value);
                String  estado      = null;
                String  categoria   = null;
                String  protocolo   = ((Label)grdRelatorioRAA.Rows[RowIndex].Cells[15].Controls[1]).Text;
                Int32   programaId  = StringUtils.ToInt(((Label)grdRelatorioRAA.Rows[RowIndex].Cells[16].Controls[1]).Text);
                Boolean avaliador   = StringUtils.ToBoolean(((Label)grdRelatorioRAA.Rows[RowIndex].Cells[17].Controls[1]).Text);
                String  caminho     = "";

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

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

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

                UCStatus1.UpdateControls();
//                Response.Redirect("~/FGA/Paginas/RelatorioRAA.aspx");
            }
        }
예제 #5
0
        protected void grdRanking_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int index = ObjectUtils.ToInt(e.CommandArgument) - (grdRanking.PageIndex * grdRanking.PageSize);

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

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

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

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

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

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

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

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

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

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

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

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

                    if (listEmpresaCadastro != null)
                    {
                        caminho = new PaginaBase().gerarRelatorioPDF(listEmpresaCadastro[0].IdEmpresaCadastro.ToString(), listEmpresaCadastro[0].CPF_CNPJ, listQuestionarioEmpresa[0].IdQuestionarioEmpresa.ToString(), protocolo, estado, categoria, comentarios, programaId, objTurma.IdTurma, 1, intro, false, this.Page);
                        if (caminho != "")
                        {
                            NovaJanela(this.Page, caminho);
                        }
                    }
                }
            }
            PopulaGridEmpresa();
        }
예제 #6
0
        protected void grdSimplificado_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int Index = ObjectUtils.ToInt(e.CommandArgument) - (grdSimplificado.PageIndex * grdSimplificado.PageSize);

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

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

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

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

                this.divDevolucao.Style.Add("display", "block");
            }
        }
예제 #7
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();
        }
예제 #8
0
        protected void grdSimplificado_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int Index = ObjectUtils.ToInt(e.CommandArgument) - (grdSimplificado.PageIndex * grdSimplificado.PageSize);

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

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

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

                    if (listEmpresaCadastro != null)
                    {
                        caminho = new PaginaBase().gerarRelatorioPDF(listEmpresaCadastro[0].IdEmpresaCadastro.ToString(), listEmpresaCadastro[0].CPF_CNPJ, listQuestionarioEmpresa[0].IdQuestionarioEmpresa.ToString(), protocolo, estado, categoria, comentarios, programaId, objTurma.IdTurma, BooleanUtils.ToInt(avaliador), intro, false, this.Page);
                        if (caminho != "")
                        {
                            NovaJanela(this.Page, caminho);
                        }
                    }
                }
            }
        }
예제 #9
0
        protected void grdSimplificado_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int Index = ObjectUtils.ToInt(e.CommandArgument) - (grdSimplificado.PageIndex * grdSimplificado.PageSize);

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

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

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

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

                        new BllQuestionarioEmpresaAvaliador().Inserir(objQuestionarioEmpresaAvaliador);
                    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if (listEmpresaCadastro != null)
                    {
                        caminho = new PaginaBase().gerarRelatorioPDF(listEmpresaCadastro[0].IdEmpresaCadastro.ToString(), listEmpresaCadastro[0].CPF_CNPJ, listQuestionarioEmpresa[0].IdQuestionarioEmpresa.ToString(), protocolo, estado, categoria, comentarios, programaId, objTurma.IdTurma, BooleanUtils.ToInt(avaliador), intro, false, this.Page);
                        if (caminho != "")
                        {
                            NovaJanela(this.Page, caminho);
                        }
                    }
                }
            }
        }
예제 #10
0
        private void ObjectToPage(EntInscricoesEmpresa objInscricoesEmpresa)
        {
            this.HddnFldIdProgramaEmpresa.Value = IntUtils.ToString(objInscricoesEmpresa.ProgramaEmpresa.IdProgramaEmpresa);

            // Dados da Empresa
            this.TxtBxRazaoSocial.Text  = objInscricoesEmpresa.TurmaEmpresa.EmpresaCadastro.RazaoSocial;
            this.TxtBxNomeFantasia.Text = objInscricoesEmpresa.TurmaEmpresa.EmpresaCadastro.NomeFantasia;
            if (objInscricoesEmpresa.TurmaEmpresa.EmpresaCadastro.PessoaJuridica)
            {
                this.TxtBxCNPJCPF.Text = FormatUtils.FormatCNPJ(objInscricoesEmpresa.TurmaEmpresa.EmpresaCadastro.CPF_CNPJ);
                this.LblCPF_CNPJ.Text  = "CNPJ:";
            }
            else
            {
                this.TxtBxCNPJCPF.Text = FormatUtils.FormatCPF(objInscricoesEmpresa.TurmaEmpresa.EmpresaCadastro.CPF_CNPJ);
                this.LblCPF_CNPJ.Text  = "CPF:";
            }

            this.TxtBxDataAbertura.Text     = DateUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.EmpresaCadastro.AberturaEmpresa);
            this.TxtBxNumeroEmpregados.Text = IntUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.NumeroFuncionario);
            this.TxtBxEndereco.Text         = objInscricoesEmpresa.TurmaEmpresa.Endereco;
            this.TxtBxComplemento.Text      = objInscricoesEmpresa.TurmaEmpresa.Complemento;
            this.TxtBxNumero.Text           = objInscricoesEmpresa.TurmaEmpresa.NumeroEndereco;
            this.TxtBxCEP.Text = FormatUtils.FormatCEP(objInscricoesEmpresa.TurmaEmpresa.CEP);
            this.TxtBxPrincipalAtividade.Text = objInscricoesEmpresa.TurmaEmpresa.AtividadeEconomicaComplemento;

            //this.SelecionaListItem(this.DrpDwnLstTipoEmpresa, objInscricoesEmpresa.TurmaEmpresa.TipoEmpresa.IdTipoEmpresa);
            this.CmbBxTipoEmpresa.SelectedValue = IntUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.TipoEmpresa.IdTipoEmpresa);
            this.SelecionaListItem(this.CmbBxFaturamento, objInscricoesEmpresa.TurmaEmpresa.Faturamento.IdFaturamento);

            //this.SelecionaListItem(this.DrpDwnLstCategoria, objInscricoesEmpresa.TurmaEmpresa.Categoria.IdCategoria);
            this.CmbBxCategoria.SelectedValue = IntUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.Categoria.IdCategoria);

            this.PopulaAtividadeEconomica(objInscricoesEmpresa.TurmaEmpresa.AtividadeEconomica);

            if (objInscricoesEmpresa.TurmaEmpresa.Estado.IdEstado == 0)
            {
                objInscricoesEmpresa.TurmaEmpresa.Estado = objInscricoesEmpresa.ProgramaEmpresa.EmpresaCadastro.Estado;
            }

            this.SelecionaListItem(this.CmbBxEstado, objInscricoesEmpresa.TurmaEmpresa.Estado.IdEstado);

            if (this.CmbBxEstado.SelectedIndex > 0)
            {
                this.CmbBxCidade.Enabled = true;
            }

            this.PopulaCidade(objInscricoesEmpresa.TurmaEmpresa.Estado.IdEstado);
            this.SelecionaListItem(this.CmbBxCidade, objInscricoesEmpresa.TurmaEmpresa.Cidade.IdCidade);

            if (this.CmbBxCidade.SelectedIndex > 0)
            {
                this.CmbBxBairro.Enabled = true;
            }

            this.PopulaBairro(objInscricoesEmpresa.TurmaEmpresa.Cidade.IdCidade);
            this.SelecionaListItem(this.CmbBxBairro, objInscricoesEmpresa.TurmaEmpresa.Bairro.IdBairro);


            // 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.RdBttnLstSexo.SelectedValue  = objInscricoesEmpresa.TurmaEmpresa.SexoContato;
            this.TxtBxDtNascimento.Text       = DateUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.NascimentoContato);
            this.TxtBxEnderecoCompleto.Text   = objInscricoesEmpresa.TurmaEmpresa.EnderecoContato;
            this.TxtBxComplementoContato.Text = objInscricoesEmpresa.TurmaEmpresa.ComplementoContato;
            this.TxtBxNumeroContato.Text      = objInscricoesEmpresa.TurmaEmpresa.NumeroEnderecoContato;
            this.TxtBxCEPContato.Text         = FormatUtils.FormatCEP(objInscricoesEmpresa.TurmaEmpresa.CEPContato);
            this.TxtBxTelefoneFixo.Text       = FormatUtils.FormatTelefone(objInscricoesEmpresa.TurmaEmpresa.TelefoneContato);
            this.CmbBxCargo.SelectedValue     = IntUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.Cargo.IdCargo);

            this.SelecionaListItem(this.CmbBxEstadoContato, objInscricoesEmpresa.TurmaEmpresa.EstadoContato.IdEstado);

            if (this.CmbBxEstadoContato.SelectedIndex > 0)
            {
                this.CmbBxCidadeContato.Enabled = true;
            }

            this.PopulaCidadeContato(objInscricoesEmpresa.TurmaEmpresa.EstadoContato.IdEstado);
            this.SelecionaListItem(this.CmbBxCidadeContato, objInscricoesEmpresa.TurmaEmpresa.CidadeContato.IdCidade);

            if (this.CmbBxCidadeContato.SelectedIndex > 0)
            {
                this.CmbBxBairroContato.Enabled = true;
            }

            this.PopulaBairroContato(objInscricoesEmpresa.TurmaEmpresa.CidadeContato.IdCidade);
            this.SelecionaListItem(this.CmbBxBairroContato, objInscricoesEmpresa.TurmaEmpresa.BairroContato.IdBairro);

            this.CmbBxNivelEscolaridade.SelectedValue = IntUtils.ToString(objInscricoesEmpresa.TurmaEmpresa.ContatoNivelEscolaridade.IdContatoNivelEscolaridade);

            // Teste de AutoAvaliação
            if (TxtBxEndereco.Text != "")
            {
                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();
                this.tabelaResposta.Style.Add("display", "block");
            }
            int numSim = 0;

            if (objInscricoesEmpresa.TurmaEmpresa.Pergunta1)
            {
                numSim = numSim + 1;
            }
            if (objInscricoesEmpresa.TurmaEmpresa.Pergunta2)
            {
                numSim = numSim + 1;
            }
            if (objInscricoesEmpresa.TurmaEmpresa.Pergunta3)
            {
                numSim = numSim + 1;
            }
            if (objInscricoesEmpresa.TurmaEmpresa.Pergunta4 && numSim < 3)
            {
                numSim = numSim + 1;
            }
            if (numSim == 1)
            {
                linha1Coluna1.Style.Add("background", "#58ACFA");
                linha1Coluna2.Style.Add("background", "#58ACFA");
            }
            else if (numSim == 2)
            {
                linha2Coluna1.Style.Add("background", "#58ACFA");
                linha2Coluna2.Style.Add("background", "#58ACFA");
            }
            else if (numSim >= 3)
            {
                linha3Coluna1.Style.Add("background", "#58ACFA");
                linha3Coluna2.Style.Add("background", "#58ACFA");
            }
        }