-
Notifications
You must be signed in to change notification settings - Fork 0
/
GE.PERSONA_DISPONIBLEXINTERES.php
734 lines (657 loc) · 41.5 KB
/
GE.PERSONA_DISPONIBLEXINTERES.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
<?php
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* ATTENTION!
* If you see this message in your browser (Internet Explorer, Mozilla Firefox, Google Chrome, etc.)
* this means that PHP is not properly installed on your web server. Please refer to the PHP manual
* for more details: http://php.net/manual/install.php
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*/
include_once dirname(__FILE__) . '/' . 'components/utils/check_utils.php';
CheckPHPVersion();
CheckTemplatesCacheFolderIsExistsAndWritable();
include_once dirname(__FILE__) . '/' . 'phpgen_settings.php';
include_once dirname(__FILE__) . '/' . 'database_engine/oracle_engine.php';
include_once dirname(__FILE__) . '/' . 'components/page.php';
function GetConnectionOptions()
{
$result = GetGlobalConnectionOptions();
$result['client_encoding'] = 'AL32UTF8';
GetApplication()->GetUserAuthorizationStrategy()->ApplyIdentityToConnectionOptions($result);
return $result;
}
// OnGlobalBeforePageExecute event handler
// OnBeforePageExecute event handler
class GE_PERSONA_DISPONIBLEXINTERESPage extends Page
{
protected function DoBeforeCreate()
{
$this->dataset = new TableDataset(
new OracleConnectionFactory(),
GetConnectionOptions(),
'"GE"."PERSONA_DISPONIBLEXINTERES"');
$field = new StringField('USERNAME');
$this->dataset->AddField($field, true);
$field = new StringField('ES_REAL');
$this->dataset->AddField($field, true);
$field = new IntegerField('INTERES_ID');
$this->dataset->AddField($field, true);
$field = new DateField('FEC_CREACION');
$this->dataset->AddField($field, true);
$field = new StringField('USUARIO_CREACION');
$this->dataset->AddField($field, true);
$field = new DateField('FEC_ULTIMA_MOD');
$this->dataset->AddField($field, true);
$field = new StringField('USUARIO_ULTIMA_MOD');
$this->dataset->AddField($field, true);
$this->dataset->AddLookupField('INTERES_ID', 'GE.INTERES', new IntegerField('INTERES_ID'), new StringField('NOMBRE', 'LA1', 'LT1'), 'LT1');
}
protected function DoPrepare() {
}
protected function CreatePageNavigator()
{
$result = new CompositePageNavigator($this);
$partitionNavigator = new PageNavigator('pnav', $this, $this->dataset);
$partitionNavigator->SetRowsPerPage(20);
$result->AddPageNavigator($partitionNavigator);
return $result;
}
public function GetPageList()
{
$currentPageCaption = $this->GetShortCaption();
$result = new PageList($this);
$result->AddGroup($this->RenderText('Default'));
if (GetCurrentUserGrantForDataSource('GE.BEBEDOR')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('BEBEDOR'), 'GE.BEBEDOR.php', $this->RenderText('BEBEDOR'), $currentPageCaption == $this->RenderText('BEBEDOR'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.CATEGORIA_INTERES')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('CATEGORIA INTERES'), 'GE.CATEGORIA_INTERES.php', $this->RenderText('CATEGORIA INTERES'), $currentPageCaption == $this->RenderText('CATEGORIA INTERES'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.CIUDAD')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('CIUDAD'), 'GE.CIUDAD.php', $this->RenderText('CIUDAD'), $currentPageCaption == $this->RenderText('CIUDAD'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.COLOR_OJOS')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('COLOR OJOS'), 'GE.COLOR_OJOS.php', $this->RenderText('COLOR OJOS'), $currentPageCaption == $this->RenderText('COLOR OJOS'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.webreports')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('Webreports'), 'GE.webreports.php', $this->RenderText('Webreports'), $currentPageCaption == $this->RenderText('Webreports'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.webreport_style')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('Webreport Style'), 'GE.webreport_style.php', $this->RenderText('Webreport Style'), $currentPageCaption == $this->RenderText('Webreport Style'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.webreport_sql')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('Webreport Sql'), 'GE.webreport_sql.php', $this->RenderText('Webreport Sql'), $currentPageCaption == $this->RenderText('Webreport Sql'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.WINK')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('WINK'), 'GE.WINK.php', $this->RenderText('WINK'), $currentPageCaption == $this->RenderText('WINK'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.webreport_admin')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('Webreport Admin'), 'GE.webreport_admin.php', $this->RenderText('Webreport Admin'), $currentPageCaption == $this->RenderText('Webreport Admin'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.VISITA')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('VISITA'), 'GE.VISITA.php', $this->RenderText('VISITA'), $currentPageCaption == $this->RenderText('VISITA'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.TIPO_RELACION')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('TIPO RELACION'), 'GE.TIPO_RELACION.php', $this->RenderText('TIPO RELACION'), $currentPageCaption == $this->RenderText('TIPO RELACION'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.SALARIO')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('SALARIO'), 'GE.SALARIO.php', $this->RenderText('SALARIO'), $currentPageCaption == $this->RenderText('SALARIO'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.RELIGION')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('RELIGION'), 'GE.RELIGION.php', $this->RenderText('RELIGION'), $currentPageCaption == $this->RenderText('RELIGION'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.PERSONA_DISPONIBLEXRELIGION')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('PERSONA DISPONIBLEXRELIGION'), 'GE.PERSONA_DISPONIBLEXRELIGION.php', $this->RenderText('PERSONA DISPONIBLEXRELIGION'), $currentPageCaption == $this->RenderText('PERSONA DISPONIBLEXRELIGION'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.PERSONA_DISPONIBLEXOCUPACION')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('PERSONA DISPONIBLEXOCUPACION'), 'GE.PERSONA_DISPONIBLEXOCUPACION.php', $this->RenderText('PERSONA DISPONIBLEXOCUPACION'), $currentPageCaption == $this->RenderText('PERSONA DISPONIBLEXOCUPACION'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.PERSONA_DISPONIBLEXMASCOTA')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('PERSONA DISPONIBLEXMASCOTA'), 'GE.PERSONA_DISPONIBLEXMASCOTA.php', $this->RenderText('PERSONA DISPONIBLEXMASCOTA'), $currentPageCaption == $this->RenderText('PERSONA DISPONIBLEXMASCOTA'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.PERSONA_DISPONIBLEXINTERES')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('PERSONA DISPONIBLEXINTERES'), 'GE.PERSONA_DISPONIBLEXINTERES.php', $this->RenderText('PERSONA DISPONIBLEXINTERES'), $currentPageCaption == $this->RenderText('PERSONA DISPONIBLEXINTERES'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.PERSONA_DISPONIBLEXEJERCICIO')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('PERSONA DISPONIBLEXEJERCICIO'), 'GE.PERSONA_DISPONIBLEXEJERCICIO.php', $this->RenderText('PERSONA DISPONIBLEXEJERCICIO'), $currentPageCaption == $this->RenderText('PERSONA DISPONIBLEXEJERCICIO'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.PERSONA_DISPONIBLEXCOLOR_PELO')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('PERSONA DISPONIBLEXCOLOR PELO'), 'GE.PERSONA_DISPONIBLEXCOLOR_PELO.php', $this->RenderText('PERSONA DISPONIBLEXCOLOR PELO'), $currentPageCaption == $this->RenderText('PERSONA DISPONIBLEXCOLOR PELO'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.PERSONA_DISPONIBLEXIDIOMA')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('PERSONA DISPONIBLEXIDIOMA'), 'GE.PERSONA_DISPONIBLEXIDIOMA.php', $this->RenderText('PERSONA DISPONIBLEXIDIOMA'), $currentPageCaption == $this->RenderText('PERSONA DISPONIBLEXIDIOMA'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.PERSONA_DISPONIBLE')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('PERSONA DISPONIBLE'), 'GE.PERSONA_DISPONIBLE.php', $this->RenderText('PERSONA DISPONIBLE'), $currentPageCaption == $this->RenderText('PERSONA DISPONIBLE'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.PERSONA')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('PERSONA'), 'GE.PERSONA.php', $this->RenderText('PERSONA'), $currentPageCaption == $this->RenderText('PERSONA'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.PARAMETROS')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('PARAMETROS'), 'GE.PARAMETROS.php', $this->RenderText('PARAMETROS'), $currentPageCaption == $this->RenderText('PARAMETROS'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.PAIS')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('PAIS'), 'GE.PAIS.php', $this->RenderText('PAIS'), $currentPageCaption == $this->RenderText('PAIS'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.OCUPACIONXCATEGORIA_OCUPACION')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('OCUPACIONXCATEGORIA OCUPACION'), 'GE.OCUPACIONXCATEGORIA_OCUPACION.php', $this->RenderText('OCUPACIONXCATEGORIA OCUPACION'), $currentPageCaption == $this->RenderText('OCUPACIONXCATEGORIA OCUPACION'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.OCUPACION')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('OCUPACION'), 'GE.OCUPACION.php', $this->RenderText('OCUPACION'), $currentPageCaption == $this->RenderText('OCUPACION'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.MASCOTA')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('MASCOTA'), 'GE.MASCOTA.php', $this->RenderText('MASCOTA'), $currentPageCaption == $this->RenderText('MASCOTA'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.NIVEL_EDUCACION')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('NIVEL EDUCACION'), 'GE.NIVEL_EDUCACION.php', $this->RenderText('NIVEL EDUCACION'), $currentPageCaption == $this->RenderText('NIVEL EDUCACION'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.INTERESXCATEGORIA_INTERES')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('INTERESXCATEGORIA INTERES'), 'GE.INTERESXCATEGORIA_INTERES.php', $this->RenderText('INTERESXCATEGORIA INTERES'), $currentPageCaption == $this->RenderText('INTERESXCATEGORIA INTERES'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.INTERES')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('INTERES'), 'GE.INTERES.php', $this->RenderText('INTERES'), $currentPageCaption == $this->RenderText('INTERES'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.IDIOMA')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('IDIOMA'), 'GE.IDIOMA.php', $this->RenderText('IDIOMA'), $currentPageCaption == $this->RenderText('IDIOMA'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.GENERO')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('GENERO'), 'GE.GENERO.php', $this->RenderText('GENERO'), $currentPageCaption == $this->RenderText('GENERO'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.FUMADOR')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('FUMADOR'), 'GE.FUMADOR.php', $this->RenderText('FUMADOR'), $currentPageCaption == $this->RenderText('FUMADOR'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.FRECUENCIA_EJERCICIO')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('FRECUENCIA EJERCICIO'), 'GE.FRECUENCIA_EJERCICIO.php', $this->RenderText('FRECUENCIA EJERCICIO'), $currentPageCaption == $this->RenderText('FRECUENCIA EJERCICIO'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.EVENTO')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('EVENTO'), 'GE.EVENTO.php', $this->RenderText('EVENTO'), $currentPageCaption == $this->RenderText('EVENTO'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.FOTO')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('FOTO'), 'GE.FOTO.php', $this->RenderText('FOTO'), $currentPageCaption == $this->RenderText('FOTO'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.ESTADO_CIVIL')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('ESTADO CIVIL'), 'GE.ESTADO_CIVIL.php', $this->RenderText('ESTADO CIVIL'), $currentPageCaption == $this->RenderText('ESTADO CIVIL'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.EJERCICIO')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('EJERCICIO'), 'GE.EJERCICIO.php', $this->RenderText('EJERCICIO'), $currentPageCaption == $this->RenderText('EJERCICIO'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.EDAD')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('EDAD'), 'GE.EDAD.php', $this->RenderText('EDAD'), $currentPageCaption == $this->RenderText('EDAD'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.CONTEXTURA')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('CONTEXTURA'), 'GE.CONTEXTURA.php', $this->RenderText('CONTEXTURA'), $currentPageCaption == $this->RenderText('CONTEXTURA'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.COLOR_PIEL')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('COLOR PIEL'), 'GE.COLOR_PIEL.php', $this->RenderText('COLOR PIEL'), $currentPageCaption == $this->RenderText('COLOR PIEL'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.COLOR_PELO')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('COLOR PELO'), 'GE.COLOR_PELO.php', $this->RenderText('COLOR PELO'), $currentPageCaption == $this->RenderText('COLOR PELO'), false, $this->RenderText('Default')));
if (GetCurrentUserGrantForDataSource('GE.CATEGORIA_OCUPACION')->HasViewGrant())
$result->AddPage(new PageLink($this->RenderText('CATEGORIA OCUPACION'), 'GE.CATEGORIA_OCUPACION.php', $this->RenderText('CATEGORIA OCUPACION'), $currentPageCaption == $this->RenderText('CATEGORIA OCUPACION'), false, $this->RenderText('Default')));
if ( HasAdminPage() && GetApplication()->HasAdminGrantForCurrentUser() ) {
$result->AddGroup('Admin area');
$result->AddPage(new PageLink($this->GetLocalizerCaptions()->GetMessageString('AdminPage'), 'phpgen_admin.php', $this->GetLocalizerCaptions()->GetMessageString('AdminPage'), false, false, 'Admin area'));
}
return $result;
}
protected function CreateRssGenerator()
{
return null;
}
protected function CreateGridSearchControl(Grid $grid)
{
$grid->UseFilter = true;
$grid->SearchControl = new SimpleSearch('GE_PERSONA_DISPONIBLEXINTERESssearch', $this->dataset,
array('USERNAME', 'ES_REAL', 'LA1', 'FEC_CREACION', 'USUARIO_CREACION', 'FEC_ULTIMA_MOD', 'USUARIO_ULTIMA_MOD'),
array($this->RenderText('USERNAME'), $this->RenderText('ES REAL'), $this->RenderText('INTERES ID'), $this->RenderText('FEC CREACION'), $this->RenderText('USUARIO CREACION'), $this->RenderText('FEC ULTIMA MOD'), $this->RenderText('USUARIO ULTIMA MOD')),
array(
'=' => $this->GetLocalizerCaptions()->GetMessageString('equals'),
'<>' => $this->GetLocalizerCaptions()->GetMessageString('doesNotEquals'),
'<' => $this->GetLocalizerCaptions()->GetMessageString('isLessThan'),
'<=' => $this->GetLocalizerCaptions()->GetMessageString('isLessThanOrEqualsTo'),
'>' => $this->GetLocalizerCaptions()->GetMessageString('isGreaterThan'),
'>=' => $this->GetLocalizerCaptions()->GetMessageString('isGreaterThanOrEqualsTo'),
'ILIKE' => $this->GetLocalizerCaptions()->GetMessageString('Like'),
'STARTS' => $this->GetLocalizerCaptions()->GetMessageString('StartsWith'),
'ENDS' => $this->GetLocalizerCaptions()->GetMessageString('EndsWith'),
'CONTAINS' => $this->GetLocalizerCaptions()->GetMessageString('Contains')
), $this->GetLocalizerCaptions(), $this, 'CONTAINS'
);
}
protected function CreateGridAdvancedSearchControl(Grid $grid)
{
$this->AdvancedSearchControl = new AdvancedSearchControl('GE_PERSONA_DISPONIBLEXINTERESasearch', $this->dataset, $this->GetLocalizerCaptions(), $this->GetColumnVariableContainer(), $this->CreateLinkBuilder());
$this->AdvancedSearchControl->setTimerInterval(1000);
$this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('USERNAME', $this->RenderText('USERNAME')));
$this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('ES_REAL', $this->RenderText('ES REAL')));
$lookupDataset = new TableDataset(
new OracleConnectionFactory(),
GetConnectionOptions(),
'"GE"."INTERES"');
$field = new IntegerField('INTERES_ID');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, true);
$field = new StringField('NOMBRE');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new DateField('FEC_CREACION');
$lookupDataset->AddField($field, false);
$field = new StringField('USUARIO_CREACION');
$lookupDataset->AddField($field, false);
$field = new DateField('FEC_ULTIMA_MOD');
$lookupDataset->AddField($field, false);
$field = new StringField('USUARIO_ULTIMA_MOD');
$lookupDataset->AddField($field, false);
$lookupDataset->SetOrderBy('NOMBRE', GetOrderTypeAsSQL(otAscending));
$this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateLookupSearchInput('INTERES_ID', $this->RenderText('INTERES ID'), $lookupDataset, 'INTERES_ID', 'NOMBRE', false, 8));
$this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateDateTimeSearchInput('FEC_CREACION', $this->RenderText('FEC CREACION'), 'Y-m-d'));
$this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('USUARIO_CREACION', $this->RenderText('USUARIO CREACION')));
$this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateDateTimeSearchInput('FEC_ULTIMA_MOD', $this->RenderText('FEC ULTIMA MOD'), 'Y-m-d'));
$this->AdvancedSearchControl->AddSearchColumn($this->AdvancedSearchControl->CreateStringSearchInput('USUARIO_ULTIMA_MOD', $this->RenderText('USUARIO ULTIMA MOD')));
}
protected function AddOperationsColumns(Grid $grid)
{
$actionsBandName = 'actions';
$grid->AddBandToBegin($actionsBandName, $this->GetLocalizerCaptions()->GetMessageString('Actions'), true);
if ($this->GetSecurityInfo()->HasViewGrant())
{
$column = new RowOperationByLinkColumn($this->GetLocalizerCaptions()->GetMessageString('View'), OPERATION_VIEW, $this->dataset);
$grid->AddViewColumn($column, $actionsBandName);
}
if ($this->GetSecurityInfo()->HasEditGrant())
{
$column = new RowOperationByLinkColumn($this->GetLocalizerCaptions()->GetMessageString('Edit'), OPERATION_EDIT, $this->dataset);
$grid->AddViewColumn($column, $actionsBandName);
$column->OnShow->AddListener('ShowEditButtonHandler', $this);
}
if ($this->GetSecurityInfo()->HasDeleteGrant())
{
$column = new RowOperationByLinkColumn($this->GetLocalizerCaptions()->GetMessageString('Delete'), OPERATION_DELETE, $this->dataset);
$grid->AddViewColumn($column, $actionsBandName);
$column->OnShow->AddListener('ShowDeleteButtonHandler', $this);
$column->SetAdditionalAttribute('data-modal-delete', 'true');
$column->SetAdditionalAttribute('data-delete-handler-name', $this->GetModalGridDeleteHandler());
}
if ($this->GetSecurityInfo()->HasAddGrant())
{
$column = new RowOperationByLinkColumn($this->GetLocalizerCaptions()->GetMessageString('Copy'), OPERATION_COPY, $this->dataset);
$grid->AddViewColumn($column, $actionsBandName);
}
}
protected function AddFieldColumns(Grid $grid)
{
//
// View column for USERNAME field
//
$column = new TextViewColumn('USERNAME', 'USERNAME', $this->dataset);
$column->SetOrderable(true);
$column->SetDescription($this->RenderText(''));
$column->SetFixedWidth(null);
$grid->AddViewColumn($column);
//
// View column for ES_REAL field
//
$column = new TextViewColumn('ES_REAL', 'ES REAL', $this->dataset);
$column->SetOrderable(true);
$column->SetDescription($this->RenderText(''));
$column->SetFixedWidth(null);
$grid->AddViewColumn($column);
//
// View column for NOMBRE field
//
$column = new TextViewColumn('LA1', 'INTERES ID', $this->dataset);
$column->SetOrderable(true);
$column->SetDescription($this->RenderText(''));
$column->SetFixedWidth(null);
$grid->AddViewColumn($column);
//
// View column for FEC_CREACION field
//
$column = new DateTimeViewColumn('FEC_CREACION', 'FEC CREACION', $this->dataset);
$column->SetDateTimeFormat('Y-m-d');
$column->SetOrderable(true);
$column->SetDescription($this->RenderText(''));
$column->SetFixedWidth(null);
$grid->AddViewColumn($column);
//
// View column for USUARIO_CREACION field
//
$column = new TextViewColumn('USUARIO_CREACION', 'USUARIO CREACION', $this->dataset);
$column->SetOrderable(true);
$column->SetDescription($this->RenderText(''));
$column->SetFixedWidth(null);
$grid->AddViewColumn($column);
//
// View column for FEC_ULTIMA_MOD field
//
$column = new DateTimeViewColumn('FEC_ULTIMA_MOD', 'FEC ULTIMA MOD', $this->dataset);
$column->SetDateTimeFormat('Y-m-d');
$column->SetOrderable(true);
$column->SetDescription($this->RenderText(''));
$column->SetFixedWidth(null);
$grid->AddViewColumn($column);
//
// View column for USUARIO_ULTIMA_MOD field
//
$column = new TextViewColumn('USUARIO_ULTIMA_MOD', 'USUARIO ULTIMA MOD', $this->dataset);
$column->SetOrderable(true);
$column->SetDescription($this->RenderText(''));
$column->SetFixedWidth(null);
$grid->AddViewColumn($column);
}
protected function AddSingleRecordViewColumns(Grid $grid)
{
//
// View column for USERNAME field
//
$column = new TextViewColumn('USERNAME', 'USERNAME', $this->dataset);
$column->SetOrderable(true);
$grid->AddSingleRecordViewColumn($column);
//
// View column for ES_REAL field
//
$column = new TextViewColumn('ES_REAL', 'ES REAL', $this->dataset);
$column->SetOrderable(true);
$grid->AddSingleRecordViewColumn($column);
//
// View column for NOMBRE field
//
$column = new TextViewColumn('LA1', 'INTERES ID', $this->dataset);
$column->SetOrderable(true);
$grid->AddSingleRecordViewColumn($column);
//
// View column for FEC_CREACION field
//
$column = new DateTimeViewColumn('FEC_CREACION', 'FEC CREACION', $this->dataset);
$column->SetDateTimeFormat('Y-m-d');
$column->SetOrderable(true);
$grid->AddSingleRecordViewColumn($column);
//
// View column for USUARIO_CREACION field
//
$column = new TextViewColumn('USUARIO_CREACION', 'USUARIO CREACION', $this->dataset);
$column->SetOrderable(true);
$grid->AddSingleRecordViewColumn($column);
//
// View column for FEC_ULTIMA_MOD field
//
$column = new DateTimeViewColumn('FEC_ULTIMA_MOD', 'FEC ULTIMA MOD', $this->dataset);
$column->SetDateTimeFormat('Y-m-d');
$column->SetOrderable(true);
$grid->AddSingleRecordViewColumn($column);
//
// View column for USUARIO_ULTIMA_MOD field
//
$column = new TextViewColumn('USUARIO_ULTIMA_MOD', 'USUARIO ULTIMA MOD', $this->dataset);
$column->SetOrderable(true);
$grid->AddSingleRecordViewColumn($column);
}
protected function AddEditColumns(Grid $grid)
{
//
// Edit column for USERNAME field
//
$editor = new TextEdit('username_edit');
$editor->SetSize(10);
$editor->SetMaxLength(10);
$editColumn = new CustomEditColumn('USERNAME', 'USERNAME', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($editColumn);
//
// Edit column for ES_REAL field
//
$editor = new TextEdit('es_real_edit');
$editor->SetSize(1);
$editor->SetMaxLength(1);
$editColumn = new CustomEditColumn('ES REAL', 'ES_REAL', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($editColumn);
//
// Edit column for INTERES_ID field
//
$editor = new ComboBox('interes_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$lookupDataset = new TableDataset(
new OracleConnectionFactory(),
GetConnectionOptions(),
'"GE"."INTERES"');
$field = new IntegerField('INTERES_ID');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, true);
$field = new StringField('NOMBRE');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new DateField('FEC_CREACION');
$lookupDataset->AddField($field, false);
$field = new StringField('USUARIO_CREACION');
$lookupDataset->AddField($field, false);
$field = new DateField('FEC_ULTIMA_MOD');
$lookupDataset->AddField($field, false);
$field = new StringField('USUARIO_ULTIMA_MOD');
$lookupDataset->AddField($field, false);
$lookupDataset->SetOrderBy('NOMBRE', GetOrderTypeAsSQL(otAscending));
$editColumn = new LookUpEditColumn(
'INTERES ID',
'INTERES_ID',
$editor,
$this->dataset, 'INTERES_ID', 'NOMBRE', $lookupDataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddEditColumn($editColumn);
}
protected function AddInsertColumns(Grid $grid)
{
//
// Edit column for USERNAME field
//
$editor = new TextEdit('username_edit');
$editor->SetSize(10);
$editor->SetMaxLength(10);
$editColumn = new CustomEditColumn('USERNAME', 'USERNAME', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for ES_REAL field
//
$editor = new TextEdit('es_real_edit');
$editor->SetSize(1);
$editor->SetMaxLength(1);
$editColumn = new CustomEditColumn('ES REAL', 'ES_REAL', $editor, $this->dataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
//
// Edit column for INTERES_ID field
//
$editor = new ComboBox('interes_id_edit', $this->GetLocalizerCaptions()->GetMessageString('PleaseSelect'));
$lookupDataset = new TableDataset(
new OracleConnectionFactory(),
GetConnectionOptions(),
'"GE"."INTERES"');
$field = new IntegerField('INTERES_ID');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, true);
$field = new StringField('NOMBRE');
$field->SetIsNotNull(true);
$lookupDataset->AddField($field, false);
$field = new DateField('FEC_CREACION');
$lookupDataset->AddField($field, false);
$field = new StringField('USUARIO_CREACION');
$lookupDataset->AddField($field, false);
$field = new DateField('FEC_ULTIMA_MOD');
$lookupDataset->AddField($field, false);
$field = new StringField('USUARIO_ULTIMA_MOD');
$lookupDataset->AddField($field, false);
$lookupDataset->SetOrderBy('NOMBRE', GetOrderTypeAsSQL(otAscending));
$editColumn = new LookUpEditColumn(
'INTERES ID',
'INTERES_ID',
$editor,
$this->dataset, 'INTERES_ID', 'NOMBRE', $lookupDataset);
$editColumn->SetAllowSetToNull(true);
$this->ApplyCommonColumnEditProperties($editColumn);
$grid->AddInsertColumn($editColumn);
if ($this->GetSecurityInfo()->HasAddGrant())
{
$grid->SetShowAddButton(true);
$grid->SetShowInlineAddButton(false);
}
else
{
$grid->SetShowInlineAddButton(false);
$grid->SetShowAddButton(false);
}
}
protected function AddPrintColumns(Grid $grid)
{
//
// View column for USERNAME field
//
$column = new TextViewColumn('USERNAME', 'USERNAME', $this->dataset);
$column->SetOrderable(true);
$grid->AddPrintColumn($column);
//
// View column for ES_REAL field
//
$column = new TextViewColumn('ES_REAL', 'ES REAL', $this->dataset);
$column->SetOrderable(true);
$grid->AddPrintColumn($column);
//
// View column for NOMBRE field
//
$column = new TextViewColumn('LA1', 'INTERES ID', $this->dataset);
$column->SetOrderable(true);
$grid->AddPrintColumn($column);
//
// View column for FEC_CREACION field
//
$column = new DateTimeViewColumn('FEC_CREACION', 'FEC CREACION', $this->dataset);
$column->SetDateTimeFormat('Y-m-d');
$column->SetOrderable(true);
$grid->AddPrintColumn($column);
//
// View column for USUARIO_CREACION field
//
$column = new TextViewColumn('USUARIO_CREACION', 'USUARIO CREACION', $this->dataset);
$column->SetOrderable(true);
$grid->AddPrintColumn($column);
//
// View column for FEC_ULTIMA_MOD field
//
$column = new DateTimeViewColumn('FEC_ULTIMA_MOD', 'FEC ULTIMA MOD', $this->dataset);
$column->SetDateTimeFormat('Y-m-d');
$column->SetOrderable(true);
$grid->AddPrintColumn($column);
//
// View column for USUARIO_ULTIMA_MOD field
//
$column = new TextViewColumn('USUARIO_ULTIMA_MOD', 'USUARIO ULTIMA MOD', $this->dataset);
$column->SetOrderable(true);
$grid->AddPrintColumn($column);
}
protected function AddExportColumns(Grid $grid)
{
//
// View column for USERNAME field
//
$column = new TextViewColumn('USERNAME', 'USERNAME', $this->dataset);
$column->SetOrderable(true);
$grid->AddExportColumn($column);
//
// View column for ES_REAL field
//
$column = new TextViewColumn('ES_REAL', 'ES REAL', $this->dataset);
$column->SetOrderable(true);
$grid->AddExportColumn($column);
//
// View column for NOMBRE field
//
$column = new TextViewColumn('LA1', 'INTERES ID', $this->dataset);
$column->SetOrderable(true);
$grid->AddExportColumn($column);
//
// View column for FEC_CREACION field
//
$column = new DateTimeViewColumn('FEC_CREACION', 'FEC CREACION', $this->dataset);
$column->SetDateTimeFormat('Y-m-d');
$column->SetOrderable(true);
$grid->AddExportColumn($column);
//
// View column for USUARIO_CREACION field
//
$column = new TextViewColumn('USUARIO_CREACION', 'USUARIO CREACION', $this->dataset);
$column->SetOrderable(true);
$grid->AddExportColumn($column);
//
// View column for FEC_ULTIMA_MOD field
//
$column = new DateTimeViewColumn('FEC_ULTIMA_MOD', 'FEC ULTIMA MOD', $this->dataset);
$column->SetDateTimeFormat('Y-m-d');
$column->SetOrderable(true);
$grid->AddExportColumn($column);
//
// View column for USUARIO_ULTIMA_MOD field
//
$column = new TextViewColumn('USUARIO_ULTIMA_MOD', 'USUARIO ULTIMA MOD', $this->dataset);
$column->SetOrderable(true);
$grid->AddExportColumn($column);
}
public function GetPageDirection()
{
return null;
}
protected function ApplyCommonColumnEditProperties(CustomEditColumn $column)
{
$column->SetDisplaySetToNullCheckBox(false);
$column->SetDisplaySetToDefaultCheckBox(false);
$column->SetVariableContainer($this->GetColumnVariableContainer());
}
function GetCustomClientScript()
{
return ;
}
function GetOnPageLoadedClientScript()
{
return ;
}
public function ShowEditButtonHandler(&$show)
{
if ($this->GetRecordPermission() != null)
$show = $this->GetRecordPermission()->HasEditGrant($this->GetDataset());
}
public function ShowDeleteButtonHandler(&$show)
{
if ($this->GetRecordPermission() != null)
$show = $this->GetRecordPermission()->HasDeleteGrant($this->GetDataset());
}
public function GetModalGridDeleteHandler() { return 'GE_PERSONA_DISPONIBLEXINTERES_modal_delete'; }
protected function GetEnableModalGridDelete() { return true; }
protected function CreateGrid()
{
$result = new Grid($this, $this->dataset, 'GE_PERSONA_DISPONIBLEXINTERESGrid');
if ($this->GetSecurityInfo()->HasDeleteGrant())
$result->SetAllowDeleteSelected(true);
else
$result->SetAllowDeleteSelected(false);
ApplyCommonPageSettings($this, $result);
$result->SetUseImagesForActions(false);
$result->SetUseFixedHeader(false);
$result->SetShowLineNumbers(false);
$result->SetHighlightRowAtHover(false);
$result->SetWidth('');
$this->CreateGridSearchControl($result);
$this->CreateGridAdvancedSearchControl($result);
$this->AddOperationsColumns($result);
$this->AddFieldColumns($result);
$this->AddSingleRecordViewColumns($result);
$this->AddEditColumns($result);
$this->AddInsertColumns($result);
$this->AddPrintColumns($result);
$this->AddExportColumns($result);
$this->SetShowPageList(true);
$this->SetHidePageListByDefault(false);
$this->SetExportToExcelAvailable(false);
$this->SetExportToWordAvailable(false);
$this->SetExportToXmlAvailable(false);
$this->SetExportToCsvAvailable(false);
$this->SetExportToPdfAvailable(false);
$this->SetPrinterFriendlyAvailable(false);
$this->SetSimpleSearchAvailable(true);
$this->SetAdvancedSearchAvailable(false);
$this->SetFilterRowAvailable(false);
$this->SetVisualEffectsEnabled(false);
$this->SetShowTopPageNavigator(true);
$this->SetShowBottomPageNavigator(true);
//
// Http Handlers
//
return $result;
}
public function OpenAdvancedSearchByDefault()
{
return false;
}
protected function DoGetGridHeader()
{
return '';
}
}
try
{
$Page = new GE_PERSONA_DISPONIBLEXINTERESPage("GE.PERSONA_DISPONIBLEXINTERES.php", "GE_PERSONA_DISPONIBLEXINTERES", GetCurrentUserGrantForDataSource("GE.PERSONA_DISPONIBLEXINTERES"), 'UTF-8');
$Page->SetShortCaption('PERSONA DISPONIBLEXINTERES');
$Page->SetHeader(GetPagesHeader());
$Page->SetFooter(GetPagesFooter());
$Page->SetCaption('PERSONA DISPONIBLEXINTERES');
$Page->SetRecordPermission(GetCurrentUserRecordPermissionsForDataSource("GE.PERSONA_DISPONIBLEXINTERES"));
GetApplication()->SetEnableLessRunTimeCompile(GetEnableLessFilesRunTimeCompilation());
GetApplication()->SetCanUserChangeOwnPassword(
!function_exists('CanUserChangeOwnPassword') || CanUserChangeOwnPassword());
GetApplication()->SetMainPage($Page);
GetApplication()->Run();
}
catch(Exception $e)
{
ShowErrorPage($e->getMessage());
}