public function showForm($id = -1)
 {
     $this->prepareForm($id, array('method' => 'post', 'action' => ''));
     echo "<div class='ls-tab-content ls-active' id='infos'>";
     echo '<table class="easy-form-table">';
     echo '<tr>';
     echo '<td>';
     SystemHelper::addTextfield(array('label' => 'Nome', 'name' => 'nome_relatorio', 'value' => $this->fields['nome_relatorio']));
     echo '</td>';
     echo '<td>';
     SystemHelper::addCombobox(array('label' => 'Ícone', 'name' => 'icone', 'value' => $this->fields['icone']));
     echo '</td>';
     echo '</tr>';
     echo '</table>';
     SystemHelper::addSQLTextBox(array('label' => 'Sentença SQL', 'name' => 'sentenca_sql', 'value' => $this->fields['sentenca_sql']));
     echo "</div>";
     echo "<div class='ls-tab-content' id='parameters'>";
     include "ParamTableComponent.php";
     $this->params_table = new ParamTableComponent();
     $this->params_table->show();
     echo "</div>";
     echo "<div class='ls-tab-content' id='headers'>";
     include "HeaderTableComponent.php";
     $this->headers_table = new HeaderTableComponent();
     $this->headers_table->show();
     echo "</div>";
     $this->addButtons();
 }
 public function showForm($id = -1)
 {
     $this->prepareForm($id, array('method' => 'post', 'action' => $id > 0 ? "grafico/atualizar/" . $id : "grafico/adicionar"));
     echo "<div class='ls-tab-content ls-active' id='infos'>";
     echo '<table class="easy-form-table">';
     echo '<tr>';
     echo '<td>';
     SystemHelper::addTextfield(array('label' => 'Nome', 'name' => 'nome_grafico', 'value' => $this->fields['nome_grafico']));
     echo '</td>';
     echo '<td>';
     SystemHelper::addCombobox(array('label' => 'Ícone', 'name' => 'icone', 'value' => $this->fields['icone']));
     echo '</td>';
     echo '</tr>';
     echo '</table>';
     SystemHelper::addSQLTextBox(array('label' => 'Sentença SQL', 'name' => 'sentenca_sql', 'value' => $this->fields['sentenca_sql']));
     echo "</div>";
     echo "<div class='ls-tab-content' id='parameters'>";
     include "ParamTableComponent.php";
     $this->params_table = new ParamTableComponent();
     $this->params_table->show(array("cadastro_tipo" => $this->getType(), "conexao_id" => $this->objectID));
     echo "</div>";
     $this->addButtons();
 }