public Car(int numberOfWheels, string colour, int numberOfDoors, FuelTypeEnum fuelType, double engineSize) : base(numberOfWheels, colour) { NumberOfDoors = numberOfDoors; FuelType = fuelType; EngineSize = engineSize; }
public Car(int id, string makeModel, double engineSize, FuelTypeEnum fuelType) { Id = id; MakeModel = makeModel; EngineSize = engineSize; FuelType = fuelType; }
public async Task QueryGeocodedLocationAsync(FuelTypeEnum fuelType) { _queryParameters.FuelType = fuelType; _queryParameters.Name = SelectedGeocodeResult.Name; _queryParameters.GeocodeLatitude = SelectedGeocodeResult.Latitude; _queryParameters.GeocodeLongitude = SelectedGeocodeResult.Longitude; _queryParameters.UniqueId = Guid.NewGuid().ToString(); AddOperationInProgress = true; InfoMessage = ""; try { var gasinfoProxy = CreateGasPriceInfoProxy(); var result = await gasinfoProxy.DownloadAsync(_queryParameters); if (result.Succeeded) { string serializedResult = SerializationHelper.SerializeToString(result.Result); NavigationService.Navigate <SprudelDetailPage>(Constants.ManualSearchPrefix + serializedResult); } else { InfoMessage = "Die Preise für den selektierten Ort konnten nicht abgerufen werden"; } } catch (Exception) { InfoMessage = "Die Preise für den selektierten Ort konnten nicht abgerufen werden"; } AddOperationInProgress = false; }
public Car(SqlDataReader reader) { Id = reader.GetInt32(reader.GetOrdinal("Id")); MakeModel = reader.GetString(reader.GetOrdinal("MakeModel")); EngineSize = Convert.ToDouble(reader.GetDouble(reader.GetOrdinal("EngineSize"))); FuelTypeEnum.TryParse(reader.GetString(reader.GetOrdinal("FuelType")), out _fuelType); FuelType = _fuelType; }
} // end of previous Constructor - Vehicle. // --------------------------------------------------------------------- /// This constructor provides values for all parameters of the vehicle. public Vehicle(string vehicleRego, string make, string model, int year, VehicleClassEnum Class, int numSeats, TransmissionTypeEnum Transmission, int engineSize, bool turbo, FuelTypeEnum Fuel, bool gps, bool sunRoof, string colour, double dailyRate) { VehicleRego = vehicleRego; Make = make; Model = model; Year = year; NumSeats = numSeats; GPS = gps; SunRoof = sunRoof; // if no colour is selected Colour = "Black"; Colour = colour; TransmissionType = Transmission; EngineSize = engineSize; Turbo = turbo; /// Determine Daily Rate and set vehicle class overides // Nested if. if (Class == VehicleClassEnum.Economy) { VehicleClass = Class; DailyRate = 50.00; FuelType = FuelTypeEnum.Petrol; TransmissionType = TransmissionTypeEnum.Automatic; } else if (Class == VehicleClassEnum.Family) { VehicleClass = Class; DailyRate = 80.00; } else if (Class == VehicleClassEnum.Sport) { VehicleClass = Class; DailyRate = 130.00; } else if (Class == VehicleClassEnum.OffRoad) { VehicleClass = Class; DailyRate = 90.00; } else if (Class == VehicleClassEnum.Luxury) { VehicleClass = Class; DailyRate = 120.00; GPS = true; SunRoof = true; } else if (Class == VehicleClassEnum.Commercial) { VehicleClass = Class; DailyRate = 130.00; FuelType = FuelTypeEnum.Diesel; } // End Nested if. } // end of previous Constructor - Vehicle.
public GasQuery(string uniqueId, FuelTypeEnum fuelType, double long1, double lat1, double long2, double lat2) { UniqueId = uniqueId; _fuelType = fuelType; _long1 = long1; _lat1 = lat1; _long2 = long2; _lat2 = lat2; }
public static string ToSpritpreisrechnerString(this FuelTypeEnum c) { switch (c) { case FuelTypeEnum.Diesel: return("DIE"); case FuelTypeEnum.Super: return("SUP"); } throw new ArgumentException("Diese Art von Treibstoff wird nicht unterstützt"); }
public Advert(string title, string brand, string model, string version, int year, float km, FuelTypeEnum fu, GeoLocalization l, string owner, float price , bool nego, DateTime valDateTime, Characteristics c, String description = "N/A") : this() { Id = _id++; Title = title; Brand = brand; Model = model; Version = version; Year = year; Kilometers = km; FuelType = fu; Description = description; Local = l; AdvertiseOwner = owner; Price = price; Negotiable = nego; ValidUntil = valDateTime; Characteristics = c; }
public Car(string makeModel, double engineSize, FuelTypeEnum fuelType) { MakeModel = makeModel; EngineSize = engineSize; FuelType = fuelType; }
/// <summary> /// Gets the tax rate for the given co2 exhaust. /// </summary> /// <param name="co2Exhaust">The co2 exhaust.</param> /// <param name="powerKw"></param> /// <param name="fuelTypeEnum">The fuel type enum.</param> /// <param name="vehicleTypeEnum"></param> /// <param name="atLeastEightSeatsVehicle"></param> /// <returns></returns> /// <exception cref="System.Exception">Not known FuelTypeEnum. + fuelTypeEnum</exception> private decimal GetTaxRateForTheGivenCo2Exhaust(int co2Exhaust, int powerKw, FuelTypeEnum fuelTypeEnum, VehicleTypeEnum vehicleTypeEnum, bool atLeastEightSeatsVehicle, EuroExhaustTypeEnum euroExhaustTypeEnum) { decimal taxRate = 0; if (vehicleTypeEnum == VehicleTypeEnum.Car) { //Za motorna vozila iz četrtega odstavka tega člena s pogonom na dizelsko gorivo s stopnjo izpusta Euro 6 se upošteva stopnja davka iz lestvice v četrtem odstavku tega člena za bencinsko gorivo. if (euroExhaustTypeEnum == EuroExhaustTypeEnum.Euro6 && fuelTypeEnum == FuelTypeEnum.Diesel) { fuelTypeEnum = FuelTypeEnum.PetrolRest; } if (fuelTypeEnum == FuelTypeEnum.PetrolRest || fuelTypeEnum == FuelTypeEnum.Electric) { if (co2Exhaust > 0 && co2Exhaust <= 110) { taxRate = 0.5m; } else if (co2Exhaust > 110 && co2Exhaust <= 120) { taxRate = 1; } else if (co2Exhaust > 120 && co2Exhaust <= 130) { taxRate = 1.5m; } else if (co2Exhaust > 130 && co2Exhaust <= 150) { taxRate = 3; } else if (co2Exhaust > 150 && co2Exhaust <= 170) { taxRate = 6; } else if (co2Exhaust > 170 && co2Exhaust <= 190) { taxRate = 9; } else if (co2Exhaust > 190 && co2Exhaust <= 210) { taxRate = 13; } else if (co2Exhaust > 210 && co2Exhaust <= 230) { taxRate = 18; } else if (co2Exhaust > 230 && co2Exhaust <= 250) { taxRate = 23; } else if (co2Exhaust == 0 || co2Exhaust > 250) { taxRate = 28; } } else if (fuelTypeEnum == FuelTypeEnum.Diesel) { if (co2Exhaust > 0 && co2Exhaust <= 110) { taxRate = 1; } else if (co2Exhaust > 110 && co2Exhaust <= 120) { taxRate = 2; } else if (co2Exhaust > 120 && co2Exhaust <= 130) { taxRate = 3; } else if (co2Exhaust > 130 && co2Exhaust <= 150) { taxRate = 6; } else if (co2Exhaust > 150 && co2Exhaust <= 170) { taxRate = 11; } else if (co2Exhaust > 170 && co2Exhaust <= 190) { taxRate = 15; } else if (co2Exhaust > 190 && co2Exhaust <= 210) { taxRate = 18; } else if (co2Exhaust > 210 && co2Exhaust <= 230) { taxRate = 22; } else if (co2Exhaust > 230 && co2Exhaust <= 250) { taxRate = 26; } else if (co2Exhaust == 0 || co2Exhaust > 250) { taxRate = 31; } } else { throw new Exception("Not known FuelTypeEnum. " + fuelTypeEnum); } //Za motorna vozila iz četrtega odstavka tega člena z najmanj osmimi sedeži se stopnja davka iz četrtega odstavka tega člena zniža za 30%. if (atLeastEightSeatsVehicle) { taxRate = taxRate - (taxRate * 0.30m); } } else if (vehicleTypeEnum == VehicleTypeEnum.BikeWithEngine || vehicleTypeEnum == VehicleTypeEnum.Motorbike) { if (powerKw > 0 && powerKw <= 25) { taxRate = 1.5m; } else if (powerKw > 25 && powerKw <= 50) { taxRate = 2; } else if (powerKw > 50 && powerKw <= 75) { taxRate = 3; } else if (powerKw > 75) { taxRate = 5; } if (fuelTypeEnum == FuelTypeEnum.Electric) { taxRate = 0.5m; } } else if (vehicleTypeEnum == VehicleTypeEnum.LivingVan) { if (powerKw > 0 && powerKw <= 60) { taxRate = 6; } else if (powerKw > 60 && powerKw <= 90) { taxRate = 9; } else if (powerKw > 90 && powerKw <= 120) { taxRate = 13; } else if (powerKw > 120) { taxRate = 18; } if (fuelTypeEnum == FuelTypeEnum.Electric) { taxRate = 0.5m; } } else { throw new Exception("Not known VehicleTypeEnum. " + vehicleTypeEnum); } return(taxRate); }
/// <summary> /// Gets the special tax rate additionally. /// </summary> /// <param name="dieselParticlesAbove005Limit">if set to <c>true</c> [diesel particles above005 limit].</param> /// <param name="fuelTypeEnum">The fuel type enum.</param> /// <param name="vehicleTypeEnum">The vehicle type enum.</param> /// <param name="engineTypeEnum">The engine type enum.</param> /// <returns></returns> private decimal GetSpecialTaxRateAdditionally(bool dieselParticlesAbove005Limit, FuelTypeEnum fuelTypeEnum, VehicleTypeEnum vehicleTypeEnum, EngineTypeEnum engineTypeEnum) { decimal taxRate = 0; if (vehicleTypeEnum == VehicleTypeEnum.Car) { //Za motorna vozila iz četrtega odstavka tega člena s pogonom na dizelsko gorivo z izpustom trdnih delcev, večjim od 0,005 g/km, se stopnja davka, določena v četrtem odstavku tega člena, poveča za dve odstotni točki, po 1. januarju 2011 pa za pet odstotnih točk. if (fuelTypeEnum == FuelTypeEnum.Diesel && dieselParticlesAbove005Limit) { taxRate += 5; } } else if (vehicleTypeEnum == VehicleTypeEnum.BikeWithEngine || vehicleTypeEnum == VehicleTypeEnum.Motorbike) { //Za motorna vozila iz prejšnjega odstavka z dvotaktnim motorjem na notranje zgorevanje, se stopnja davka, določena v prejšnjem odstavku, poveča za tri odstotne točke. if (engineTypeEnum == EngineTypeEnum.TwoTacts) { taxRate += 3; } } else if (vehicleTypeEnum == VehicleTypeEnum.LivingVan) { //Za motorna vozila iz osemnajstega odstavka tega člena s pogonom na dizelsko gorivo z izpustom trdnih delcev, večjim od 0,005 g/km, se stopnja davka, določena v osemnajstem odstavku tega člena, poveča za dve odstotni točki, po 1. januarju 2011 pa za pet odstotnih točk. if (fuelTypeEnum == FuelTypeEnum.Diesel && dieselParticlesAbove005Limit) { taxRate += 5; } } return(taxRate); }
public async Task QueryGeocodedLocationAsync(FuelTypeEnum fuelType) { _queryParameters.FuelType = fuelType; _queryParameters.Name = SelectedGeocodeResult.Name; _queryParameters.GeocodeLatitude = SelectedGeocodeResult.Latitude; _queryParameters.GeocodeLongitude = SelectedGeocodeResult.Longitude; _queryParameters.UniqueId = Guid.NewGuid().ToString(); AddOperationInProgress = true; InfoMessage = ""; try { var gasinfoProxy = CreateGasPriceInfoProxy(); var result = await gasinfoProxy.DownloadAsync(_queryParameters); if (result.Succeeded) { string serializedResult = SerializationHelper.SerializeToString(result.Result); NavigationService.Navigate<SprudelDetailPage>(Constants.ManualSearchPrefix + serializedResult); } else { InfoMessage = "Die Preise für den selektierten Ort konnten nicht abgerufen werden"; } } catch (Exception) { InfoMessage = "Die Preise für den selektierten Ort konnten nicht abgerufen werden"; } AddOperationInProgress = false; }
private void SelectFuelType(FuelTypeEnum ft) { _selectedFuelType = ft; NotifyOfPropertyChange(() => DieselSelected); NotifyOfPropertyChange(() => SuperSelected); }
public GasQuery(string uniqueId, FuelTypeEnum fuelType) { UniqueId = uniqueId; _fuelType = fuelType; }
public EngineSpec(float capacity, int horsePower, FuelTypeEnum fuelType) { this.Capacity = capacity; this.HorsePower = horsePower; this.FuelType = fuelType; }
public void SetEngineSpec(float capacity, int horsePower, FuelTypeEnum fuelType) { this.EngineSpec = new EngineSpec(capacity, horsePower, fuelType); }
public EngineSpecification(float capacity, int horsePower, FuelTypeEnum fuelType) { Capacity = capacity; HorsePowers = horsePower; FuelType = fuelType; }
public EngineSpecification(float capacity, int horsePowers, FuelTypeEnum fuelType) => (Capacity, HorsePowers, FuelType) = (capacity, horsePowers, fuelType);
private void NavigateToDetailPage(FuelTypeEnum fuelType) { this.Frame.Navigate(typeof(SprudelDetailPage), Constants.QuickSearchPrefix + fuelType.ToString()); }