protected void Button1_Click(object sender, EventArgs e)
        {
            string ced   = "";
            string tk    = "";
            string placa = "";

            ced   = txtcedula.Text;
            tk    = txtticket.Text;
            placa = txtplaca.Text;

            conexionbd obje = new conexionbd();
            DataSet    dt   = new DataSet();

            dt = obje.CargarSolicitudes(ced, tk, placa, 1);

            GridView1.DataSource = dt;
            GridView1.DataBind();

            if (ced == "" && placa == "" && tk == "")
            {
                lblresp.Text = "Consulta sin filtros";
            }

            else
            {
                lblresp.Text = "Consulta Filtrada";
            }
        }
Ejemplo n.º 2
0
        public void ConsultarTodasSolicitudes()
        {
            solicitud  oSolicitud = new solicitud();
            conexionbd obje       = new conexionbd();
            DataSet    dt         = new DataSet();

            dt = obje.CargarSolicitudes("", "", "", 2);

            GridView1.DataSource = dt;
            GridView1.DataBind();
            int conteo = 0;

            conteo = oSolicitud.ContarPendientes();



            lbltareas.Text = "Tareas Pendientes: " + conteo;
            if (chktodas.Checked)
            {
                dt = obje.CargarSolicitudes("", "", "", 3);

                gvtodas.DataSource = dt;
                gvtodas.DataBind();
                GridView1.Dispose();
                Pnlpendientes.Dispose();
                Pnlpendientes.Visible = false;


                PnlTodas.Visible = true;

                lbltareas.Text = "Todas las tareas";
            }
            else
            {
                Pnlpendientes.Visible = true;

                PnlTodas.Visible = false;
            }
        }
Ejemplo n.º 3
0
        protected void gvtodas_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            conexionbd obje = new conexionbd();
            DataSet    dt   = new DataSet();

            gvtodas.PageIndex = e.NewPageIndex;

            dt = obje.CargarSolicitudes("", "", "", 3);
            gvtodas.DataSource = dt;
            gvtodas.DataBind();
            GridView1.Dispose();
            Pnlpendientes.Dispose();
            Pnlpendientes.Visible = false;
            // GridView1.Visible = false;

            PnlTodas.Visible = true;
            //  gvtodas.Visible = true;
        }
        protected void  GridView1_PageIndexChanging1(object sender, GridViewPageEventArgs e)
        {
            string ced   = "";
            string tk    = "";
            string placa = "";

            ced   = txtcedula.Text;
            tk    = txtticket.Text;
            placa = txtplaca.Text;

            conexionbd obje = new conexionbd();
            DataSet    dt   = new DataSet();

            GridView1.PageIndex = e.NewPageIndex;
            dt = obje.CargarSolicitudes(ced, tk, placa, 1);


            GridView1.DataSource = dt;

            GridView1.DataBind();
        }