def onAddSupportLink(self,evt): toId = self.selectedId() if (toId != -1): try: dlg = TraceExplorer(self,self.theDimensionName,False) if (dlg.ShowModal() == armid.TRACE_BUTTONADD_ID): traceFromDimension = dlg.toDimension() linkTable = traceFromDimension + '_' + self.theDimensionName fromId = dlg.toId() self.dbProxy.addTrace(linkTable,fromId,toId) dlg.Destroy() except ARMException,errorText: dlg = wx.MessageDialog(self,str(errorText),'Add support link',wx.OK | wx.ICON_ERROR) dlg.ShowModal() dlg.Destroy() return
def onAddContributionLink(self, evt): fromId = self.selectedId() if (fromId != -1): try: dlg = TraceExplorer(self, self.theDimensionName, True) if (dlg.ShowModal() == TRACE_BUTTONADD_ID): traceToDimension = dlg.toDimension() linkTable = self.theDimensionName + '_' + traceToDimension toId = dlg.toId() self.dbProxy.addTrace(linkTable, fromId, toId) dlg.Destroy() except ARMException, errorText: dlg = wx.MessageDialog(self, str(errorText), 'Add Contribution Link', wx.OK | wx.ICON_ERROR) dlg.ShowModal() dlg.Destroy() return
def onTrace(self, dimensionName, fromId, isFrom, envName): dlg = TraceExplorer(self, dimensionName, isFrom, envName) if (dlg.ShowModal() == TRACE_BUTTONADD_ID): objtTable = self.GetTable() objtName = (( objtTable.om.objects())[self.GetGridCursorRow()]).name() p = GoalAssociationParameters(envName, objtName, dimensionName, 'and', dlg.toValue(), dlg.toDimension(), 0, '') self.dbProxy.addGoalAssociation(p) dlg.Destroy()
def onTrace(self,dimensionName,fromId,isFrom,envName): dlg = TraceExplorer(self,dimensionName,isFrom,envName) if (dlg.ShowModal() == armid.TRACE_BUTTONADD_ID): if (isFrom): traceDimension = dlg.fromDimension() traceLabel = dlg.label() linkTable = dimensionName + '_' + traceDimension toId = dlg.toId() self.dbProxy.addTrace(linkTable,fromId,toId,traceLabel) else: traceDimension = dlg.toDimension() traceLabel = dlg.label() linkTable = traceDimension + '_' + dimensionName toId = dlg.toId() self.dbProxy.addTrace(linkTable,toId,fromId,traceLabel) dlg.Destroy()