public static GetRegionResponse Unmarshall(UnmarshallerContext context) { GetRegionResponse getRegionResponse = new GetRegionResponse(); getRegionResponse.HttpResponse = context.HttpResponse; return(getRegionResponse); }
public GetRegionResponse GetRegionDetails(GetRegionRequest request) { GetRegionResponse response = new GetRegionResponse(); Region region = _regionRepository.FindBy(request.RegionId); response.RegionView = region.ConvertToRegionView(); return(response); }
public RegionView GetLastRegion() { int regionId; if (base.GetRegionId() != 0) { regionId = base.GetRegionId(); GetRegionRequest request = new GetRegionRequest { RegionId = regionId }; GetRegionResponse response = _locationService.GetRegionDetails(request); return(response.RegionView); } return(null); }
public JsonResult GetDetail(System.Int32 id) { RegionDetailView vm = new RegionDetailView(); GetRegionRequest request = new GetRegionRequest(); request.RegionID = id; GetRegionResponse response = _regionService.GetRegion(request); if (response.RegionFound) { vm = response.Region.ConvertToRegionDetailView(); } return(Json(vm, JsonRequestBehavior.AllowGet)); }
public GetRegionResponse GetRegion(GetRegionRequest request) { GetRegionResponse response = new GetRegionResponse(); Region region = _regionRepository .FindBy(request.RegionID); if (region != null) { response.RegionFound = true; response.Region = region.ConvertToRegionView(); } else { response.RegionFound = false; } return(response); }