예제 #1
0
        private void LlenarDropDownList()
        {
            RepositorioBase <Clientes> clientes = new RepositorioBase <Clientes>();

            ClienteDropDownList.Items.Clear();
            ClienteDropDownList.DataSource     = clientes.GetList(x => true);
            ClienteDropDownList.DataValueField = "ClienteId";
            ClienteDropDownList.DataTextField  = "Nombres";
            ClienteDropDownList.DataBind();

            RepositorioBase <Vehiculos> ve = new RepositorioBase <Vehiculos>();

            VehiculoDropDownList.Items.Clear();
            VehiculoDropDownList.DataSource     = ve.GetList(x => true);
            VehiculoDropDownList.DataValueField = "VehiculoId";
            VehiculoDropDownList.DataTextField  = "Descripcion";
            VehiculoDropDownList.DataBind();

            RepositorioBase <Usuarios> U = new RepositorioBase <Usuarios>();

            UsuarioDropDownList.Items.Clear();
            UsuarioDropDownList.DataSource     = U.GetList(x => true);
            UsuarioDropDownList.DataValueField = "UsuarioId";
            UsuarioDropDownList.DataTextField  = "Usuarioss";
            UsuarioDropDownList.DataBind();

            ViewState["Ventas"] = new Ventas();
        }
예제 #2
0
        public void ObtenerDropDownList()
        {
            Clientes cliente = new Clientes();

            ClienteDropDownList.DataSource     = cliente.Listado(" * ", " 1=1 ", " ");
            ClienteDropDownList.DataTextField  = "NombreCompleto";
            ClienteDropDownList.DataValueField = "ClienteId";
            ClienteDropDownList.DataBind();

            Vehiculos vehiculo = new Vehiculos();

            VehiculoDropDownList.DataSource     = vehiculo.Listado(" * ", " Vendido != 1 ", " ");
            VehiculoDropDownList.DataTextField  = "VehiculoId";
            VehiculoDropDownList.DataValueField = "VehiculoId";
            VehiculoDropDownList.DataBind();
        }
예제 #3
0
        private void LlenaDropDown()
        {
            //RepositorioBase<Vehiculos> repositorioVehiculos = new RepositorioBase<Vehiculos>();
            VehiculoDropDownList.DataSource           = repositorioVehiculos.GetList(x => true);
            VehiculoDropDownList.DataValueField       = "VehiculoId";
            VehiculoDropDownList.DataTextField        = "Marca";
            VehiculoDropDownList.AppendDataBoundItems = true;
            VehiculoDropDownList.DataBind();


            // RepositorioBase<Clientes> repositorioClientes = new RepositorioBase<Clientes>();
            ClienteDropDownList.DataSource           = repositorioCliente.GetList(x => true);
            ClienteDropDownList.DataValueField       = "ClienteId";
            ClienteDropDownList.DataTextField        = "Nombre";
            ClienteDropDownList.AppendDataBoundItems = true;
            ClienteDropDownList.DataBind();
        }