Ejemplo n.º 1
0
        public void llenar()
        {
            //   consulta.obtnerSoportePorID("5c85c662e9d96ca0eea68f7f");


            dt  = controlador.dato_pag();
            dt2 = controlador.dato_view_pag_web();
            RepeaterPaginas.DataSource = dt2;
            RepeaterPaginas.DataBind();
            string hola = "fdsf";
            //
        }
Ejemplo n.º 2
0
    private void CarregarPaginas()
    {
        _alunoBo = new AlunoBo();
        Int32 qtdeAlunos = _alunoBo.ObterQtdeDeAlunos();

        Int32 qtdePaginas = qtdeAlunos / Convert.ToInt32(DropDownListQtdeRegistros.SelectedValue);
        Int32 resto       = qtdeAlunos % Convert.ToInt32(DropDownListQtdeRegistros.SelectedValue);

        if (resto > 0)
        {
            qtdePaginas += 1;
        }

        var classe = "";
        //LiteralPaginas.Text = "";
        var paginaComp = paginaAtual + 1;

        RepeaterPaginas.DataSource = new List <Pagina>
        {
            new Pagina {
                numeroPagina = 1, classe = "paginate_button active"
            },
            new Pagina {
                numeroPagina = 2, classe = "paginate_button"
            },
            new Pagina {
                numeroPagina = 3, classe = "paginate_button"
            },
            new Pagina {
                numeroPagina = 4, classe = "paginate_button"
            },
            new Pagina {
                numeroPagina = 5, classe = "paginate_button"
            }
        };
        RepeaterPaginas.DataBind();

        for (int i = 1; i <= qtdePaginas; i++)
        {
            if (i == paginaComp)
            {
                classe = "paginate_button active";
            }
            else
            {
                classe = "paginate_button";
            }
        }
    }