コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            bool authenticated = server.AccountService.authenticateTransaction(cardNo.Text, pinNo.Text);

            if (authenticated)
            {
                currentCard = new DebitCard(cardNo.Text, pinNo.Text);
                currentCard.setAccounts(server.AccountService.getAccountsByCard(cardNo.Text));
                FullView myAccounts = new FullView(this);
                this.Hide();
                cardNo.Text = "";
                pinNo.Text = "";
                logWindow.logger("Authentication Successfull for Debit Card : "+currentCard.CardNumber);
                myAccounts.Show();
            }
            else
            {
                currentCard = null;
                pinNo.Text = "";
                logWindow.logger("Authentication failed for Debit Card : " + cardNo.Text + "Invalid Pin or card.");
                MessageBox.Show("Invalid Pin or card.");
            }
        }
コード例 #2
0
 private void MainWindow_Shown(object sender, EventArgs e)
 {
     currentCard = null;
 }
コード例 #3
0
 private void MainWindow_Load(object sender, EventArgs e)
 {
     cardNo.Text = "";
     pinNo.Text = "";
     currentCard = null;
 }