Esempio n. 1
0
 private void ButtonInsertCard_Click(object sender, EventArgs e)
 {
     if (openCardDialog1.ShowDialog() == DialogResult.OK)
     {
         if (!(openCardDialog1.SafeFileName.Length <= 19))
         {
             card_number = openCardDialog1.SafeFileName.Substring(0, 16);
             string status = Ac1.CheckCardVerification(card_number);
             if (status == "BLK")
             {
                 MessageBox.Show("Картка заблокована, зверніться у найближче віділленя банкомату\n" +
                                 "Card is blocked, contact your nearest bank branch", "Помилка|Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
             }
             if (status == "EXP")
             {
                 MessageBox.Show("Картка прострочена, зверніться у найближче віділленя банкомату\n" +
                                 "Card is expired, contact your nearest bank branch", "Помилка|Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
             }
             if (status == "ACT")
             {
                 string bank_type = card_number.Substring(0, 4);
                 if (bank_type == "1414")
                 {
                     buttonSettings.Enabled = true;
                 }
                 else
                 {
                     buttonSettings.Enabled = false;
                 }
                 TabFrames1.SelectedTab = tabLanguage;
             }
         }
     }
 }