private void comboBoxSelectTransfer_SelectedIndexChanged(object sender, EventArgs e) { comboBoxToTransferMyIBAN.Items.Clear(); if (comboBoxSelectTransfer.Text.ToString() == "My another account") { label12.Visible = false; textBoxWriteIBAN.Visible = false; comboBoxToTransferMyIBAN.Visible = true; List <Page> lp = new List <Page>(); lp = DataManagement.getIbanList(); foreach (var item in lp) { int index = -1; index = comboBoxToTransferMyIBAN.FindString(item.Data.ToString()); if (index == -1 && item.Data.ToString() != comboBoxIBAN.Text.ToString()) { comboBoxToTransferMyIBAN.Items.Add(item.Data.ToString()); } } } else { label12.Visible = true; comboBoxToTransferMyIBAN.Visible = false; textBoxWriteIBAN.Visible = true; labelcurrencyToIban.Text = "-"; } }
private void bunifuFlatButton3_Click(object sender, EventArgs e) { lastMenupanel.Visible = false; panelMainTransfer.Visible = true; lastMenupanel.SendToBack(); lastMenupanel = panelMainTransfer; using (var context = new MitBankDBEntities()) { List <Page> listIban = new List <Page>(); listIban = DataManagement.getIbanList(); foreach (var item in listIban) { int index = -1; index = comboBoxIBAN.FindString(item.Data.ToString()); if (index == -1) { comboBoxIBAN.Items.Add(item.Data.ToString()); } } if (listIban.Count() != 0) { comboBoxIBAN.SelectedIndex = 0; comboBoxSelectTransfer.SelectedIndex = 0; } } }