public VehicleMileageObjectCollection GetAll()
        {
            VehicleMileageObjectCollection vehicleMileages = new VehicleMileageObjectCollection();
            QueryBuilder builder;

            try
            {
                builder = new QueryBuilder();
                builder.Append(this.BaseQuery(false, 0));
                builder.AppendOrderBy(VehicleMileageObject.TRANSI_NM_MAT, QueryBuilder.OrderByType.ASC, QueryBuilder.ParameterLocation.FIRST);
                builder.AppendOrderBy(VehicleMileageObject.DATE, QueryBuilder.OrderByType.ASC, QueryBuilder.ParameterLocation.LAST);
                vehicleMileages = VehicleMileageConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);
            }
            catch (System.Exception exception1)
            {
                throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
            }
            return(vehicleMileages);
        }
        public VehicleMileageObjectCollection GetByVehicle(VehicleObject vehicle)
        {
            VehicleMileageObjectCollection vehicleMileages = new VehicleMileageObjectCollection();
            QueryBuilder builder;

            try
            {
                if (vehicle.VehicleTransicsLink != null)
                {
                    builder = new QueryBuilder();
                    builder.Append(this.BaseQuery(false, 0));
                    builder.AppendWhereInteger(VehicleMileageObject.TRANSI_TNR_MAT, vehicle.VehicleTransicsLink.Transi_TNR_mat, QueryBuilder.ParameterLocation.FIRST_LAST);
                    builder.AppendOrderBy(VehicleMileageObject.DATE, QueryBuilder.OrderByType.DESC, QueryBuilder.ParameterLocation.FIRST_LAST);
                    vehicleMileages = VehicleMileageConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);
                }
            }
            catch (System.Exception exception1)
            {
                throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
            }
            return(vehicleMileages);
        }