def onReferenceChange(self, evt): refValue = evt.GetString() if (refValue == '[New reference]' or refValue == '[New concept]'): if (refValue == '[New reference]'): addParameters = DialogClassParameters( DOCUMENTREFERENCE_ID, 'Add Document Reference', DocumentReferenceDialog, DOCUMENTREFERENCE_BUTTONCOMMIT_ID, self.dbProxy.addDocumentReference, True) else: addParameters = DialogClassParameters( CONCEPTREFERENCE_ID, 'Add Concept Reference', ConceptReferenceDialog, CONCEPTREFERENCE_BUTTONCOMMIT_ID, self.dbProxy.addConceptReference, True) dialogClass = addParameters.dclass() addDialog = dialogClass(self, addParameters) if (addDialog.ShowModal() == addParameters.createButtonId()): dialogOutParameters = addDialog.parameters() addFn = addParameters.setter() objtId = addFn(dialogOutParameters) dimName = dialogOutParameters.name() refCtrl = self.FindWindowById( PERSONACHARACTERISTIC_COMBOREFERENCE_ID) refCtrl.Append(dimName) refCtrl.SetValue(dimName) addDialog.Destroy()
def onReferenceChange(self,evt): refValue = evt.GetString() descCtrl = self.FindWindowById(CHARACTERISTICREFERENCE_TEXTDESCRIPTION_ID) if (refValue == self.newArtifactString or refValue == self.newConceptString): if (refValue == self.newArtifactString): addParameters = DialogClassParameters(DOCUMENTREFERENCE_ID,'Add Artifact Reference',DocumentReferenceDialog,DOCUMENTREFERENCE_BUTTONCOMMIT_ID,self.dbProxy.addDocumentReference,True) else: addParameters = DialogClassParameters(CONCEPTREFERENCE_ID,'Add Concept Reference',ConceptReferenceDialog,CONCEPTREFERENCE_BUTTONCOMMIT_ID,self.dbProxy.addConceptReference,True) dialogClass = addParameters.dclass() addDialog = dialogClass(self,addParameters) if (addDialog.ShowModal() == addParameters.createButtonId()): dialogOutParameters = addDialog.parameters() addFn = addParameters.setter() objtId = addFn(dialogOutParameters) dimName = dialogOutParameters.name() refDesc = dialogOutParameters.description() refCtrl = self.FindWindowById(CHARACTERISTICREFERENCE_COMBOREFERENCE_ID) refCtrl.Append(dimName) refCtrl.SetValue(dimName) descCtrl.SetValue(refDesc) addDialog.Destroy() else: dimCtrl = self.FindWindowById(CHARACTERISTICREFERENCE_COMBODIMENSION_ID) dimName = dimCtrl.GetValue() refDesc = self.dbProxy.referenceDescription(dimName,refValue) descCtrl.SetValue(refDesc)
def onReferenceChange(self,evt): refValue = evt.GetString() if (refValue == '[New reference]' or refValue == '[New concept]'): if (refValue == '[New reference]'): addParameters = DialogClassParameters(DOCUMENTREFERENCE_ID,'Add Document Reference',DocumentReferenceDialog,DOCUMENTREFERENCE_BUTTONCOMMIT_ID,self.dbProxy.addDocumentReference,True) else: addParameters = DialogClassParameters(CONCEPTREFERENCE_ID,'Add Concept Reference',ConceptReferenceDialog,CONCEPTREFERENCE_BUTTONCOMMIT_ID,self.dbProxy.addConceptReference,True) dialogClass = addParameters.dclass() addDialog = dialogClass(self,addParameters) if (addDialog.ShowModal() == addParameters.createButtonId()): dialogOutParameters = addDialog.parameters() addFn = addParameters.setter() objtId = addFn(dialogOutParameters) dimName = dialogOutParameters.name() refCtrl = self.FindWindowById(PERSONACHARACTERISTIC_COMBOREFERENCE_ID) refCtrl.Append(dimName) refCtrl.SetValue(dimName) addDialog.Destroy()
def onReferenceChange(self, evt): refValue = evt.GetString() descCtrl = self.FindWindowById( armid.CHARACTERISTICREFERENCE_TEXTDESCRIPTION_ID) if (refValue == self.newArtifactString or refValue == self.newConceptString): if (refValue == self.newArtifactString): addParameters = DialogClassParameters( armid.DOCUMENTREFERENCE_ID, 'Add Artifact Reference', DocumentReferenceDialog, armid.DOCUMENTREFERENCE_BUTTONCOMMIT_ID, self.dbProxy.addDocumentReference, True) else: addParameters = DialogClassParameters( armid.CONCEPTREFERENCE_ID, 'Add Concept Reference', ConceptReferenceDialog, armid.CONCEPTREFERENCE_BUTTONCOMMIT_ID, self.dbProxy.addConceptReference, True) dialogClass = addParameters.dclass() addDialog = dialogClass(self, addParameters) if (addDialog.ShowModal() == addParameters.createButtonId()): dialogOutParameters = addDialog.parameters() addFn = addParameters.setter() objtId = addFn(dialogOutParameters) dimName = dialogOutParameters.name() refDesc = dialogOutParameters.description() refCtrl = self.FindWindowById( armid.CHARACTERISTICREFERENCE_COMBOREFERENCE_ID) refCtrl.Append(dimName) refCtrl.SetValue(dimName) descCtrl.SetValue(refDesc) addDialog.Destroy() else: dimCtrl = self.FindWindowById( armid.CHARACTERISTICREFERENCE_COMBODIMENSION_ID) dimName = dimCtrl.GetValue() refDesc = self.dbProxy.referenceDescription(dimName, refValue) descCtrl.SetValue(refDesc)