private void ButtonCountryCodes_Click(object sender, RoutedEventArgs e)
        {
            ListCountryViewModel country_viewmodel = new ListCountryViewModel();

            country_viewmodel.Mode = ListCountryViewModel.ModelMode.ListDialog;

            ListCountryWindow window = new ListCountryWindow(country_viewmodel);

            window.Owner = this;
            window.ShowDialog();
        }
Beispiel #2
0
        private void ButtonLookupCountryCode_Click(object sender, RoutedEventArgs e)
        {
            // Initialize the viewmodel for the country list window.
            ListCountryViewModel list_model = new ListCountryViewModel
            {
                Mode = ListCountryViewModel.ModelMode.LookupDialog, // "LookupDialog" means that the [Select] button will be displayed.
                Input_CountryCodeID = ViewModel.ShipCountryCode
            };

            ListCountryWindow window = new ListCountryWindow(list_model);

            window.Owner = this;
            window.ShowDialog();

            if (window.DialogResult == false)
            {
                return;
            }

            ViewModel.ShipCountryCode = list_model.Output_CountryCodeID;
            UpdateShipCountryInfo();
        }