You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.4 KiB

  1. using EasyBL.WebApi.Filters;
  2. using EasyBL.WEBAPP.SYS;
  3. using Entity.ShowEasyDtos;
  4. using Entity.Sugar;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Net;
  9. using System.Net.Http;
  10. using System.Web.Http;
  11. namespace WebApp.Controllers
  12. {
  13. public class LocationController : ApiController
  14. {
  15. [HttpGet]
  16. public HttpResponseMessage Regions(string Lang)
  17. {
  18. return new LocationService().GetRegionList(Lang);
  19. }
  20. [HttpGet]
  21. public HttpResponseMessage Region(string Lang, string RegionID)
  22. {
  23. return new LocationService().GetOneRegion(Lang, RegionID);
  24. }
  25. [HttpGet]
  26. public HttpResponseMessage Countries(string Lang, string RegionID)
  27. {
  28. return new LocationService().GetCountryList(Lang, RegionID);
  29. }
  30. [HttpGet]
  31. public HttpResponseMessage Country(string Lang, string CountryID)
  32. {
  33. return new LocationService().GetOneCountry(Lang, CountryID);
  34. }
  35. [HttpGet]
  36. public HttpResponseMessage Cities(string Lang, string CountryID)
  37. {
  38. return new LocationService().GetCityList(Lang, CountryID);
  39. }
  40. [HttpGet]
  41. public HttpResponseMessage City(string Lang, string CityID)
  42. {
  43. return new LocationService().GetOneCity(Lang, CityID);
  44. }
  45. }
  46. }