private void llenarCli()
 {
     using (var BaseDatos = new bd.VentasPOOEntitiesConnection())
     {
         ListaCli = (from TablaCli in BaseDatos.CLIENTE
                     select new SelectListItem
         {
             Text = TablaCli.nombre + " " + TablaCli.apellido,
             Value = TablaCli.id_cliente.ToString()
         }).ToList();
         ListaCli.Insert(0, new SelectListItem {
             Text = "--Seleccione--", Value = ""
         });
     }
 }
 private void llenarModoPago()
 {
     using (var BaseDatos = new bd.VentasPOOEntitiesConnection())
     {
         ListaModoPago = (from TablaModoPago in BaseDatos.MODO_PAGO
                          select new SelectListItem
         {
             Text = TablaModoPago.nombre,
             Value = TablaModoPago.num_pago.ToString()
         }).ToList();
         ListaModoPago.Insert(0, new SelectListItem {
             Text = "--Seleccione--", Value = ""
         });
     }
 }
Example #3
0
 private void llenarCat()
 {
     using (var BaseDatos = new bd.VentasPOOEntitiesConnection())
     {
         ListaCat = (from TablaCat in BaseDatos.CATEGORIA
                     select new SelectListItem
         {
             Text = TablaCat.nombre,
             Value = TablaCat.id_categoria.ToString()
         }).ToList();
         ListaCat.Insert(0, new SelectListItem {
             Text = "--Seleccione--", Value = ""
         });
     }
 }