private void ListCuentas() { RepositorioBase <CuentasBancarias> rep = new RepositorioBase <CuentasBancarias>(); CuentasDropDownList.DataSource = rep.GetList(x => true); CuentasDropDownList.DataValueField = "CuentaId"; CuentasDropDownList.DataTextField = "Nombre"; CuentasDropDownList.DataBind(); CuentasDropDownList.Items.Insert(0, new ListItem("", "")); }
public void LLenacombobox() { Repositorio <CuentasBancarias> repositorio = new Repositorio <CuentasBancarias>(); CuentasDropDownList.DataSource = repositorio.GetList(t => true); CuentasDropDownList.DataValueField = "CuentaId"; CuentasDropDownList.DataTextField = "Nombre"; CuentasDropDownList.DataBind(); ViewState["Prestamos"] = new Prestamos(); }