예제 #1
0
        public MaintenanceVehicleObjectCollection GetAll()
        {
            MaintenanceVehicleObjectCollection maintenanceVehicles = new MaintenanceVehicleObjectCollection();
            QueryBuilder builder;

            try
            {
                builder = new QueryBuilder();
                builder.Append(this.BaseQuery(false, 0));
                builder.AppendOrderBy(MaintenanceVehicleObject.START_MAINTENANCE, QueryBuilder.OrderByType.ASC, QueryBuilder.ParameterLocation.FIRST_LAST);
                maintenanceVehicles = MaintenanceVehicleConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);
            }
            catch (System.Exception exception1)
            {
                throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
            }
            return(maintenanceVehicles);
        }
예제 #2
0
        public MaintenanceVehicleObjectCollection GetByVehicleID(VehicleObject vehicle)
        {
            MaintenanceVehicleObjectCollection maintenanceVehicles = new MaintenanceVehicleObjectCollection();
            QueryBuilder builder;

            try
            {
                builder = new QueryBuilder();
                builder.Append(this.BaseQuery(false, 0));
                builder.AppendWhereString(MaintenanceVehicleObject.VEH_ID, vehicle.VehID.ToString(), QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.FIRST);
                builder.Append("AND " + MaintenanceVehicleObject.VEH_ID + " is not null ");
                maintenanceVehicles = MaintenanceVehicleConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);
            }
            catch (System.Exception exception1)
            {
                throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
            }
            return(maintenanceVehicles);
        }