public static List <FacturaDetalle> GetListFacturaDetalle(int facturaID) { List <FacturaDetalle> theList = new List <FacturaDetalle>(); FacturaDetalle theData = null; try { FacturaDetalleDSTableAdapters.FacturaDetalleTableAdapter localAdapter = new FacturaDetalleDSTableAdapters.FacturaDetalleTableAdapter(); FacturaDetalleDS.FacturaDetalleDataTable table = localAdapter.GetFacturaDetalleByFactID(facturaID); if (table != null && table.Rows.Count > 0) { foreach (var row in table) { theData = FillRecord(row); theList.Add(theData); } } } catch (Exception) { throw; } return(theList); }