categoryTypeBlock.processRollback() if categoryResultBlock.getRecordCount() > 0 and not categoryResultBlock.getCurrentRecord().isEmpty(): categoryTypeBlock.initQuery() categoryTypeBlock.categoryTypeIdEntry = ("%s" % categoryResultBlock.categoryIdREntry) categoryTypeBlock.processQuery() categoryResultBlock.processRollback() categoryResultBlock.initQuery() categoryResultBlock.nameListEntry = ("%s" % searchCategoryBlock.searchNameEntry)+"%" categoryResultBlock.processQuery() categoryTypeBlock.commit() categoryTypeBlock.deleteRecord() categoryTypeBlock.commit() import hack hack.rollback(categoryTypeBlock) categoryEntityTypeBlock.deleteRecord() categoryEntityTypeBlock.commit() import hack hack.rollback(categoryEntityTypeBlock) categoryEntityTypeBlock.commit() = 0.5 from gnue.common.events.Event import Event as GFEvent # busy clock form._object.dispatchEvent(GFEvent('beginWAIT')) setStatusText('buscando...') def setEntityType (recNo): if recNo>=0: entityTypeResultBlock.jumpRecord (recNo) categoryEntityTypeBlock.categoryEntityTypeIdEntry= str(entityTypeResultBlock.entityTypeResultIdEntry) categoryEntityTypeBlock.categoryEntityTypeNameEntry= str(entityTypeResultBlock.entityTypeResultNameEntry) # look for the name... entityTypeResultBlock.processRollback () entityTypeResultBlock.initQuery () entityTypeResultBlock.entityTypeResultNameEntry= str(categoryEntityTypeBlock.categoryEntityTypeNameEntry)+'%' entityTypeResultBlock.processQuery () # are there too much results? resultCount= entityTypeResultBlock.getRecordCount () if resultCount>1: # do the select-man runForm ('entityTypeSelect.gfd', { 'data':entityTypeResultBlock, 'callback': setEntityType }) elif resultCount==1: setEntityType (0) setStatusText('Ok') form._object.dispatchEvent(GFEvent('endWAIT')) ]]> categoryAtributeBlock.deleteRecord() categoryAtributeBlock.commit() import hack hack.rollback(categoryAtributeBlock) categoryAtributeBlock.commit()