Exemplo n.º 1
0
        protected void FiltroDropDownList_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (FiltroDropDownList.SelectedIndex == 0)
            {
                AuxDropDownList.Visible             = false;
                FiltroTextBox.Visible               = true;
                ValidationSummary1.Enabled          = true;
                RequiredFieldValidator6.Enabled     = true;
                RegularExpressionValidator2.Enabled = true;
                Utilitarios.Operacion               = "EQ.EquipoId = ";
            }
            if (FiltroDropDownList.SelectedIndex == 1)
            {
                MarcaEquipos me = new MarcaEquipos();
                AuxDropDownList.DataSource     = me.Listado("*", "1=1", "");
                AuxDropDownList.DataTextField  = "Detalle";
                AuxDropDownList.DataValueField = "MarcaId";
                AuxDropDownList.DataBind();
                FiltroTextBox.Visible   = false;
                AuxDropDownList.Visible = true;
                Utilitarios.Operacion   = "EQ.MarcaId = ";
            }
            if (FiltroDropDownList.SelectedIndex == 2)
            {
                Estado es = new Estado();
                AuxDropDownList.DataSource     = es.Listado("*", "1=1", "");
                AuxDropDownList.DataTextField  = "Descripcion";
                AuxDropDownList.DataValueField = "EstadoId";
                AuxDropDownList.DataBind();
                FiltroTextBox.Visible   = false;
                AuxDropDownList.Visible = true;
                Utilitarios.Operacion   = "EQ.EstadoId = ";
            }

            if (FiltroDropDownList.SelectedIndex == 3)
            {
                TiposEquipos te = new TiposEquipos();
                AuxDropDownList.DataSource     = te.Listado("*", "1=1", "");
                AuxDropDownList.DataTextField  = "Detalle";
                AuxDropDownList.DataValueField = "TipoEquipoId";
                AuxDropDownList.DataBind();
                FiltroTextBox.Visible   = false;
                AuxDropDownList.Visible = true;
                Utilitarios.Operacion   = "EQ.TipoEquipoId = ";
            }
        }
Exemplo n.º 2
0
        public void Cargar()
        {
            MarcaEquipos me = new MarcaEquipos();
            TiposEquipos te = new TiposEquipos();

            Limpiar();

            MarcaDropDownList.DataSource     = me.Listado("*", "1=1", "");
            MarcaDropDownList.DataValueField = "MarcaId";
            MarcaDropDownList.DataTextField  = "Detalle";
            MarcaDropDownList.DataBind();

            TipoDropDownList.DataSource     = te.Listado("*", "1=1", "");
            TipoDropDownList.DataValueField = "TipoEquipoId";
            TipoDropDownList.DataTextField  = "Detalle";
            TipoDropDownList.DataBind();
            SerialNumTextBox.Focus();
        }