Exemplo n.º 1
0
 def SaveFile():
     Account.SaveFile()
     Card.SaveFile()
     file = "LC22_HW1_BankClass.txt"
     f = open(file, "wb")
     pickle.dump(Bank.AccAndCardsAssoc, f)
     f.close()
Exemplo n.º 2
0
 def LoadFile():
     Account.LoadFile()
     Card.LoadFile()
     file = "LC22_HW1_BankClass.txt"
     f = open(file, "rb")
     Bank.AccAndCardsAssoc = pickle.load(f)
     f.close()
Exemplo n.º 3
0
 def AddNewCard(self):
     NewCard = Card()
     Bank.AccAndCardsAssoc[NewCard.CardNo] = self.AccNo
     Bank.SaveFile()
     Bank.LoadFile()
Exemplo n.º 4
0
 def AddAccount(self, Name, Bal, MobileNo, AadharNo):
     NewAcc = Account(Name, Bal, MobileNo, AadharNo)
     NewCard = Card()
     Bank.AccAndCardsAssoc[NewCard.CardNo] = NewAcc.AccNo
     Bank.SaveFile()
     Bank.LoadFile()