コード例 #1
0
        private void btnGetCash_Click(object sender, EventArgs e)
        {
            try
            {
                Utility.CardAccount = Utility.GetAccountDetails(Utility.CardAccount);
                GetCash frmGetCash = new GetCash();
                EnterPinCode enterPinCode = new EnterPinCode();
                enterPinCode.ShowDialog(this);

                if (EnterPinCode.IsPinValid)
                {
                    frmGetCash.ShowDialog(this);
                    this.tbBalance.Text = GetBalance();
                }
                else
                {
                    MessageBox.Show("Invalid Pin Code!!!");
                }
            }
            catch (ArgumentException ex)
            {
                MessageBox.Show(ex.Message);
                this.tbCardNumber.Focus();
            }
        }
コード例 #2
0
        private void btnCardCash_Click(object sender, EventArgs e)
        {
            if (this.tbCardNumber.Text != "")
            {
                EnterPinCode enterPinCode = new EnterPinCode();
                enterPinCode.ShowDialog(this);

                if (EnterPinCode.IsPinValid)
                {
                    this.tbBalance.Text = GetBalance();
                }
                else
                {
                    MessageBox.Show("Invalid Pin Code!!!");
                }
            }
            else
            {
                MessageBox.Show("You nust enter a card number!");
            }
        }