Exemple #1
0
        void FairEstimate_NextButton_Click()
        {
            Debug.WriteLine("Fair Estimate {0} {1}", pickupPosition.Latitude, pickupPosition.Longitude);
            var destinationPage = new DestinationPage();

            LoginResponse loginUser = Application.Current.Properties["userData"] as LoginResponse;


            if (LocationName == null && txtLocation.Text == "")
            {
                Application.Current.MainPage.DisplayAlert("Shofar", "Please choose correct location", "OK");
            }
            else if (LocationName != null && txtLocation.Text != "")
            {
                LocationName = txtLocation.Text;
            }
            else
            {
                LocationName = "Current Location";
            }

            // Create new booking
            ShoferAppST shoferBooking = ShoferAppST.Instance();

            shoferBooking.Booking = new BookingData();
            shoferBooking.Booking.PickupPosition     = pickupPosition;
            shoferBooking.Booking.PickupPositionName = LocationName;
            shoferBooking.Booking.VehicleType        = selectedCar;
            shoferBooking.Booking.DriverId           = "2";
            shoferBooking.Booking.UserId             = loginUser.id;
            shoferBooking.Booking.KMPrice            = Convert.ToDouble(selectedVechileInfo.per_km_charge);
            shoferBooking.Booking.BasePrice          = Convert.ToDouble(selectedVechileInfo.base_fare);

            destinationPage.pickupPosition = pickupPosition;
            Navigation.PushAsync(destinationPage);
        }
        void Done_NextButton_Click()
        {
            var destinationPage = new DestinationPage();

            LoginResponse loginUser = Application.Current.Properties["userData"] as LoginResponse;
        }