protected void grdRanking_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { RelRankingClassificada objRelRankingClassificada = ((RelRankingClassificada)e.Row.DataItem); Label lblIdQuestionarioEmpresa = ((Label)e.Row.FindControl("lblIdQuestionarioEmpresa")); Label lblPassaProximaEtapa = ((Label)e.Row.FindControl("lblFlPassaProximaEtapa")); Label lblEtapaAtiva = ((Label)e.Row.FindControl("lblFlEtapaAtiva")); Boolean isEtapaAtiva = false; if (lblEtapaAtiva.Text == "True") { isEtapaAtiva = true; } Label lblRanking = ((Label)e.Row.FindControl("lblRanking")); lblRanking.Text = IntUtils.ToString(e.Row.RowIndex + 1); ImageButton imgBttn = ((ImageButton)e.Row.FindControl("imgBttnDevolver")); Label lblParaAvaliacao = ((Label)e.Row.FindControl("lblParaAvaliacao")); this.AlterarCheck(imgBttn, StringUtils.ToBoolean(lblParaAvaliacao.Text), isEtapaAtiva && !StringUtils.ToBoolean(lblPassaProximaEtapa.Text)); imgBttn = ((ImageButton)e.Row.FindControl("imgBttnFinalista")); this.AlterarCheck(imgBttn, StringUtils.ToBoolean(lblPassaProximaEtapa.Text), isEtapaAtiva && !StringUtils.ToBoolean(lblParaAvaliacao.Text)); HyperLink hyperLink1 = ((HyperLink)e.Row.FindControl("HyperLink1")); Label lblProtocolo = ((Label)e.Row.FindControl("lblProtocolo")); String Url = "/MPE/Paginas/DownloadPDF.aspx?protocolo=" + lblProtocolo.Text + "&comentarios=false&programaId=" + objPrograma.IdPrograma; hyperLink1.NavigateUrl = Url; } }
/*private void DevolverParaAvaliador(Int32 IdQuestionarioEmpresa, String Justificativa) * { * EntQuestionarioEmpresaAvaliador objQuestionarioEmpresaAvaliador = new EntQuestionarioEmpresaAvaliador(); * objQuestionarioEmpresaAvaliador.QuestionarioEmpresa.IdQuestionarioEmpresa = IdQuestionarioEmpresa; * objQuestionarioEmpresaAvaliador.MotivoDevolucao = Justificativa; * objQuestionarioEmpresaAvaliador.QuestionarioEmpresa.ParaAvaliador = true; * * new BllRelatorioRanking().DevolverParaAvaliador(objQuestionarioEmpresaAvaliador); * this.PopulaGridEmpresa(); * }*/ protected void grdRanking_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { RelRankingClassificada objRelRankingClassificada = ((RelRankingClassificada)e.Row.DataItem); Label lblIdQuestionarioEmpresa = ((Label)e.Row.FindControl("lblIdQuestionarioEmpresa")); Label lblRanking = ((Label)e.Row.FindControl("lblRanking")); lblRanking.Text = IntUtils.ToString(e.Row.RowIndex + 1); ImageButton imgBttn = ((ImageButton)e.Row.FindControl("imgBttnDevolver")); Label lblParaAvaliacao = ((Label)e.Row.FindControl("lblParaAvaliacao")); this.AlterarCheck(imgBttn, StringUtils.ToBoolean(lblParaAvaliacao.Text)); imgBttn = ((ImageButton)e.Row.FindControl("imgBttnFinalista")); this.AlterarCheck(imgBttn, objRelRankingClassificada.Finalista); imgBttn = ((ImageButton)e.Row.FindControl("imgBttnFinalistaResponsabilidadeSocial")); imgBttn.Visible = objRelRankingClassificada.PossuiResponsabilidadeSocial; this.AlterarCheck(imgBttn, objRelRankingClassificada.FinalistaResponsabilidadeSocial); imgBttn = ((ImageButton)e.Row.FindControl("imgBttnFinalistaInovacao")); imgBttn.Visible = objRelRankingClassificada.PossuiInovacao; this.AlterarCheck(imgBttn, objRelRankingClassificada.FinalistaInovacao); } }
protected void grdRanking_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { RelRankingClassificada objRelRankingClassificada = ((RelRankingClassificada)e.Row.DataItem); Label lblIdQuestionarioEmpresa = ((Label)e.Row.FindControl("lblIdQuestionarioEmpresa")); Label lblPassaProximaEtapa = ((Label)e.Row.FindControl("lblFlPassaProximaEtapa")); ImageButton imgBttnFinalista = ((ImageButton)e.Row.FindControl("imgBttnFinalista")); ImageButton imgBttnDesclassificar = ((ImageButton)e.Row.FindControl("imgBttnDesclassificar")); CheckBox ChckBxDesclassificar = ((CheckBox)e.Row.FindControl("ChckBxDesclassificar")); if (ChckBxDesclassificar.Checked) { imgBttnDesclassificar.ImageUrl = "~/Image/checked.gif"; ChckBxDesclassificar.Checked = true; imgBttnFinalista.Enabled = false; } else { imgBttnDesclassificar.ImageUrl = "~/Image/unchecked.gif"; ChckBxDesclassificar.Checked = false; imgBttnFinalista.Enabled = true; } Label lblEtapaAtiva = ((Label)e.Row.FindControl("lblFlEtapaAtiva")); Boolean isEtapaAtiva = false; if (lblEtapaAtiva.Text == "True") { isEtapaAtiva = true; } Label lblRanking = ((Label)e.Row.FindControl("lblRanking")); lblRanking.Text = IntUtils.ToString(e.Row.RowIndex + 1); ImageButton imgBttn = ((ImageButton)e.Row.FindControl("imgBttnDevolver")); Label lblParaAvaliacao = ((Label)e.Row.FindControl("lblParaAvaliacao")); this.AlterarCheck(imgBttn, StringUtils.ToBoolean(lblParaAvaliacao.Text), isEtapaAtiva && !StringUtils.ToBoolean(lblPassaProximaEtapa.Text)); imgBttn = ((ImageButton)e.Row.FindControl("imgBttnFinalista")); this.AlterarCheck(imgBttn, StringUtils.ToBoolean(lblPassaProximaEtapa.Text), isEtapaAtiva && !StringUtils.ToBoolean(lblParaAvaliacao.Text)); Label lblMarcaQuestoesEspeciais = ((Label)e.Row.FindControl("lblMarcaQuestoesEspeciais")); if (lblMarcaQuestoesEspeciais.Text == "Sim") { e.Row.Style.Add("background-color", "#FFFFB5"); } } }