예제 #1
0
        private void btnSaveadditional_info_Click(object sender, RoutedEventArgs e)
        {
            CreateProfile.ProfileData pf = new CreateProfile.ProfileData();
            var ExpDate = TxtExpDatePD.Text.Replace(",", "|");
            var re      = @"^(0[1-9]|1[0-2])\/?(([0-9]{4})$)";
            var result  = Regex.Match(ExpDate, re);

            if (result.Success != true)
            {
                MessageBox.Show("ExpiryDate Pattern Should be like this: 05/2024");
                return;
            }

            saveProfileLocally();
            //ProfileSection ps = new ProfileSection();
            CreateProfile cp   = new CreateProfile("");
            MainWindow    main = new MainWindow();

            //cp.createProfile.Visibility = Visibility.Hidden;
            //cp.createprofileinfo.Visibility = Visibility.Hidden;
            //cp.createProfile2.Visibility = Visibility.Hidden;
            //cp.createprofileinfo2.Visibility = Visibility.Hidden;
            //AdditonalProfile.Visibility = Visibility.Hidden;
            //GridAdditionalProfileInfo.Visibility = Visibility.Hidden;

            this.NavigationService.Navigate(new ProfileSection());
            //ClearAllTextboxProfile();
            //; profile_list.Add(pf);
            //RefreshProfiles();

            //main.MyMessageBox("Profile saved", Visibility.Hidden, Visibility.Hidden, Visibility.Visible, "");

            //MessageBox.Show("Profile saved");
        }
예제 #2
0
        private void cancelProfile_Click(object sender, RoutedEventArgs e)
        {
            MainWindow            main      = new MainWindow();
            ProfileSection        ps        = new ProfileSection();
            AdditionalProfileInfo adproinfo = new AdditionalProfileInfo(null, null);
            CreateProfile         cp        = new CreateProfile("");


            //this.NavigationService.Navigate(new MyMB("", Visibility, Visibility, Visibility, ""));
            MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show("Are you sure?", "Cancel Confirmation", System.Windows.MessageBoxButton.YesNo);

            if (messageBoxResult == MessageBoxResult.Yes)
            {
                this.NavigationService.Navigate(new ProfileSection());

                //ps.profile.Visibility = Visibility.Visible;
                //ps.profileinfo.Visibility = Visibility.Visible;
                //createProfile.Visibility = Visibility.Hidden;
                createprofileinfo.Visibility = Visibility.Hidden;
                //createProfile2.Visibility = Visibility.Hidden;
                //createprofileinfo2.Visibility = Visibility.Hidden;
                //adproinfo.AdditonalProfile.Visibility = Visibility.Hidden;
                adproinfo.GridAdditionalProfileInfo.Visibility = Visibility.Hidden;

                adproinfo.ClearAllTextboxProfile();
            }

            //main.MyMessageBox("Are you sure want to cancel?", Visibility.Visible, Visibility.Visible, Visibility.Hidden, "ProfileSection");
            // Change the page of the frame.
            //if (pageFrame != null)
            //{
            //    this.NavigationService.Navigate(new ProfileSection("profile"));
            //}
            //main.MyMessageBox("Are you sure?", Visibility.Visible, Visibility.Visible, Visibility.Hidden, "cancelProfile");
        }
예제 #3
0
        private void continueImport_Click(object sender, RoutedEventArgs e)
        {
            ProfileSection ps = new ProfileSection();
            CreateProfile  cp = new CreateProfile("");

            //cp.importProfile.Visibility = Visibility.Hidden;
            //cp.importprofileinfo.Visibility = Visibility.Hidden;
            //ps.profile.Visibility = Visibility.Visible;
            ps.profileinfo.Visibility = Visibility.Visible;
        }
예제 #4
0
        private void btnReturnValue_Click(object sender, RoutedEventArgs e)
        {
            ReturnString = ((Button)sender).Uid.ToString();

            if (ReturnString == "1")
            {
                if (partLabel.Content == "ProfileSection")
                {
                    CreateProfile cp = new CreateProfile("profile");
                }
            }
            this.Close();
        }
예제 #5
0
        public void ClearAllTextboxProfile()
        {
            CreateProfile cp = new CreateProfile("");

            cp.profile_name.Text = string.Empty;
            //cp.country_listBox.SelectedIndex = -1;

            //grid Delivery Address
            TxtFNameDA.Text   = string.Empty;
            TxtLNameDA.Text   = string.Empty;
            TxtPhoneNoDA.Text = string.Empty;
            TxtAddressDA.Text = string.Empty;
            TxtAptDA.Text     = string.Empty;
            TxtCityDA.Text    = string.Empty;
            TxtStateDA.Text   = string.Empty;
            TxtZipCodeDA.Text = string.Empty;
            TxtPhoneNoDA.Text = string.Empty;

            //grid Billing Address
            TxtFNameBA.Text   = string.Empty;
            TxtLNameBA.Text   = string.Empty;
            TxtPhoneNoBA.Text = string.Empty;
            TxtAddressBA.Text = string.Empty;
            TxtAptBA.Text     = string.Empty;
            TxtCityBA.Text    = string.Empty;
            cbStateBA.Text    = string.Empty;
            TxtZipCodeBA.Text = string.Empty;
            TxtPhoneNoBA.Text = string.Empty;

            //grid Payment Details
            TxtCardHolderPD.Text = string.Empty;
            TxtCardNoPD.Text     = string.Empty;
            TxtCvvPD.Text        = string.Empty;
            TxtEmailPD.Text      = string.Empty;
            TxtExpDatePD.Text    = string.Empty;

            //grid Miscellaneous
            // cbStateMis.SelectedIndex = 0;
            ChDelAddressMis.IsChecked = false;
        }
예제 #6
0
        private void cancelProfile_Click(object sender, RoutedEventArgs e)
        {
            ProfileSection ps = new ProfileSection();
            CreateProfile  cp = new CreateProfile("");

            MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show("Are you sure?", "Cancel Confirmation", System.Windows.MessageBoxButton.YesNo);

            if (messageBoxResult == MessageBoxResult.Yes)
            {
                this.NavigationService.Navigate(new ProfileSection());

                //ps.profile.Visibility = Visibility.Visible;
                ps.profileinfo.Visibility = Visibility.Visible;
                //cp.createProfile.Visibility = Visibility.Hidden;
                cp.createprofileinfo.Visibility = Visibility.Hidden;
                //cp.createProfile2.Visibility = Visibility.Hidden;
                //cp.createprofileinfo2.Visibility = Visibility.Hidden;
                //AdditonalProfile.Visibility = Visibility.Hidden;
                GridAdditionalProfileInfo.Visibility = Visibility.Hidden;

                ClearAllTextboxProfile();
            }
        }
예제 #7
0
        private void btn_showAdditionalInfo(object sender, RoutedEventArgs e)
        {
            MainWindow     main = new MainWindow();
            ProfileSection ps   = new ProfileSection();
            CreateProfile  cp   = new CreateProfile("");

            if (country_listBox.SelectedIndex == -1)
            {
                main.MyMessageBox("Please select Region", Visibility.Hidden, Visibility.Hidden, Visibility.Visible, "");

                //MessageBox.Show("Please select Region");
            }
            else
            {
                this.NavigationService.Navigate(new AdditionalProfileInfo(profile_name.Text, pf.Country));

                // ps.profile.Visibility = Visibility.Hidden;
                ps.profileinfo.Visibility = Visibility.Hidden;
                // createProfile.Visibility = Visibility.Hidden;
                createprofileinfo.Visibility = Visibility.Hidden;
                // createProfile2.Visibility = Visibility.Hidden;
                // createprofileinfo2.Visibility = Visibility.Hidden;
            }
        }