예제 #1
0
 def changeAsset(self, idAsset):
     lastPrice = Asset.getLastPrice(self, idAsset)
     newLastPrice = DBUpdater.randPrice(self, lastPrice)
     change = Asset.getChange(self, idAsset)
     newChange = DBUpdater.randChange(self, change)
     changePercentage = Asset.getChangePercentage(self, idAsset)
     newChangePercentage = DBUpdater.randPercentage(self, changePercentage)
     volume = Asset.getVolume(self, idAsset)
     newVolume = DBUpdater.randVolume(self, volume)
     Asset.updateAsset(self, idAsset, newLastPrice, newChange, newChangePercentage, newVolume)
     Asset.notifyObservers(self, self.user, self.tkframe)
     return newLastPrice
 def getChange(self, idAtivo):
     return Asset.getChange(self, idAtivo)
예제 #3
0
 def getChange(self, idContrato):
     assetId = self.getAssetId(idContrato)
     return Asset.getChange(self, assetId)