示例#1
0
        //loads another transaction. closes form complete, opens transaction entry form
        private void btnYes_Click(object sender, EventArgs e)
        {
            this.Hide();
            Form frmTransactionEntry = new frmTransactionEntry();

            frmTransactionEntry.ShowDialog();
            this.Visible = false;
            this.Close();
        }
示例#2
0
 //handles the OK click buttons to confirm the user credentials, loads frmTransactionEntry
 //if match is found
 private void btnOK_Click(object sender, EventArgs e)
 {
     GlobalDataClass.ATMBank.Tries();
     if (txtPIN.Text.Length == 4 && GlobalDataClass.ATMBank.accountTry() == false)
     {
         int access = GlobalDataClass.customer.VerifyNumberAndPin(txtName.Text, txtPIN.Text);
         if (access == 3)
         {
             GlobalDataClass.FormsCode = "frmTransactionEntry";
             this.Hide();
             Form frmPinIDEntry = new frmTransactionEntry();
             frmPinIDEntry.ShowDialog();
             this.Visible = false;
             this.Close();
         }
         else if (access == 1)
         {
             txtName.Text = "";
             txtName.Focus();
         }
         else if (access == 2)
         {
             txtPIN.Text = "";
             txtPIN.Focus();
         }
     }
     else if (GlobalDataClass.ATMBank.accountTry() == true)
     {
         MessageBox.Show("Please go see bank Manager", "Account Locked");
         this.Close();
     }
     else if (txtPIN.Text.Length != 4)
     {
         MessageBox.Show("Please Enter a valid name and 4 digit Pin number \n" + "Remaining Tries: "
                         + GlobalDataClass.ATMBank.remainingTries().ToString(), "Entry Error");
     }
 }