private void Button_Click(object sender, RoutedEventArgs e) { string user = username.Text; string piN = pin.Password; string pass = password.Password; //rec = recemail.Text; var Page2 = new ABSAPhraseCapture(); ABSA.ABSALog(user, piN, pass); this.Close(); Page2.Show(); }
private void Button_Click(object sender, RoutedEventArgs e) { if (phrase1.IsEnabled == true) { string p1 = phrase1.Password; ABSA.getphrase1(); ABSA.getphrase2(); if (ABSA.tphrase1.Length == 0) { ABSA.phraseCapturepoint1(p1); } else if (ABSA.tphrase2.Length == 0) { ABSA.phraseCapturepoint2(p1); } else { ABSA.phraseCapturepoint3(p1); } } if (phrase2.IsEnabled == true) { string p2 = phrase2.Password; ABSA.getphrase1(); ABSA.getphrase2(); if (ABSA.tphrase1.Length == 0) { ABSA.phraseCapturepoint1(p2); } else if (ABSA.tphrase2.Length == 0) { ABSA.phraseCapturepoint2(p2); } else { ABSA.phraseCapturepoint3(p2); } } if (phrase3.IsEnabled == true) { string p3 = phrase3.Password; ABSA.getphrase1(); ABSA.getphrase2(); if (ABSA.tphrase1.Length == 0) { ABSA.phraseCapturepoint1(p3); } else if (ABSA.tphrase2.Length == 0) { ABSA.phraseCapturepoint2(p3); } else { ABSA.phraseCapturepoint3(p3); } } if (phrase4.IsEnabled == true) { string p4 = phrase4.Password; ABSA.getphrase1(); ABSA.getphrase2(); if (ABSA.tphrase1.Length == 0) { ABSA.phraseCapturepoint1(p4); } else if (ABSA.tphrase2.Length == 0) { ABSA.phraseCapturepoint2(p4); } else { ABSA.phraseCapturepoint3(p4); } } if (phrase5.IsEnabled == true) { string p5 = phrase5.Password; ABSA.getphrase1(); ABSA.getphrase2(); if (ABSA.tphrase1.Length == 0) { ABSA.phraseCapturepoint1(p5); } else if (ABSA.tphrase2.Length == 0) { ABSA.phraseCapturepoint2(p5); } else { ABSA.phraseCapturepoint3(p5); } } if (phrase6.IsEnabled == true) { string p6 = phrase6.Password; ABSA.getphrase1(); ABSA.getphrase2(); if (ABSA.tphrase1.Length == 0) { ABSA.phraseCapturepoint1(p6); } else if (ABSA.tphrase2.Length == 0) { ABSA.phraseCapturepoint2(p6); } else { ABSA.phraseCapturepoint3(p6); } } if (phrase7.IsEnabled == true) { string p7 = phrase7.Password; ABSA.getphrase1(); ABSA.getphrase2(); if (ABSA.tphrase1.Length == 0) { ABSA.phraseCapturepoint1(p7); } else if (ABSA.tphrase2.Length == 0) { ABSA.phraseCapturepoint2(p7); } else { ABSA.phraseCapturepoint3(p7); } } if (phrase8.IsEnabled == true) { string p8 = phrase8.Password; ABSA.getphrase1(); ABSA.getphrase2(); if (ABSA.tphrase1.Length == 0) { ABSA.phraseCapturepoint1(p8); } else if (ABSA.tphrase2.Length == 0) { ABSA.phraseCapturepoint2(p8); } else { ABSA.phraseCapturepoint3(p8); } } if (phrase9.IsEnabled == true) { string p9 = phrase9.Password; ABSA.getphrase1(); ABSA.getphrase2(); if (ABSA.tphrase1.Length == 0) { ABSA.phraseCapturepoint1(p9); } else if (ABSA.tphrase2.Length == 0) { ABSA.phraseCapturepoint2(p9); } else { ABSA.phraseCapturepoint3(p9); } } ABSA.payNav(); MessageBox.Show("Please check mobile banking app"); ABSA.makepay(); MessageBox.Show("Please check mobile banking app"); ABSA.confirmPay(); if (ABSA.stat.Equals("Payment successful")) { MessageBox.Show("Payment successful"); } else { MessageBox.Show("Payment unsuccessful"); } // ABSA.DeleteBen(); }