public static FuelDeliveryObjectCollection DataTableToCollection(DataTable FuelDeliverys)
 {
     FuelDeliveryObjectCollection objectsTotal;
     FuelDeliveryObjectCollection objects = new FuelDeliveryObjectCollection();
     try
     {
         IEnumerator enumerator = null;
         try
         {
             enumerator = FuelDeliverys.Rows.GetEnumerator();
             while (enumerator.MoveNext())
             {
                 DataRow current = (DataRow)enumerator.Current;
                 objects.Add(FuelDeliveryRowToObject(current));
             }
         }
         finally
         {
             if (enumerator is IDisposable)
             {
                 (enumerator as IDisposable).Dispose();
             }
         }
         objectsTotal = objects;
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
     return objectsTotal;
 }
        public static FuelDeliveryObjectCollection DataTableToCollection(DataTable FuelDeliverys)
        {
            FuelDeliveryObjectCollection objectsTotal;
            FuelDeliveryObjectCollection objects = new FuelDeliveryObjectCollection();

            try
            {
                IEnumerator enumerator = null;
                try
                {
                    enumerator = FuelDeliverys.Rows.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        DataRow current = (DataRow)enumerator.Current;
                        objects.Add(FuelDeliveryRowToObject(current));
                    }
                }
                finally
                {
                    if (enumerator is IDisposable)
                    {
                        (enumerator as IDisposable).Dispose();
                    }
                }
                objectsTotal = objects;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(objectsTotal);
        }
 public FuelDeliveryObjectCollection GetAll()
 {
     FuelDeliveryObjectCollection fuelDeliverys = new FuelDeliveryObjectCollection();
     QueryBuilder builder;
     try
     {
         builder = new QueryBuilder();
         builder.Append(this.BaseQuery(false, 0));
         builder.AppendOrderBy(FuelDeliveryObject.DATE_DELIVERY, QueryBuilder.OrderByType.ASC, QueryBuilder.ParameterLocation.FIRST_LAST);
         fuelDeliverys = FuelDeliveryConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);
     }
     catch (System.Exception exception1)
     {
         throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
     }
     return fuelDeliverys;
 }