Ejemplo n.º 1
0
 /// <summary>
 /// The wizard triggers OnExit when the user scrolls forward or backward.  Trigger the step exit event passing on the exit code to underlying
 /// custom implementations
 /// </summary>
 /// <param name="exitCode"></param>
 internal void OnExit(StepExitCode exitCode)
 {
     if (StepExited != null)
     {
         StepExited(exitCode);
     }
 }
Ejemplo n.º 2
0
        private void OnStepExited(StepExitCode exitCode)
        {
            if (exitCode == StepExitCode.ExitPrevious)
            {
                return;
            }

            try
            {
                if (CarProfile == null)
                {
                    CarProfile = new Car();
                }

                //let us save the vehicle information here
                CarProfile.ownerUsername = HelperClass.CurrentUser; //currently logged in user...duh :)
                //now lets get the bitmap and add them to the list
                foreach (var path in _paths)
                {
                    //get the bitmap image
                    //build image views here for preview purposes
                    //lets add it to our collection
                    CarProfile.SelectedImagePaths.Add(path);
                    //carsList.Add(bitmapImage);
                    //we can also list in ain alist view for user preview
                    //selectedImage.SetImageBitmap(bitmapImage);
                    Console.WriteLine(string.Format(string.Format("Image path is {0}", path)));
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(string.Format("An error occured {0} {1}", ex.Message, ex.StackTrace));
                MetricsManager.TrackEvent("An Error occured" + ex.Message + ex.StackTrace);
            }
        }
Ejemplo n.º 3
0
        //after all validation when next  button is pressed
        private void OnStepExited(StepExitCode exitCode)
        {
            if (exitCode == StepExitCode.ExitPrevious)
            {
                return;
            }


            if (CarProfile == null)
            {
                CarProfile = new Car();
            }
            //assign the car values now
            CarProfile.mileage        = _vehicleMileage;
            CarProfile.milesData      = _selectedDistanceUnit;
            CarProfile.model          = _selectedModel;
            CarProfile.make           = _selectedMake;
            CarProfile.driveTrain     = _selectedDriveTrain;
            CarProfile.engine         = _selectedEngine;
            CarProfile.transmission   = _selectedTransmission;
            CarProfile.carType        = _selectedCarType;
            CarProfile.interiorColor  = _selectedIntColor;
            CarProfile.exteriorColor  = _selectedExtColor;
            CarProfile.year           = _selectedYear;
            CarProfile.listPrice      = _txtListPrice.Text;
            CarProfile.vin            = _txtVin.Text;
            CarProfile.stockNumber    = _txtStockNo.Text;
            CarProfile.priceOnRequest = _isPriceOnRequest;
            CarProfile.vat            = _hasVat;
            CarProfile.description    = _txtDescription.Text;
        }
Ejemplo n.º 4
0
 private void OnStepExited(StepExitCode exitCode)
 {
     if (exitCode == StepExitCode.ExitNext)
     {
         BindDataFields();
     }
 }
        void OnStepExited(StepExitCode exitCode)
        {
            if (exitCode == StepExitCode.ExitPrevious) return;

            if (Cust == null) Cust = new Customer();

            Cust.Firstname = FirstNameTxt.Text;
            Cust.LastName = FirstNameTxt.Text;
            Cust.Dob = System.DateTime.Parse(DobTxt.Text);
        }
Ejemplo n.º 6
0
        private void OnStepExited(StepExitCode exitCode)
        {
            if (exitCode == StepExitCode.ExitPrevious)
            {
                return;
            }

            if (UserProfile == null)
            {
                UserProfile = new UserProfile();
            }
        }
Ejemplo n.º 7
0
        private void OnStepExited(StepExitCode exitCode)
        {
            if (exitCode == StepExitCode.ExitPrevious)
            {
                return;
            }

            if (UserProfile == null)
            {
                UserProfile = new UserProfile();
            }


            if (DealerProfile == null)
            {
                DealerProfile = new DealerProfile();
            }


            //add the dealer details
            if (_userAccountType == "Dealer")
            {
                DealerProfile.userProfile      = UserProfile;
                DealerProfile.officerFirstName = _firstName.Text;
                DealerProfile.officerLastName  = _lastName.Text;
                DealerProfile.companyName      = _companyName.Text;
                DealerProfile.companyAddress   = _dealerAddress.Text;
                DealerProfile.country          = _userCountry;
                DealerProfile.zipCode          = _zipCode.Text;
                //DealerProfile.dealerLicense = dealerLicense.Text;
                DealerProfile.dealerLicense = _pictureFilePath;
                DealerProfile.userName      = _userName.Text;

                UserProfile.firstName = _firstName.Text;
                UserProfile.lastName  = _lastName.Text;
                UserProfile.email     = _emailAddress.Text;
                UserProfile.phone     = _phoneNumber.Text;
                UserProfile.zipCode   = _zipCode.Text;
                UserProfile.username  = _userName.Text.ToLower(); //always lowercase this one
                UserProfile.password  = _password.Text;
            }
            else
            {
                UserProfile.firstName = _firstName.Text;
                UserProfile.lastName  = _lastName.Text;
                UserProfile.email     = _emailAddress.Text;
                UserProfile.phone     = _phoneNumber.Text;
                UserProfile.zipCode   = _zipCode.Text;
                UserProfile.username  = _userName.Text.ToLower(); //always lower case this one
                UserProfile.password  = _password.Text;
            }
        }
Ejemplo n.º 8
0
        private void OnStepExited(StepExitCode exitCode)
        {
            if (exitCode == StepExitCode.ExitPrevious)
            {
                return;
            }

            if (UserProfile == null)
            {
                UserProfile = new UserProfile();
            }

            UserProfile.country = _selectedCountry;
        }
Ejemplo n.º 9
0
        private void OnStepExited(StepExitCode exitCode)
        {
            if (exitCode == StepExitCode.ExitPrevious)
            {
                return;
            }

            if (UserProfile == null)
            {
                UserProfile = new UserProfile();
            }

            UserProfile.userType = _accountType;
        }
        void OnStepExited(StepExitCode exitCode)
        {
            if (exitCode == StepExitCode.ExitPrevious) return;

            if (Cust == null) throw new ArgumentNullException("Customer object is required");

            Cust.BillingAddress = new Address
            {
                Line1 = AddrLine1.Text,
                Line2 = AddrLine2.Text,
                City = AddrCity.Text,
                State = AddrState.Text,
                ZipCode = AddrZipCode.Text
            };
        }
Ejemplo n.º 11
0
        void OnStepExited(StepExitCode exitCode)
        {
            if (exitCode == StepExitCode.ExitPrevious)
            {
                return;
            }

            if (Cust == null)
            {
                Cust = new Customer();
            }

            Cust.Firstname = FirstNameTxt.Text;
            Cust.LastName  = FirstNameTxt.Text;
            Cust.Dob       = System.DateTime.Parse(DobTxt.Text);
        }
Ejemplo n.º 12
0
        void OnStepExited(StepExitCode exitCode)
        {
            if (exitCode == StepExitCode.ExitPrevious)
            {
                return;
            }

            if (Cust == null)
            {
                throw new ArgumentNullException("Customer object is required");
            }

            Cust.BillingAddress = new Address
            {
                Line1   = AddrLine1.Text,
                Line2   = AddrLine2.Text,
                City    = AddrCity.Text,
                State   = AddrState.Text,
                ZipCode = AddrZipCode.Text
            };
        }
Ejemplo n.º 13
0
        private async void OnStepExited(StepExitCode exitCode)
        {
            var message = "Recovery email not sent successfully";

            AndHUD.Shared.Show(Context, string.Format("Authenticating email {0}", _recoveryEmail), -1, MaskType.Black);
            try
            {
                if (exitCode == StepExitCode.ExitPrevious)
                {
                    return;
                }

                message = "Recovery email sent successfully";
                //let us send the recovery email

                await ParseUser.RequestPasswordResetAsync(_recoveryEmail);
            }
            catch (ParseException ex)
            {
                message = "Error sending password reset " + ex.Message;
                Console.WriteLine(message);
                MetricsManager.TrackEvent(message + ex.StackTrace);
            }
            catch (Exception ex)
            {
                message = "Error sending password reset " + ex.Message;
                Console.WriteLine(message);
                MetricsManager.TrackEvent(message + ex.StackTrace);
            }
            finally
            {
                AndHUD.Shared.Dismiss(Context);
            }

            Toast.MakeText(Context, message, Android.Widget.ToastLength.Long).Show();
        }
Ejemplo n.º 14
0
 private void OnStepExited(StepExitCode exitCode)
 {
     if (exitCode == StepExitCode.ExitNext)
         BindDataFields();
 }
Ejemplo n.º 15
0
 /// <summary>
 /// The wizard triggers OnExit when the user scrolls forward or backward.  Trigger the step exit event passing on the exit code to underlying
 /// custom implementations
 /// </summary>
 /// <param name="exitCode"></param>
 internal void OnExit(StepExitCode exitCode)
 {
     if (StepExited != null)
         StepExited(exitCode);
 }