Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/05/2013, 10:32
th3r0rn
 
Fecha de Ingreso: noviembre-2007
Mensajes: 504
Antigüedad: 16 años, 5 meses
Puntos: 2
Llenar un combo con una lista generica

Hola amigos, tengo todo un set de datos el cual meto en un objeto el cual quiero usar para llenar un combo en ASP.NET pero no se como hacerlo, una forma que se me ocurre es pasar los datos a un datatable para mas facil pero tampoco me sale.
Les dejo como obtengo los datos, por favor revisen la imagen para que vean como se guardan en mi objeto:


Código C#:
Ver original
  1. /// <summary>
  2. /// Descripción breve de BankList
  3. /// </summary>
  4. public class BankList
  5. {
  6.  
  7.  
  8.   public string Fecha_Embarque { get; set; }
  9.   public string Remision  {get; set;}
  10.   public string Pedido  { get; set;}
  11.   public string Clave { get; set; }
  12.   public string Cliente { get; set; }
  13.   public string Transportista { get; set; }
  14.   public string Operador { get; set; }
  15.   public string Destino { get; set; }
  16.   public string Rollos { get; set; }
  17.   public string Material { get; set; }
  18.   public string Toneladas  { get; set; }
  19.  
  20. //PARAMETROS DE LA FUNCION GET_CLIENTES
  21.  
  22. }
  23.  
  24. public class GetClientes : BankList
  25. {
  26.  
  27.  
  28. }

Y:
Código C#:
Ver original
  1. //MyBackendConfig().Insert(ir) Declaration
  2.             public BankList Insert(IRfcStructure ir)
  3.             {
  4.                 BankList bklist = new BankList();
  5.  
  6.                 bklist.Fecha_Embarque = ir.GetString("LFDAT");
  7.                 bklist.Remision = ir.GetString("VBELN");
  8.                 bklist.Pedido = ir.GetString("VBELV");
  9.                 bklist.Clave = ir.GetString("KUNNR");
  10.                 bklist.Cliente = ir.GetString("NAME1_WE");
  11.  
  12.                 bklist.Toneladas = ir.GetString("LFIMG");
  13.  
  14.                 bklist.Operador = ir.GetString("KZGBE");
  15.                 bklist.Rollos = ir.GetString("CROLLOS");
  16.                 bklist.Destino = ir.GetString("LENTR");
  17.                 bklist.Material = ir.GetString("MATNR");
  18.                 bklist.Transportista = ir.GetString("TPBEZ");
  19.                 return bklist;
  20.  
  21.             }
  22.             public GetClientes ListaClintes(IRfcStructure Get)
  23.             {
  24.                 GetClientes GetList = new GetClientes();
  25.                 GetList.Clave = Get.GetString("KUNNR");
  26.                 GetList.Cliente = Get.GetString("NAME");
  27.                 return GetList;
  28.  
  29.             }