// Metodo utilizado. private void LlenarCombo() { DepartamentoDropdownList.Items.Clear(); CategoriaDropDownList.Items.Clear(); ProveedorDropDownList.Items.Clear(); RepositorioBase <Departamento> repositorio = new RepositorioBase <Departamento>(); DepartamentoDropdownList.DataSource = repositorio.GetList(x => true); DepartamentoDropdownList.DataValueField = "DepartamentoId"; DepartamentoDropdownList.DataTextField = "Nombre"; DepartamentoDropdownList.DataBind(); RepositorioBase <Categoria> repositorioCategoria = new RepositorioBase <Categoria>(); CategoriaDropDownList.DataSource = repositorioCategoria.GetList(x => true); CategoriaDropDownList.DataValueField = "CategoriaId"; CategoriaDropDownList.DataTextField = "Nombre"; CategoriaDropDownList.DataBind(); RepositorioBase <Proveedores> repositorioProveedor = new RepositorioBase <Proveedores>(); ProveedorDropDownList.DataSource = repositorioProveedor.GetList(x => true); ProveedorDropDownList.DataValueField = "IDProveedor"; ProveedorDropDownList.DataTextField = "Nombre"; ProveedorDropDownList.DataBind(); }
private void LlenarCombo() { List <Entidades.Categorias> Lista = BLL.CategoriasBLL.GetListAll(); CategoriaDropDownList.DataSource = Lista; CategoriaDropDownList.DataValueField = "CategoriaId"; CategoriaDropDownList.DataTextField = "Descripcion"; CategoriaDropDownList.DataBind(); }
public void LLenarComboBox() { RepositorioBase <Categorias> repositorio = new RepositorioBase <Categorias>(new Contexto()); CategoriaDropDownList.DataSource = repositorio.GetList(a => true); CategoriaDropDownList.DataValueField = "CategoriaId"; CategoriaDropDownList.DataTextField = "Nombre"; CategoriaDropDownList.DataBind(); }
public void LLenarCombo() { RepositorioBase <Estudiantes> estudiante = new RepositorioBase <Estudiantes>(new Contexto()); RepositorioBase <Categorias> categoria = new RepositorioBase <Categorias>(new Contexto()); EstudianteDropDownList.DataSource = estudiante.GetList(e => true); EstudianteDropDownList.DataValueField = "EstudianteId"; EstudianteDropDownList.DataTextField = "Nombres"; EstudianteDropDownList.DataBind(); CategoriaDropDownList.DataSource = categoria.GetList(c => true); CategoriaDropDownList.DataValueField = "CategoriaId"; CategoriaDropDownList.DataTextField = "NombreCategoria"; CategoriaDropDownList.DataBind(); }
private void LlenaCombo() { RepositorioBase <Estudiante> repositorio = new RepositorioBase <Estudiante>(); RepositorioBase <Categoria> repositoriy = new RepositorioBase <Categoria>(); EstudianteDropDownList.DataSource = repositorio.GetList(t => true); EstudianteDropDownList.DataValueField = "IdEstudiante"; EstudianteDropDownList.DataTextField = "NombreEstudiante"; EstudianteDropDownList.DataBind(); CategoriaDropDownList.DataSource = repositoriy.GetList(t => true); CategoriaDropDownList.DataValueField = "IdCategoria"; CategoriaDropDownList.DataTextField = "NombreCategoria"; CategoriaDropDownList.DataBind(); }
private void LlenaCombo() { RepositorioBase <Categorias> c = new RepositorioBase <Categorias>(); RepositorioBase <Estudiantes> e = new RepositorioBase <Estudiantes>(); CategoriaDropDownList.DataSource = c.GetList(t => true); CategoriaDropDownList.DataValueField = "CategoriaId"; CategoriaDropDownList.DataTextField = "Categoria"; CategoriaDropDownList.DataBind(); EstudianteDropDownList.DataSource = e.GetList(t => true); EstudianteDropDownList.DataValueField = "EstudianteId"; EstudianteDropDownList.DataTextField = "Estudiante"; EstudianteDropDownList.DataBind(); }
private void LlenarCategorias() { if (!Page.IsPostBack) { RepositorioBase <Categorias> db = new RepositorioBase <Categorias>(); CategoriaDropDownList.DataSource = db.GetList(t => true); CategoriaDropDownList.DataValueField = "CategoriaId"; CategoriaDropDownList.DataTextField = "Descripcion"; CategoriaDropDownList.DataBind(); ViewState["Evaluacion"] = new Evaluaciones(); } }
public void LLenarCategoria() { RepositorioBase <Categorias> categoria = new RepositorioBase <Categorias>(new Contexto()); CategoriaDropDownList.DataSource = categoria.GetList(a => true); CategoriaDropDownList.DataValueField = "CategoriaId"; CategoriaDropDownList.DataTextField = "Nombre"; CategoriaDropDownList.DataBind(); RepositorioBase <Clientes> clientes = new RepositorioBase <Clientes>(new Contexto()); ClienteDropList.DataSource = clientes.GetList(a => true); ClienteDropList.DataValueField = "ClienteId"; ClienteDropList.DataTextField = "Nombre"; ClienteDropList.DataBind(); }
private void LlenarCombo() { EstudianteDropdownList.Items.Clear(); CategoriaDropDownList.Items.Clear(); RepositorioBase <Estudiantes> repositorio = new RepositorioBase <Estudiantes>(); EstudianteDropdownList.DataSource = repositorio.GetList(x => true); EstudianteDropdownList.DataValueField = "EstudianteID"; EstudianteDropdownList.DataTextField = "Nombre"; EstudianteDropdownList.DataBind(); RepositorioBase <Categoria> repositorioPacientes = new RepositorioBase <Categoria>(); CategoriaDropDownList.DataSource = repositorioPacientes.GetList(x => true); CategoriaDropDownList.DataValueField = "CategoriaID"; CategoriaDropDownList.DataTextField = "Descripcion"; CategoriaDropDownList.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { this.FechaTextBox.Text = string.Format("{0:G}", DateTime.Now); SqlConnection conetar = new SqlConnection("Data Source=DESKTOP-19EANE5;Initial Catalog=Tarea6Db;Integrated Security=True"); SqlCommand c = new SqlCommand("select * from Categorias", conetar); SqlDataAdapter s = new SqlDataAdapter(c); DataSet ds = new DataSet(); s.Fill(ds); CategoriaDropDownList.DataSource = ds; CategoriaDropDownList.DataTextField = "Descripcion"; CategoriaDropDownList.DataValueField = "CategoriaId"; CategoriaDropDownList.DataBind(); table = new System.Data.DataTable(); table.Columns.Add("Monto", typeof(System.String)); table.Columns.Add("Categoria", typeof(System.String)); if (!Page.IsPostBack) { } }