Skip to content

Commit

Permalink
🔨 #32 mudança
Browse files Browse the repository at this point in the history
  • Loading branch information
bjverde committed Sep 12, 2020
1 parent 906a368 commit 935109e
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions app/control/forms/Gen02.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,28 @@ public function __construct()
$html->add('<br>');
$html->add(Message::SEL_TABLES_GENERATE);
$frm->closeGroup();


$listTablesAll = TGeneratorHelper::loadTablesFromDatabase();
$listTablesAll = ArrayHelper::convertArrayFormDin2Adianti($listTablesAll);
FormDinHelper::debug($listTablesAll);
$checkList = new TFormDinCheckList('gd','Lista de Tabelas',false,$listTablesAll,null);
$checkList->addColumnHidden('idSelected','TABLE_SCHEMA','left','20%');
$checkList->addColumn('TABLE_SCHEMA','TABLE_SCHEMA','left','20%');
$checkList->addColumn('TABLE_NAME','TABLE_NAME','left','60%');
$checkList->addColumn('COLUMN_QTD','COLUMN_QTD','center','10%');
$checkList->addColumn('TABLE_TYPE','TABLE_TYPE','left','10%');

$frm->addCheckList($checkList,false);


$frm->setActionLink(Message::BUTTON_LABEL_BACK,'back',false,'fa:chevron-circle-left','green');
$frm->setActionLink(_t('Clear'),'clear',false,'fa:eraser','red');
$frm->setAction(Message::BUTTON_LABEL_GEN_STRUCTURE,'next',false,'fa:chevron-circle-right','green');

$this->form = $frm->show();

/*
$grid = new TFormDinGrid($this
,'gd' // id do gride
,'Lista de Tabelas' // titulo do gride
Expand All @@ -65,6 +80,7 @@ public function __construct()
$this->datagrid = $grid->show();
$panelGrid = $grid->getPanelGroupGrid();
$this->form->addContent([$panelGrid]);
*/

// wrap the page content using vertical box
$vbox = new TVBox;
Expand Down Expand Up @@ -98,8 +114,10 @@ public function next($param)
{
try {
$data = $this->form->getData(); // optional parameter: active record class
$this->form->setData($data); // put the data back to the form


FormDinHelper::debug($param,'$param');
FormDinHelper::debug($data,'$data');
/*
$listTableSelected = null;
foreach( $param as $key => $valey ) {
if(strpos($key, 'idTableSelected') !== false){
Expand All @@ -112,6 +130,8 @@ public function next($param)
TSysgenSession::setValue('idTableSelected',$listTableSelected);
AdiantiCoreApplication::loadPage('Gen03'); //POG para recarregar a pagina
}
*/
//$this->form->setData($data); // put the data back to the form
} catch (Exception $e) {
new TMessage('error', $e->getMessage());
}
Expand All @@ -120,7 +140,6 @@ public function next($param)

/**
* Load the data into the datagrid
*/
function onReload()
{
$this->datagrid->clear();
Expand All @@ -142,6 +161,7 @@ function onReload()
}
}
*/

/**
* shows the page
Expand Down

0 comments on commit 935109e

Please sign in to comment.