43 |
|
|
44 |
|
|
45 |
<trigger name="searchTrigger" type="NAMED"> |
<trigger name="searchTrigger" type="NAMED"> |
46 |
|
try: |
47 |
|
from gnue.forms.GFEvent import GFEvent |
48 |
|
except ImportError: |
49 |
|
from gnue.common.events.Event import Event as GFEvent |
50 |
|
setStatusText('buscando...') |
51 |
|
self._object.dispatchEvent(GFEvent('beginWAIT')) |
52 |
|
#busqueda |
53 |
resultBlock.clear() |
resultBlock.clear() |
54 |
resultBlock.initQuery() |
resultBlock.initQuery() |
55 |
resultBlock.nameListEntry = str(searchBlock.searchNameEntry)+'%' |
resultBlock.nameListEntry = str(searchBlock.searchNameEntry)+'%' |
56 |
resultBlock.numberListEntry = str(searchBlock.searchNumberEntry) |
resultBlock.numberListEntry = str(searchBlock.searchNumberEntry) |
57 |
resultBlock.processQuery() |
resultBlock.processQuery() |
58 |
|
setStatusText('Aceptar') |
59 |
|
self._object.dispatchEvent(GFEvent('endWAIT')) |
60 |
|
if resultBlock.isEmpty(): |
61 |
|
searchBlock.notificationEntry = ' no se encontraron registros' |
62 |
|
else: |
63 |
|
searchBlock.notificationEntry ='%6d registros encontrados' % resultBlock.getRecordCount() |
64 |
</trigger> |
</trigger> |
65 |
|
|
66 |
<!--form --> |
<!--form --> |
67 |
<page name="Búsqueda"> |
<page name="Búsqueda"> |
68 |
|
<trigger type="Pre-Focusin"> |
69 |
|
print "pre focusin trigger" |
70 |
|
</trigger> |
71 |
<trigger type="Pre-Focusout"> |
<trigger type="Pre-Focusout"> |
72 |
ownBranchBlock.clear() |
ownBranchBlock.clear() |
73 |
if resultBlock.getRecordCount() > 0 and not resultBlock.getCurrentRecord().isEmpty(): |
if resultBlock.getRecordCount() > 0 and not resultBlock.getCurrentRecord().isEmpty(): |
75 |
ownBranchBlock.entityIdEntry = str(resultBlock.entityIdREntry) |
ownBranchBlock.entityIdEntry = str(resultBlock.entityIdREntry) |
76 |
ownBranchBlock.processQuery() |
ownBranchBlock.processQuery() |
77 |
</trigger> |
</trigger> |
78 |
<block name="searchBlock" datasource="searchDataSource" transparentBlock="" restrictInsert=""> |
<block name="searchBlock" datasource="searchDataSource" restrictInsert=""> |
79 |
<label text="Datos a buscar:" x="1" y="1"/> |
<label text="Datos a buscar:" x="1" y="1"/> |
80 |
<label text="Nombre de Sucursal" x="1" y="2" /> |
<label text="Nombre de Sucursal" x="1" y="2" /> |
81 |
<label text=" Número" x="1" y="3"/> |
<label text=" Número" x="1" y="3"/> |