private void NxtBtn_Clicked(object sender, EventArgs e) { if (misChargeResults.Count() > 0) { List <MiscChargeSearchReview> miscChargeSearchReviews = new List <MiscChargeSearchReview>(); List <MischargeResultMobile> itemListMis = RateList.ItemsSource as List <MischargeResultMobile>; foreach (MischargeResultMobile msr in itemListMis) { MiscChargeSearchReview miscChargeSearchReview = new MiscChargeSearchReview(); miscChargeSearchReview.VehicleTypeId = msr.VehicleTypeId; miscChargeSearchReview.LocationId = msr.LocationId; miscChargeSearchReview.MiscChargeID = msr.MiscChargeID; miscChargeSearchReview.Name = msr.Name; miscChargeSearchReview.Description = msr.Description; miscChargeSearchReview.CalculationType = msr.CalculationType; miscChargeSearchReview.Value = msr.Value; miscChargeSearchReview.MisChargeCode = msr.MisChargeCode; miscChargeSearchReview.IsOptional = msr.IsOptional; miscChargeSearchReview.Unit = msr.Unit; miscChargeSearchReview.TaxNotAvailable = msr.TaxNotAvailable; miscChargeSearchReview.isQuantity = msr.IsQuantity; miscChargeSearchReview.IsSelected = msr.isSelected; miscChargeSearchReview.StartDate = (DateTime)reservationView.StartDate; miscChargeSearchReview.EndDate = (DateTime)reservationView.EndDate; miscChargeSearchReview.StartDateString = reservationView.StartDateStr; miscChargeSearchReview.EndDateString = reservationView.EndDateStr; if (miscChargeSearchReview.IsSelected) { miscChargeSearchReviews.Add(miscChargeSearchReview); } } reservationView.MiscList2 = miscChargeSearchReviews; } if (taxResults.Count() > 0) { List <LocationTaxModel> locationTaxModels = new List <LocationTaxModel>(); List <LocationTaxModel> itemsourceTax = taxList.ItemsSource as List <LocationTaxModel>; foreach (LocationTaxModel ltm in itemsourceTax) { LocationTaxModel locationTaxModel = new LocationTaxModel(); locationTaxModel.LocationId = ltm.LocationId; locationTaxModel.TaxId = ltm.TaxId; locationTaxModel.Name = ltm.Name; locationTaxModel.Description = ltm.Description; locationTaxModel.Value = ltm.Value; locationTaxModel.LocationName = ltm.LocationName; locationTaxModel.IsSelected = ltm.IsSelected; if (locationTaxModel.IsSelected) { locationTaxModels.Add(locationTaxModel); } } reservationView.TaxList2 = locationTaxModels; } Navigation.PushAsync(new EditSummaryOfCharges(reservationView, reservationData)); }
private void RadioButtonGroupView_SelectedItemChanged(object sender, EventArgs e) { var obj = (RadioButtonGroupView)sender; var objGrid = (Grid)obj.Parent; MiscChargeSearchReview misChargeOption = objGrid.BindingContext as MiscChargeSearchReview; int value = obj.SelectedIndex; if (misChargeOption != null) { decimal val = (decimal)misChargeOption.MisChargeOptionList[value].Value; if (selectedDeductibleMiscValues.ContainsKey(misChargeOption.MiscChargeID)) { selectedDeductibleMiscValues[misChargeOption.MiscChargeID] = val.ToString(); } else { selectedDeductibleMiscValues.Add(misChargeOption.MiscChargeID, val.ToString()); } } //DisplayAlert("iadh.", value.ToString(), "sdh"); }
private void descriptionBtn_Tapped(object sender, EventArgs e) { var obj = (Image)sender; var objstac = (StackLayout)obj.Parent; var objGrid = (Grid)objstac.Parent; var viewcell = (ExtendedViewCell)objGrid.Parent; MiscChargeSearchReview selectedMischrge = objGrid.BindingContext as MiscChargeSearchReview; string discription = selectedMischrge.Description; if (selectedMischrge.Name == "Insurance") { discription = "Liability and physical damage coverage for rideshare is included ($1,000 deductible; see rental agreement for full coverage and exclusions) "; } if (selectedMischrge.Name == "Jax Maintenance Plan") { discription = "All mechanical failures including engine and transmission issues are covered with this rental (see rental agreement for full coverage and exclusions)."; } if (selectedMischrge.Name == "Jax Protection Plan") { discription = "All wear parts including tires, brakes, windshield wipers and more are 100% covered with this rental (see rental agreement for full coverage and exclusions)."; } PopupNavigation.Instance.PushAsync(new DetailPopUp(selectedMischrge.Name, discription)); }