Example #1
0
        private void txtPinNum_TextChanged(object sender, EventArgs e)
        {
            if (txtPinNum.Text.Length == 4)
            {
                pin = int.Parse(txtPinNum.Text);

                ChangePinNumberBLL pinBLL = new ChangePinNumberBLL();
                bool customerStatus       = pinBLL.validatePin(pin, acNo);

                if (customerStatus)
                {
                    //atm button enable
                    btnBalance.Enabled = btnWithdraw.Enabled = btnWithdrawReceipt.Enabled = true;

                    panMoney.Controls.Clear();

                    txtAccountNo.Enabled = txtPinNum.Enabled = false;
                    Label lblIntro = new Label();
                    lblIntro.Name     = "lblIntro";
                    lblIntro.Text     = "Please \n\nselect \n\nan \n\naction !!!";
                    lblIntro.Location = new Point(70, 55);
                    lblIntro.AutoSize = true;
                    lblIntro.Font     = new Font("Georgia", 16F);
                    panMoney.Controls.Add(lblIntro);
                }
                else
                {
                    MessageBox.Show("Please enter correct information !!!");
                    txtAccountNo.Text    = txtPinNum.Text = "";
                    txtAccountNo.Enabled = true;
                    txtPinNum.Enabled    = false;
                    txtAccountNo.Focus();
                    return;
                }
            }
        }