private void CallOptionScreen() { this.Hide(); frmOptions updatepin = new frmOptions(); updatepin.ShowDialog(); this.Close(); }
private void GoBack() { this.Hide(); frmOptions options = new frmOptions(); options.ShowDialog(); this.Close(); }
private void lblGoBack_Click(object sender, EventArgs e) { this.Hide(); frmOptions updatepin = new frmOptions(); updatepin.ShowDialog(); this.Close(); }
private void btnLogin_Click(object sender, EventArgs e) { DataSet dsCustomer; try { if (txtUserName.Text == string.Empty) { MessageBox.Show("Please Enter the User Name"); return; } if (txtPassword.Text == String.Empty) { MessageBox.Show("Please Enter Password"); return; } if (txtATMPin.Text == String.Empty) { MessageBox.Show("Please Enter ATM Pin"); return; } dsCustomer = objService.GetUserCredential(txtUserName.Text, txtPassword.Text, Convert.ToInt32(txtATMPin.Text)); if (dsCustomer != null) { if (dsCustomer.Tables["ValidateUser"] != null) { if (dsCustomer.Tables["ValidateUser"].Rows.Count > 0) { if (dsCustomer.Tables["IsLockedAndValid"].Rows.Count > 0) { if (Convert.ToInt32(dsCustomer.Tables["IsLockedAndValid"].Rows[0]["locked"]) == 1) { MessageBox.Show("Your Card has been locked. Please contact your bank Administrator"); return; } if (Convert.ToInt32(dsCustomer.Tables["IsLockedAndValid"].Rows[0]["valid"]) == 0) { MessageBox.Show("Your Card is invalid. Please renew your card"); return; } } this.Hide(); ClassValue.UserName = txtUserName.Text; ClassValue.CustomerId = Convert.ToInt32(dsCustomer.Tables[0].Rows[0]["customerID"]); ClassValue.BankID = dsCustomer.Tables[0].Rows[0]["BankID"].ToString(); ClassValue.AtmPin = Convert.ToInt32(txtATMPin.Text); ClassValue.Password = txtPassword.Text; frmOptions formoptions = new frmOptions(); formoptions.ShowDialog(); this.Close(); } //This line need to be included in your project else { MessageBox.Show("Invalid credential"); LoginAttempt++; if (LoginAttempt == 3) { objService.LockCard(txtUserName.Text, txtPassword.Text, Convert.ToInt32(txtATMPin.Text)); MessageBox.Show("Your account has been locked due to 3 successive failure attempts.Contact your Bank Administrator"); } } } } else { MessageBox.Show("Invalid credential"); LoginAttempt++; if (LoginAttempt == 3) { objService.LockCard(txtUserName.Text, txtPassword.Text, Convert.ToInt32(txtATMPin.Text)); MessageBox.Show("Your account has been locked due to 3 successive failure attempts.Contact your Bank Administrator"); } } } catch { } finally { dsCustomer = null; // this.Close(); } }