public GetStoreHoursMobileResponse getStoreHoursMobile(GetStoreHoursMobileRequest getStoreHoursMobileRequest, string token)
        {
            GetStoreHoursMobileResponse result = null;

            try
            {
                using (var client = new HttpClient())
                {
                    client.BaseAddress = new Uri(ConstantData.ApiURL.ToString() + "StoreHoursMobile/GetStoreHourDetailsMobile");
                    client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
                    client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);

                    var myContent   = JsonConvert.SerializeObject(getStoreHoursMobileRequest);
                    var buffer      = Encoding.UTF8.GetBytes(myContent);
                    var byteContent = new ByteArrayContent(buffer);
                    byteContent.Headers.ContentType = new MediaTypeHeaderValue("application/json");



                    var response = client.PostAsync(client.BaseAddress, byteContent).Result;

                    if (response.IsSuccessStatusCode)
                    {
                        var responseStream = response.Content.ReadAsStringAsync().Result;
                        result = JsonConvert.DeserializeObject <GetStoreHoursMobileResponse>(responseStream);
                    }
                }
            }

            catch (Exception ex)
            {
                throw ex;
            }
            return(result);
        }
        public GetStoreHoursMobileResponse getStoreHoursMobile(GetStoreHoursMobileRequest getStoreHoursMobileRequest, string _token)
        {
            GetStoreHoursMobileResponse mobileResponse = null;

            try
            {
                mobileResponse = reservationservice.getStoreHoursMobile(getStoreHoursMobileRequest, _token);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(mobileResponse);
        }
 public BookNow(ReservationView reservationView, VehicleViewByTypeForMobile selectedVehicle, List <int> locationIdList)
 {
     InitializeComponent();
     vehicleMobileRequest  = new GetReservationConfigurationMobileRequest();
     vehicleMobileResponse = null;
     search = new ReservationConfigurationVehicleSearch();
     //locationModels = null;
     locationResponse            = null;
     getStoreHoursMobileResponse = null;
     getStoreHoursMobileRequest  = new GetStoreHoursMobileRequest();
     reservationView             = new ReservationView();
     customerId           = 0;
     isBookable           = true;
     this.reservationView = reservationView;
     this.selectedVehicle = selectedVehicle;
     this.locationIdList  = locationIdList;
 }