summaryrefslogtreecommitdiff
path: root/framework/Wsat/pages/TWsatGenerateAR.php
diff options
context:
space:
mode:
authorDaniel <darthdaniel85@gmail.com>2013-11-30 02:58:02 -0500
committerDaniel <darthdaniel85@gmail.com>2013-11-30 02:58:02 -0500
commit22276c273cc158cf12fd7b63e581b08cdae7b6f1 (patch)
tree560010fd44ef36d686a0d16313d983b1da6d9acc /framework/Wsat/pages/TWsatGenerateAR.php
parent96957c384a549a5cf7ad9c0e330307cc362a1c09 (diff)
Adding Many To Many relationships support!
Diffstat (limited to 'framework/Wsat/pages/TWsatGenerateAR.php')
-rw-r--r--framework/Wsat/pages/TWsatGenerateAR.php77
1 files changed, 37 insertions, 40 deletions
diff --git a/framework/Wsat/pages/TWsatGenerateAR.php b/framework/Wsat/pages/TWsatGenerateAR.php
index 14e14983..c9584038 100644
--- a/framework/Wsat/pages/TWsatGenerateAR.php
+++ b/framework/Wsat/pages/TWsatGenerateAR.php
@@ -14,49 +14,46 @@ Prado::using("System.Wsat.TWsatARGenerator");
class TWsatGenerateAR extends TPage
{
- public function generate($sender)
- {
- if ($this->IsValid)
+ public function generate($sender)
{
- $table_name = $this->table_name->Text;
- $output_folder_ns = $this->output_folder->Text;
- $class_prefix = $this->class_prefix->Text;
- $class_sufix = $this->class_sufix->Text;
-
- try
- {
- $ar_generator = new TWsatARGenerator();
- $ar_generator->setOpFile($output_folder_ns);
- $ar_generator->setClasPrefix($class_prefix);
- $ar_generator->setClassSufix($class_sufix);
-
- if ($this->build_rel->Checked)
+ if ($this->IsValid)
{
- $ar_generator->buildRelations();
- }
- if ($table_name != "*")
- {
- $ar_generator->generate($table_name);
- } else
- {
- $ar_generator->generateAll();
+ $table_name = $this->table_name->Text;
+ $output_folder_ns = $this->output_folder->Text;
+ $class_prefix = $this->class_prefix->Text;
+ $class_sufix = $this->class_sufix->Text;
+
+ try
+ {
+ $ar_generator = new TWsatARGenerator();
+ $ar_generator->setOpFile($output_folder_ns);
+ $ar_generator->setClasPrefix($class_prefix);
+ $ar_generator->setClassSufix($class_sufix);
+
+ if ($this->build_rel->Checked)
+ $ar_generator->buildRelations();
+
+ if ($table_name != "*")
+ $ar_generator->generate($table_name);
+ else
+ $ar_generator->generateAll();
+
+ $this->feedback_panel->CssClass = "green_panel";
+ $this->generation_msg->Text = "The code has been generated successfully.";
+ } catch (Exception $ex)
+ {
+ $this->feedback_panel->CssClass = "red_panel";
+ $this->generation_msg->Text = $ex->getMessage();
+ }
+ $this->feedback_panel->Visible = true;
}
- $this->feedback_panel->CssClass = "green_panel";
- $this->generation_msg->Text = "The code has been generated successfully.";
- } catch (Exception $ex)
- {
- $this->feedback_panel->CssClass = "red_panel";
- $this->generation_msg->Text = $ex->getMessage();
- }
- $this->feedback_panel->Visible = true;
}
- }
-
- public function preview($sender)
- {
-// $ar_generator = new TWsatARGenerator();
-// $ar_generator->renderAllTablesInformation();
- throw new THttpException(500, "Not implemented yet.");
- }
+
+ public function preview($sender)
+ {
+// $ar_generator = new TWsatARGenerator();
+// $ar_generator->renderAllTablesInformation();
+ throw new THttpException(500, "Not implemented yet.");
+ }
} \ No newline at end of file