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(); //} }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["men"] != null) { int men = Convert.ToInt32(Request.QueryString["men"]); if (men == 1) { Lblreporte.Text = "Reportes Abiertos o en Proceso General"; 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 (men == 2) { Lblreporte.Text = "Reportes Cerrados General"; grvreportes.DataSource = NegTotalreportes.listarreportescerradoss(2); grvreportes.DataBind(); Lblcontador.Text = "Total de reportes cerrados:"; Txtcontador.Visible = true; Txtcontador.Text = this.grvreportes.Rows.Count.ToString(); } if (men == 3) { Lblreporte.Text = "Reportes Abiertos o en Proceso Zona Roberto Cortez"; 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(); paginacion = 3; this.grvreportes.Columns[8].Visible = false; this.grvreportes.Columns[10].Visible = false; this.grvreportes.Columns[14].Visible = false; } if (men == 4) { Lblreporte.Text = "Reportes Cerrados Zona Roberto Cortez"; Txcord.Text = "Roberto Cortez"; 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 (men == 5) { Lblreporte.Text = "Reportes Abiertos o en Proceso Zona Hector Ruiz"; 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(); paginacion = 5; this.grvreportes.Columns[8].Visible = false; this.grvreportes.Columns[10].Visible = false; this.grvreportes.Columns[14].Visible = false; } if (men == 6) { Lblreporte.Text = "Reportes Cerrados Zona Hector Ruiz"; Txcord.Text = "Hector Ruiz"; 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 (men == 7) { Lblreporte.Text = "Reportes Abiertos o en Proceso Francisco Nonato"; 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 (men == 8) { Lblreporte.Text = "Reportes Cerrados Francisco Nonato"; Txcord.Text = "Francisco Nonato"; 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 (men == 9) { Lblreporte.Text = "Reportes Abiertos o en Proceso Segismundo Mateos"; 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 (men == 10) { Lblreporte.Text = "Reportes Cerrados Segismundo Mateos"; Txcord.Text = "Segismundo Mateos"; 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 (men == 11) { Lblreporte.Text = "Reportes Abiertos o en Proceso Roberto Cortez"; Txcord.Text = "Roberto Cortez"; grvreportes.DataSource = NegTotalreportes.listarreportesporingenieroabiertos(Txcord.Text, 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 (men == 12) { Lblreporte.Text = "Reportes Cerrados Roberto Cortez"; Txcord.Text = "Roberto Cortez"; 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 (men == 13) { Lblreporte.Text = "Reportes Abiertos o en Proceso Hector Ruiz"; Txcord.Text = "Hector Ruiz"; grvreportes.DataSource = NegTotalreportes.listarreportesporingenieroabiertos(Txcord.Text, 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 (men == 14) { Lblreporte.Text = "Reportes Cerrados Hector Ruiz"; Txcord.Text = "Hector Ruiz"; 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 (men == 15) { Lblreporte.Text = "Reportes Abiertos o en Proceso Angel Cordero"; Txcord.Text = "Angel Cordero"; grvreportes.DataSource = NegTotalreportes.listarreportesporingenieroabiertos(Txcord.Text, 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 (men == 16) { Lblreporte.Text = "Reportes Cerrados Angel Cordero"; Txcord.Text = "Angel Cordero"; 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(); } } else { } buscaratrasados(); } }