コード例 #1
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            //            if (inChiusura) return;
            //Lunghezza del BBAN = 1 (CIN) + 5 (ABI) + 5(CAB) + 12 (C/C) = 23
            string bban = CfgFn.normalizzaIBAN(txtBBAN.Text.ToUpper());

            if (bban.Length != 23)
            {
                MessageBox.Show(this, "Attenzione: Il codice BBAN deve essere composto da 23 caratteri!");
                insertedBBAN = "";
                DialogResult = DialogResult.None;
                return;
            }
            if (CfgFn.CheckLetter(bban.Substring(1), 22) != bban[0])
            {
                MessageBox.Show(this, "Attenzione il BBAN inserito non è corretto!");
                insertedBBAN = "";
                DialogResult = DialogResult.None;
                return;
            }
            insertedBBAN = bban;
        }