public ProcessPaymentPage(decimal balanceDue, int agreementId, int locationIdForPayment, AgreementReview agreementReview, ExtendAgreementRequest request) { InitializeComponent(); this.balanceDue = balanceDue; amountLAbel.Text = "$ " + balanceDue.ToString("0.00"); creditCardRequest = new GetAllCustomerMobileCreditCardRequest(); creditCards = null; customerId = (int)App.Current.Properties["CustomerId"]; token = App.Current.Properties["currentToken"].ToString(); billingInformation = new BillingInformation(); PaymentResponse = null; this.agreementId = agreementId; this.locationIdForPayment = locationIdForPayment; this.agreementReview = agreementReview; submitPaymentAndExtendAgreementRequest = new SubmitPaymentAndExtendAgreementRequest(); if (agreementReview != null) { isExtendAgreement = true; } else if (agreementReview == null) { isExtendAgreement = false; } promotionMobileRequest = new GetPromotionMobileRequest(); promotionMobileResponse = null; appliedPromoId = 0; extendAgreemetRequest = request; extendAgreementResponse = null; }
public VehicleRates(ReservationView reservationView, VehicleViewByTypeForMobile selectedVehicle) { InitializeComponent(); this.reservationView = reservationView; //misChargeFilter = new MisChargeFilter(); misChargeRequest = new GetMischargeSearchDetailsMobileRequest(); //taxFilter = new TaxFilter(); taxRequest = new GetTaxMobileListRequest(); promotionMobileRequest = new GetPromotionMobileRequest(); //misChargeFilter.LocationId =(int) reservationView.StartLocationId; //misChargeFilter.VehicleTypeId =(int) reservationView.VehicleTypeID; misChargeRequest.LocationId = (int)reservationView.StartLocationId; misChargeRequest.VehicleTypeId = (int)reservationView.VehicleTypeID; //taxFilter.LocationId = (int)reservationView.StartLocationId; taxRequest.LocationId = (int)reservationView.StartLocationId; promotionMobileResponse = null; misChargeResults = null; misChargeResponse = null; taxResults = null; taxResponse = null; reservationController = new ReservationController(); token = App.Current.Properties["currentToken"].ToString(); this.selectedVehicle = selectedVehicle; startDateLabel.Text = ((DateTime)reservationView.StartDate).ToString("ddd MM/dd/yyyy"); endDateLabel.Text = ((DateTime)reservationView.EndDate).ToString("ddd MM/dd/yyyy"); startTimeLabel.Text = ((DateTime)reservationView.StartDate).ToString("hh:mm tt"); endTimeLabel.Text = ((DateTime)reservationView.EndDate).ToString("hh:mm tt"); if (selectedVehicle.VehicleTypeImageUrl != null) { vehilcleTypeImage.Source = ImageSource.FromUri(new Uri(selectedVehicle.VehicleTypeImageUrl)); } vehicleSampleLabel.Text = selectedVehicle.sample; vehilcleTypeLabel.Text = selectedVehicle.VehicleType; priceLabel.Text = "$ " + selectedVehicle.RateDetail.RateTotal.ToString(); }
public GetPromotionMobileResponse checkPromotion(GetPromotionMobileRequest promotionMobileRequest, string token) { GetPromotionMobileResponse result = null; try { using (var client = new HttpClient()) { client.BaseAddress = new Uri(ConstantData.ApiURL.ToString() + "PromotionMobile/GetSearchPromotionMobile"); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); var myContent = JsonConvert.SerializeObject(promotionMobileRequest); 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 <GetPromotionMobileResponse>(responseStream); } } } catch (Exception ex) { throw ex; } return(result); }
public GetPromotionMobileResponse checkPromotion(GetPromotionMobileRequest promotionMobileRequest, string token) { GetPromotionMobileResponse mobileResponse = null; try { mobileResponse = reservationservice.checkPromotion(promotionMobileRequest, token); } catch (Exception ex) { throw ex; } return(mobileResponse); }
public ProcessPaymentPage(decimal amountWantToPay, ReservationView reservationView) { InitializeComponent(); this.amountWantToPay = amountWantToPay; this.reservationView = reservationView; amountLAbel.Text = "$ " + amountWantToPay.ToString("0.00"); creditCardRequest = new GetAllCustomerMobileCreditCardRequest(); creditCards = null; customerId = (int)App.Current.Properties["CustomerId"]; token = App.Current.Properties["currentToken"].ToString(); billingInformation = new BillingInformation(); PaymentResponse = null; agreementId = 0; submitPaymentAndUpDateReservationRequest = new SubmitPaymentAndUpDateReservationRequest(); paynowBtn.Text = "Pay and extend now"; isExtendAgreement = false; promotionMobileRequest = new GetPromotionMobileRequest(); promotionMobileResponse = null; summaryMobileRequest = new GetCalculateSummaryMobileRequest(); summaryMobileResponsecs = null; appliedPromoId = 0; }
public EditVehicleRates(ReservationView reservationView, ReservationViewModel reservationData) { InitializeComponent(); this.reservationView = reservationView; //misChargeFilter = new MisChargeFilter(); misChargeRequest = new GetMischargeSearchDetailsMobileRequest(); //taxFilter = new TaxFilter(); taxRequest = new GetTaxMobileListRequest(); promotionMobileRequest = new GetPromotionMobileRequest(); //misChargeFilter.LocationId =(int) reservationView.StartLocationId; //misChargeFilter.VehicleTypeId =(int) reservationView.VehicleTypeID; misChargeRequest.LocationId = (int)reservationView.StartLocationId; misChargeRequest.VehicleTypeId = (int)reservationView.VehicleTypeID; //taxFilter.LocationId = (int)reservationView.StartLocationId; taxRequest.LocationId = (int)reservationView.StartLocationId; promotionMobileResponse = null; misChargeResults = null; misChargeResponse = null; taxResults = null; taxResponse = null; reservationController = new ReservationController(); token = App.Current.Properties["currentToken"].ToString(); this.reservationData = reservationData; }