private void lblRetry_Click(object sender, RoutedEventArgs e) { ErrorpopUp.Visibility = Visibility.Collapsed; getBusSearch obj = new getBusSearch(); obj.placeCodeFrom = lblFromPlace.Text; obj.placeCodeTo= lblToPlace.Text; obj. Date= lblJrnyDate.Text; obj.Fromplace= txtBFromLocationT.Text; obj.Toplace= txtBToLocationT.Text; obj.placeIDFrom= txtBFromID.Text ; obj.placeIDTo= txtBToID.Text ; Frame.Navigate(typeof(TripSearch),obj); }
private void tapSearchReturn_Tapped(object sender, TappedRoutedEventArgs e) { if (lblSourcrReturnName.Text == "Select" || lblDestReturnName.Text == "Select") { PopupValidation.Visibility = Visibility.Visible; } else if (lblSourcrReturnName.Text == lblDestReturnName.Text) { PopupSameCity.Visibility = Visibility.Visible; } else { try { getBusSearch _objBusSerchIn = new getBusSearch(); _objBusSerchIn.placeCodeTo = lblDestinationCodeNameoneway.Text; _objBusSerchIn.placeIDFrom = lblSourceIDNameoneway.Text; _objBusSerchIn.placeIDTo = lblDestinationIDNameoneway.Text; _objBusSerchIn.placeCodeFrom = lblSourceCodeNameoneway.Text; _objBusSerchIn.Fromplace = lblSourcrReturnName.Text; _objBusSerchIn.Toplace = lblDestReturnName.Text; _objBusSerchIn.Date = roundTripDepartDatePicker.Date.ToString("dd MMM yyyy"); _objBusSerchIn.DateReturn = roundTripreturnDatePicker.Date.ToString("dd MMM yyyy"); _objBusSerchIn.Label = "ReturneBusSearch"; _objBusSerchIn.LabelReturn = "FirstTrip"; pickDropHelper.objgetBusSearch = _objBusSerchIn; lblDestinationNameoneway.Text = "Select"; lblDestinationCodeNameoneway.Text = "Select"; lblSourceNameoneway.Text = "Select"; lblSourcrReturnName.Text = "Select"; this.Frame.Navigate(typeof(TripSearch), _objBusSerchIn); } catch (Exception ex) { throw; }; } }
private async void ttxtCancle_Tapped(object sender, TappedRoutedEventArgs e) { if (CommanTripType == "RoundTrip") { getBusSearch obj = new getBusSearch(); obj.placeCodeFrom= placeCodeFrom.Text; obj.placeCodeTo= placeCodeTo.Text ; obj.placeIDFrom= placeIDFrom.Text ; obj.placeIDTo= placeIDFrom.Text ; obj.Toplace= placeNameFrom.Text ; obj.Fromplace= placeNameTo.Text ; string d = arrivalDate.Text; System.DateTime dt = System.DateTime.ParseExact(d, "dd/MM/yyyy", CultureInfo.InvariantCulture); obj.DateReturn = dt.ToString("dd MMM yyyy"); obj.Label = "ReturneBusSearch"; obj.LabelReturn = "RoundTrip"; PageNavigationMode.Mode = PageTransmission.Left; await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => Frame.Navigate(typeof(TripSearch), obj)); // this.Frame.Navigate(typeof(TripSearch), obj); } else if (CommanTripType == "FirstTrip") { getBusSearch obj = new getBusSearch(); obj.placeCodeFrom = placeCodeFrom.Text; obj.placeCodeTo = placeCodeTo.Text; obj.placeIDFrom = placeIDFrom.Text; obj.placeIDTo = placeIDFrom.Text; obj.Toplace = placeNameFrom.Text; obj.Fromplace = placeNameTo.Text; string d = arrivalDate.Text; System.DateTime dt = System.DateTime.ParseExact(d, "dd/MM/yyyy", CultureInfo.InvariantCulture); obj.Date = dt.ToString("dd MMM yyyy"); obj.Label = "ReturneBusSearch"; obj.LabelReturn = "FirstTrip"; // this.Frame.Navigate(typeof(TripSearch), obj); PageNavigationMode.Mode = PageTransmission.Left; await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => Frame.Navigate(typeof(TripSearch), obj)); } else { PageNavigationMode.Mode = PageTransmission.Left; await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => Frame.Navigate(typeof(TripSearch))); //this.Frame.Navigate(typeof(TripSearch)); } }
private void Border_Tapped(object sender, TappedRoutedEventArgs e) { try { if (lblSourceNameoneway.Text == "Select" || lblDestinationNameoneway.Text == "Select") { PopupValidation.Visibility = Visibility.Visible; } else if (lblSourceNameoneway.Text == lblDestinationNameoneway.Text) { PopupSameCity.Visibility = Visibility.Visible; } else { getBusSearch _objBusSerchIn = new getBusSearch(); _objBusSerchIn.placeCodeTo = lblDestinationCodeNameoneway.Text; _objBusSerchIn.placeIDFrom = lblSourceIDNameoneway.Text; _objBusSerchIn.placeIDTo = lblDestinationIDNameoneway.Text; _objBusSerchIn.placeCodeFrom = lblSourceCodeNameoneway.Text; _objBusSerchIn.Fromplace = lblSourceNameoneway.Text; _objBusSerchIn.Toplace = lblDestinationNameoneway.Text; _objBusSerchIn.Date = arrivalDatePicker.Date.ToString("dd MMM yyyy"); _objBusSerchIn.Label = "SingleBusSearch"; _objBusSerchIn.LabelReturn = "Empty"; lblDestinationNameoneway.Text = "Select"; lblDestinationCodeNameoneway.Text = "Select"; lblSourceNameoneway.Text = "Select"; lblSourcrReturnName.Text = "Select"; this.Frame.Navigate(typeof(TripSearch), _objBusSerchIn); } } catch { } }
private async void Border_Tapped(object sender, TappedRoutedEventArgs e) { try { if (lblSourceNameoneway.Text == "Select" || lblDestinationNameoneway.Text == "Select") { PopupValidation.Visibility = Visibility.Visible; } else if (lblSourceNameoneway.Text == lblDestinationNameoneway.Text) { PopupSameCity.Visibility = Visibility.Visible; } else { getBusSearch _objBusSerchIn = new getBusSearch(); _objBusSerchIn.placeCodeTo = lblDestinationCodeNameoneway.Text; _objBusSerchIn.placeIDFrom = lblSourceIDNameoneway.Text; _objBusSerchIn.placeIDTo = lblDestinationIDNameoneway.Text; _objBusSerchIn.placeCodeFrom = lblSourceCodeNameoneway.Text; _objBusSerchIn.Fromplace = lblSourceNameoneway.Text; _objBusSerchIn.Toplace = lblDestinationNameoneway.Text; _objBusSerchIn.Date = arrivalDatePicker.Date.ToString("dd MMM yyyy"); _objBusSerchIn.Label = "SingleBusSearch"; _objBusSerchIn.LabelReturn = "Empty"; lblDestinationNameoneway.Text = "Select"; lblDestinationCodeNameoneway.Text = "Select"; lblSourceNameoneway.Text = "Select"; lblSourcrReturnName.Text = "Select"; PageNavigationMode.Mode = PageTransmission.Bottom; await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => Frame.Navigate(typeof(TripSearch), _objBusSerchIn)); // this.Frame.Navigate(typeof(TripSearch), _objBusSerchIn); } } catch { } }