private void transactionButton_Click(object sender, EventArgs e)
        {
            TransactionUI ui = new TransactionUI();

            ui.Show();
        }
Ejemplo n.º 2
0
        public void TransactionRelatedOption()
        {
            TransactionUI transactionUI;

            transactionUI = new TransactionUI(new TransactionService());
            switch (EnumHelper.ConvertInEnum <TransactionRelated>(transactionUI.TransactionRelatedMenu()))
            {
            case TransactionRelated.Deposit:
                holderUI.DepositDisplay();
                Thread.Sleep(1000);
                TransactionRelatedOption();
                break;

            case TransactionRelated.Withdraw:
                try
                { holderUI.WithdrawDisplay(); }
                catch (Exception e) { Console.WriteLine("Something Went Wrong"); Console.ReadKey(); TransactionRelatedOption(); }
                Thread.Sleep(1000);
                TransactionRelatedOption();
                break;

            case TransactionRelated.TransferFund:
                string Type = AccountHolderUI.TransferFundDisplay();
                try
                {
                    if (Type == "1")
                    {
                        holderUI.SameBankTransferDisplay("RTGS");
                    }
                    else if (Type == "2")
                    {
                        holderUI.SameBankTransferDisplay("IMPS");
                    }
                    else if (Type == "3")
                    {
                        holderUI.OtherBankTransferDisplay("RTGS");
                    }
                    else if (Type == "4")
                    {
                        holderUI.OtherBankTransferDisplay("IMPS");
                    }
                    else
                    {
                    }
                }
                catch (Exception e) { Console.WriteLine("Something Went Wrong"); Console.ReadKey(); TransactionRelatedOption(); }
                Thread.Sleep(1000);
                TransactionRelatedOption();
                break;

            case TransactionRelated.ViewAccountdetail:
                holderUI.ViewAccount();
                Console.ReadKey();
                TransactionRelatedOption();
                break;

            case TransactionRelated.ViewTransactions:
                transactionUI.ViewTransactions();
                Thread.Sleep(1000);
                Console.ReadKey();
                TransactionRelatedOption();
                break;

            case TransactionRelated.LogOut:
                BankLoginOptions();
                break;

            default:
                DisplayHelper.PrintTextAtXY(60, 22, "WRONG CHOICE ENTERED");
                Thread.Sleep(1000);
                TransactionRelatedOption();
                break;
            }
        }