Example #1
0
        protected void grvreportes_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            paginacion = 0;

            paginacion = Convert.ToInt32(Request.QueryString["men"]);

            if (paginacion == 1)
            {
                grvreportes.PageIndex              = e.NewPageIndex;
                grvreportes.DataSource             = NegIngenieros.listaringenieros(1);
                grvreportes.Columns[11].HeaderText = "Ing. que atendera";
                grvreportes.DataBind();
                //Lblcontador.Text = "Total de reportes Abiertos:";
                Txtcontador.Visible = true;
                Txtcontador.Text    = this.grvreportes.Rows.Count.ToString();
                this.grvreportes.Columns[8].Visible  = false;
                this.grvreportes.Columns[10].Visible = false;
                this.grvreportes.Columns[14].Visible = false;
            }

            if (paginacion == 2)
            {
                grvreportes.PageIndex  = e.NewPageIndex;
                grvreportes.DataSource = NegTotalreportes.listarreportescerradoss(2);
                grvreportes.DataBind();
                //Lblcontador.Text = "Total de reportes cerrados:";
                Txtcontador.Visible = true;
                Txtcontador.Text    = this.grvreportes.Rows.Count.ToString();
            }

            if (paginacion == 3)
            {
                grvreportes.PageIndex              = e.NewPageIndex;
                grvreportes.DataSource             = NegIngenieros.reportesroberto(1);
                grvreportes.Columns[11].HeaderText = "Ing. que atendera";
                grvreportes.DataBind();
                //Lblcontador.Text = "Total de reportes Abiertos:";
                Txtcontador.Visible = true;
                Txtcontador.Text    = this.grvreportes.Rows.Count.ToString();
                this.grvreportes.Columns[8].Visible  = false;
                this.grvreportes.Columns[10].Visible = false;
                this.grvreportes.Columns[14].Visible = false;
            }
            if (paginacion == 4)
            {
                grvreportes.PageIndex  = e.NewPageIndex;
                grvreportes.DataSource = NegTotalreportes.listarreportescerrados(Txcord.Text, 2);
                grvreportes.DataBind();
                //Lblcontador.Text = "Total de reportes cerrados:";
                Txtcontador.Visible = true;
                Txtcontador.Text    = this.grvreportes.Rows.Count.ToString();
            }

            if (paginacion == 5)
            {
                grvreportes.PageIndex              = e.NewPageIndex;
                grvreportes.DataSource             = NegIngenieros.reporteshector(1);
                grvreportes.Columns[11].HeaderText = "Ing. que atendera";
                grvreportes.DataBind();
                //Lblcontador.Text = "Total de reportes Abiertos:";
                Txtcontador.Visible = true;
                Txtcontador.Text    = this.grvreportes.Rows.Count.ToString();
                this.grvreportes.Columns[8].Visible  = false;
                this.grvreportes.Columns[10].Visible = false;
                this.grvreportes.Columns[14].Visible = false;
            }

            if (paginacion == 6)
            {
                grvreportes.PageIndex  = e.NewPageIndex;
                grvreportes.DataSource = NegTotalreportes.listarreportescerrados(Txcord.Text, 2);
                grvreportes.DataBind();
                //Lblcontador.Text = "Total de reportes cerrados:";
                Txtcontador.Visible = true;
                Txtcontador.Text    = this.grvreportes.Rows.Count.ToString();
            }

            if (paginacion == 7)
            {
                grvreportes.PageIndex              = e.NewPageIndex;
                grvreportes.DataSource             = NegIngenieros.reportesfrancisco(1);
                grvreportes.Columns[11].HeaderText = "Ing. que atendera";
                grvreportes.DataBind();
                //Lblcontador.Text = "Total de reportes Abiertos:";
                Txtcontador.Visible = true;
                Txtcontador.Text    = this.grvreportes.Rows.Count.ToString();
                this.grvreportes.Columns[8].Visible  = false;
                this.grvreportes.Columns[10].Visible = false;
                this.grvreportes.Columns[14].Visible = false;
            }

            if (paginacion == 8)
            {
                grvreportes.PageIndex  = e.NewPageIndex;
                grvreportes.DataSource = NegTotalreportes.listarreportesporingeniero(Txcord.Text, 2);
                grvreportes.DataBind();
                //Lblcontador.Text = "Total de reportes cerrados:";
                Txtcontador.Visible = true;
                Txtcontador.Text    = this.grvreportes.Rows.Count.ToString();
            }

            if (paginacion == 9)
            {
                grvreportes.PageIndex              = e.NewPageIndex;
                grvreportes.DataSource             = NegIngenieros.reportessegismundo(1);
                grvreportes.Columns[11].HeaderText = "Ing. que atendera";
                grvreportes.DataBind();
                //Lblcontador.Text = "Total de reportes Abiertos:";
                Txtcontador.Visible = true;
                Txtcontador.Text    = this.grvreportes.Rows.Count.ToString();
                this.grvreportes.Columns[8].Visible  = false;
                this.grvreportes.Columns[10].Visible = false;
                this.grvreportes.Columns[14].Visible = false;
            }

            if (paginacion == 10)
            {
                grvreportes.PageIndex  = e.NewPageIndex;
                grvreportes.DataSource = NegTotalreportes.listarreportesporingeniero(Txcord.Text, 2);
                grvreportes.DataBind();
                Txtcontador.Visible = true;
                Txtcontador.Text    = this.grvreportes.Rows.Count.ToString();
            }


            if (paginacion == 11)
            {
                grvreportes.PageIndex              = e.NewPageIndex;
                grvreportes.DataSource             = NegIngenieros.reportesrobert(1);
                grvreportes.Columns[11].HeaderText = "Ing. que atendera";
                grvreportes.DataBind();
                //Lblcontador.Text = "Total de reportes Abiertos:";
                Txtcontador.Visible = true;
                Txtcontador.Text    = this.grvreportes.Rows.Count.ToString();
                this.grvreportes.Columns[8].Visible  = false;
                this.grvreportes.Columns[10].Visible = false;
                this.grvreportes.Columns[14].Visible = false;
            }

            if (paginacion == 12)
            {
                grvreportes.PageIndex  = e.NewPageIndex;
                grvreportes.DataSource = NegTotalreportes.listarreportesporingeniero(Txcord.Text, 2);
                grvreportes.DataBind();
                //Lblcontador.Text = "Total de reportes cerrados:";
                Txtcontador.Visible = true;
                Txtcontador.Text    = this.grvreportes.Rows.Count.ToString();
            }

            if (paginacion == 13)
            {
                grvreportes.PageIndex              = e.NewPageIndex;
                grvreportes.DataSource             = NegIngenieros.reporteshetor(1);
                grvreportes.Columns[11].HeaderText = "Ing. que atendera";
                grvreportes.DataBind();
                //Lblcontador.Text = "Total de reportes Abiertos:";
                Txtcontador.Visible = true;
                Txtcontador.Text    = this.grvreportes.Rows.Count.ToString();
                this.grvreportes.Columns[8].Visible  = false;
                this.grvreportes.Columns[10].Visible = false;
                this.grvreportes.Columns[14].Visible = false;
            }

            if (paginacion == 14)
            {
                grvreportes.PageIndex  = e.NewPageIndex;
                grvreportes.DataSource = NegTotalreportes.listarreportesporingeniero(Txcord.Text, 2);
                grvreportes.DataBind();
                //Lblcontador.Text = "Total de reportes cerrados:";
                Txtcontador.Visible = true;
                Txtcontador.Text    = this.grvreportes.Rows.Count.ToString();
            }



            if (paginacion == 15)
            {
                grvreportes.PageIndex              = e.NewPageIndex;
                grvreportes.DataSource             = NegIngenieros.reportesangel(1);
                grvreportes.Columns[11].HeaderText = "Ing. que atendera";
                grvreportes.DataBind();
                //Lblcontador.Text = "Total de reportes Abiertos:";
                Txtcontador.Visible = true;
                Txtcontador.Text    = this.grvreportes.Rows.Count.ToString();
                this.grvreportes.Columns[8].Visible  = false;
                this.grvreportes.Columns[10].Visible = false;
                this.grvreportes.Columns[14].Visible = false;
            }

            if (paginacion == 16)
            {
                grvreportes.PageIndex  = e.NewPageIndex;
                grvreportes.DataSource = NegTotalreportes.listarreportesporingeniero(Txcord.Text, 2);
                grvreportes.DataBind();
                Txtcontador.Visible = true;
                Txtcontador.Text    = this.grvreportes.Rows.Count.ToString();
            }


            //if (paginacion==5)
            //{
            //  grvreportes.PageIndex = e.NewPageIndex;
            //grvreportes.DataSource = NegIngenieros.reporteshector(1);
            //grvreportes.DataBind();
            //Txtcontador.Visible = true;
            //Txtcontador.Text = this.grvreportes.Rows.Count.ToString();
            //}
        }