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."); } }
private void MainWindow_Shown(object sender, EventArgs e) { currentCard = null; }
private void MainWindow_Load(object sender, EventArgs e) { cardNo.Text = ""; pinNo.Text = ""; currentCard = null; }