예제 #1
0
 def buyButtonClicked(self):
     contract = self.E1.get()
     buyerId = Contract.getBuyerId(self, contract)
     assetId = Contract.getAssetId(self, contract)
     buyPrice = Asset.getLastPrice(self, assetId)
     if (buyerId == 0):
         value = Contract.addBuyer(self, contract, self.user, buyPrice)
         if (not value):
             messagebox.showerror("Buy error", value)
         else:
             messagebox.showinfo("Buy info", "You bought the contract")
     else:
         messagebox.showerror("Buy error", "Contract already has a buyer")
예제 #2
0
 def getAssetId(self, idContrato):
     assetId = Contract.getAssetId(self, idContrato)
     return assetId
예제 #3
0
 def getAssetId(self, idContrato):
     return Contract.getAssetId(self, idContrato)