Example #1
0
        private void bankNameComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ComboBox comboBox = sender as ComboBox;
            string   name     = comboBox.SelectedItem as string;

            bankNumberTextBox.Text = BankNumberDictionary.FirstOrDefault(x => x.Value == name).Key.ToString();
        }
Example #2
0
        private void BankName_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            BankNum.Text           = BankNumberDictionary.First(x => x.Value == BankName.SelectedItem.ToString()).Key.ToString();
            BankBranchesDictionary = bl.GetBranchesListForBank(Convert.ToInt32(BankNum.Text));
            BranchCity.Text        = null;
            BranchAddress.Text     = null;
            List <int> temp = BankBranchesDictionary.Keys.ToList();

            temp.Sort();
            BranchNumber.ItemsSource   = temp;
            BranchNumber.SelectedIndex = 0;
        }