Ejemplo n.º 1
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();
        }
        public void ObtenerDropDownList()
        {
            Marcas marca = new Marcas();

            MarcaDropDownList.DataSource     = marca.Listado(" * ", " 1=1 ", " ");
            MarcaDropDownList.DataTextField  = "Descripcion";
            MarcaDropDownList.DataValueField = "MarcaId";
            MarcaDropDownList.DataBind();
            MarcaDropDownList.Items.Insert(0, "Seleccionar--");

            Modelos modelo = new Modelos();

            ModeloDropDownList.DataSource     = modelo.Listado(" * ", " 1=1 ", " ");
            ModeloDropDownList.DataTextField  = "Descripcion";
            ModeloDropDownList.DataValueField = "ModeloId";
            ModeloDropDownList.DataBind();
            ModeloDropDownList.Items.Insert(0, "Seleccionar--");

            Motores motor = new Motores();

            MotorDropDownList.DataSource     = motor.Listado(" * ", " 1=1 ", " ");
            MotorDropDownList.DataTextField  = "Descripcion";
            MotorDropDownList.DataValueField = "MotorId";
            MotorDropDownList.DataBind();
            MotorDropDownList.Items.Insert(0, "Seleccionar--");

            Colores color = new Colores();

            ColorDropDownList.DataSource     = color.Listado(" * ", " 1=1 ", " ");
            ColorDropDownList.DataTextField  = "Descripcion";
            ColorDropDownList.DataValueField = "ColorId";
            ColorDropDownList.DataBind();
            ColorDropDownList.Items.Insert(0, "Seleccionar--");

            TipoVehiculos tipo = new TipoVehiculos();

            TipoDropDownList.DataSource     = tipo.Listado(" * ", " 1=1 ", " ");
            TipoDropDownList.DataTextField  = "Descripcion";
            TipoDropDownList.DataValueField = "TipoVehiculoId";
            TipoDropDownList.DataBind();
            TipoDropDownList.Items.Insert(0, "Seleccionar--");
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Utilitarios ut = new Utilitarios();

            if (!IsPostBack)
            {
                ClubDropDownList.DataSource     = Clubes.Listar("IdClub, Nombre", "1=1 and Idusuario = " + ut.ObjectToInt(Session["IdUsuario"].ToString()));
                ClubDropDownList.DataTextField  = "Nombre";
                ClubDropDownList.DataValueField = "IdClub";
                ClubDropDownList.DataBind();

                CargarMiembros();

                TipoDropDownList.DataSource     = TipoDocumentos.Listar("1=1", "IdTipoDocumento, Descripcion");
                TipoDropDownList.DataTextField  = "Descripcion";
                TipoDropDownList.DataValueField = "IdTipoDocumento";
                TipoDropDownList.DataBind();

                CargarDeudas();
            }
        }
Ejemplo n.º 4
0
        protected void Cargar()
        {
            Equipos      eq = new Equipos();
            TiposSalidas ts = new TiposSalidas();
            Bancas       b  = new Bancas();
            Mensajeros   m  = new Mensajeros();
            DataTable    dt = new DataTable();

            FechaLabel.Text     = DateTime.Now.ToString("dd/MM/yyy");
            FechaCargar.Visible = false;

            TipoDropDownList.DataSource     = ts.Listado("*", "1=1", "");
            TipoDropDownList.DataValueField = "TipoSalidaId";
            TipoDropDownList.DataTextField  = "Detalle";
            TipoDropDownList.DataBind();

            BancasDropDownList.DataSource     = b.Listado("*", "1=1", "");
            BancasDropDownList.DataValueField = "BancaId";
            BancasDropDownList.DataTextField  = "NumeroBanca";
            BancasDropDownList.DataBind();

            MensajerosDropDownList.DataSource     = m.Listado("*", "1=1", "");
            MensajerosDropDownList.DataValueField = "MensajeroId";
            MensajerosDropDownList.DataTextField  = "Nombres";
            MensajerosDropDownList.DataBind();

            EquiposDropDownList.DataSource     = eq.Listadodts("EstadoId = 1");
            EquiposDropDownList.DataValueField = "EquipoId";
            EquiposDropDownList.DataTextField  = "Aux";
            EquiposDropDownList.DataBind();

            dt.Columns.AddRange(new DataColumn[4] {
                new DataColumn("Equipo ID"), new DataColumn("Tipo de Equipo"), new DataColumn("Marca"), new DataColumn("Costo")
            });
            ViewState["Detalle"] = dt;
            ValidarCarga();
        }
 void LlenarCombos()
 {
     TipoDropDownList.DataSource = Enum.GetValues(typeof(TiposTransacciones));
     TipoDropDownList.DataBind();
 }