PWA Fundvelo der Caritas.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

LFBicycleRest.cs 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using CaritasPWA.Shared.Models;
  2. using CaritasPWA.Shared.ResourceFiles;
  3. using Microsoft.Extensions.Localization;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. namespace CaritasPWA.Shared.Services {
  7. // REST interface responsible to submit lost or found reports and get the available masterdata.
  8. public class LFBicycleRest : ILFBicycleRest {
  9. private readonly IStringLocalizer<Resources> _i18n;
  10. public LFBicycleRest(IStringLocalizer<Resources> i18n) {
  11. _i18n = i18n;
  12. }
  13. public List<ColorItem> GetColors() {
  14. //return Defaults.ColorItems.ToList();
  15. return new List<ColorItem>();
  16. }
  17. public List<BicycleType> GetBicycleTypes() {
  18. List<BicycleType> bicycleTypes = new ();
  19. foreach (BicycleType bct in Defaults.BycicleTypes) {
  20. bicycleTypes.Add(new BicycleType(bct.Id, _i18n.GetString("Bike." + bct.Type)));
  21. }
  22. return bicycleTypes;
  23. //return new List<BicycleType>();
  24. }
  25. public List<Brand> GetBrands() {
  26. return Defaults.Brands.ToList();
  27. //return new List<BicycleType>();
  28. }
  29. }
  30. }