def addPayee(): print(template.printMenuBar().format(accId=form.getvalue("accountID"))) accId = form.getvalue("accountID") accName = form.getvalue("payeeName") payeeBank = form.getvalue("payeeBank") payeeAccNO = form.getvalue("payeeNumber") print(payee.addPayee(accId, payeeAccNO, accName, payeeBank))
def doTransaction(): if form.getvalue("accountID"): print(template.printMenuBar().format(accId=form.getvalue("accountID"))) accId = form.getvalue("accountID") amount = form.getvalue("payeeAmount") payeeBank = form.getvalue("payeeBank") payeeAccNO = form.getvalue("payeeNumber") print(transaction.addTransaction(accId, payeeAccNO, payeeBank, amount)) print(acc.debitAmt(accId, amount))
#! C:\Python36\python import cgi import template from accountDb import Account print(template.printHead()) acc = Account("", "", "", 0) form = cgi.FieldStorage() if form.getvalue("accNo"): accountId = form.getvalue("accNo") acc = acc.getAccDetails(accountId) print(template.printMenuBar().format(accId=accountId)) print("""<br> <p> Feel free to deposit your money in our bank. We assure you that your money is safe with us ;)</p> <br> <form method="post" action="service.py"> <div class="form-group"> <label for="amount">Amount in Rs</label> <input type="number" class="form-control" name="amount" placeholder="1000 Rs" min=0 max=999999 step=0.1 required> <br> <div class="text-center"> <input type="hidden" value="deposit" name="operation"> <input type="hidden" value="{accID}" name="accountID"> <input class="btn btn-success btn-lg" type="submit" value="Deposit"> </div> </div> </form> """.format(accID=accountId)) print(template.printFoot())
def doDeposit(): if form.getvalue("accountID"): print(template.printMenuBar().format(accId=form.getvalue("accountID"))) accId = form.getvalue("accountID") amount = form.getvalue("amount") print(acc.depositMoney(accId, amount))
def removePayee(): print(template.printMenuBar().format(accId=form.getvalue("accountID"))) id = form.getvalue("payeeID") print(payee.deletePayee(id))