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

            DestinatarioDropDownList.Items.Clear();
            DestinatarioDropDownList.DataSource     = cartas.GetList(x => true);
            DestinatarioDropDownList.DataValueField = "DestinatarioId";
            DestinatarioDropDownList.DataTextField  = "Nombre";
            DestinatarioDropDownList.DataBind();
        }
예제 #2
0
        void LlenarCombos()
        {
            RepositorioBase <Cartas> repositorio = new RepositorioBase <Cartas>();

            DestinatarioDropDownList.DataSource     = repositorio.GetList(c => true);
            DestinatarioDropDownList.DataValueField = "DestinatarioId";
            DestinatarioDropDownList.DataTextField  = "Nombre";
            DestinatarioDropDownList.DataBind();
            DestinatarioDropDownList.Items.Insert(0, new ListItem("", ""));
        }
        private void LlenarComboBox()
        {
            RepositorioBase <Destinatario> rb = new RepositorioBase <Destinatario>();

            DestinatarioDropDownList.DataSource     = rb.GetList(x => true);
            DestinatarioDropDownList.DataValueField = "DestinatarioID";
            DestinatarioDropDownList.DataTextField  = "Nombre";
            DestinatarioDropDownList.DataBind();
            DestinatarioDropDownList.Items.Insert(0, new ListItem("", ""));
        }