Beispiel #1
0
        protected void grdRanking_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                RelRankingPegFase2 objRelRankingClassificada = ((RelRankingPegFase2)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("imgBttnFinalista"));
                this.AlterarCheck(imgBttn, StringUtils.ToBoolean(lblPassaProximaEtapa.Text), isEtapaAtiva);

                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;
            }
        }
Beispiel #2
0
        protected void grdRanking_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                RelRankingPegFase2 objRelRankingClassificada = ((RelRankingPegFase2)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("imgBttnDesclassificar"));
                Label       lblExcluido = ((Label)e.Row.FindControl("lblExcluido"));
                this.AlterarCheck(imgBttn, StringUtils.ToBoolean(lblExcluido.Text), isEtapaAtiva && !StringUtils.ToBoolean(lblPassaProximaEtapa.Text));

                imgBttn = ((ImageButton)e.Row.FindControl("imgBttnFinalista"));
                this.AlterarCheck(imgBttn, StringUtils.ToBoolean(lblPassaProximaEtapa.Text), isEtapaAtiva);
            }
        }