From ab6effd64caefa732ef0994d6c3048f5cd474bf6 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 22 Nov 2013 15:25:30 -0500 Subject: WSAT beta release. --- framework/Wsat/pages/TWsatGenerateAR.page | 20 ++++++-- framework/Wsat/pages/TWsatGenerateAR.php | 80 ++++++++++++++++++------------- framework/Wsat/pages/TWsatLogin.page | 7 +-- framework/Wsat/pages/TWsatLogin.php | 59 ++++++++++++----------- 4 files changed, 97 insertions(+), 69 deletions(-) (limited to 'framework/Wsat/pages') diff --git a/framework/Wsat/pages/TWsatGenerateAR.page b/framework/Wsat/pages/TWsatGenerateAR.page index 3905d023..acd456fd 100644 --- a/framework/Wsat/pages/TWsatGenerateAR.page +++ b/framework/Wsat/pages/TWsatGenerateAR.page @@ -1,21 +1,31 @@ -
+
- + +
- +
- +
+ +
+ + +
+ + + +
- +
diff --git a/framework/Wsat/pages/TWsatGenerateAR.php b/framework/Wsat/pages/TWsatGenerateAR.php index 754cac5c..3d4291e2 100644 --- a/framework/Wsat/pages/TWsatGenerateAR.php +++ b/framework/Wsat/pages/TWsatGenerateAR.php @@ -1,33 +1,49 @@ -table_name->Text; - - $ar_generator = new TWsatARGenerator(); - if ($table_name != "*") { - $ar_generator->generate($table_name); - } else { - $ar_generator->generateAll(); - } - } - - public function preview($sender) { - - } - -} - +IsValid) { + $table_name = $this->table_name->Text; + $class_prefix = $this->class_prefix->Text; + $output_folder_ns = $this->output_folder->Text; + + try { + $ar_generator = new TWsatARGenerator(); + $ar_generator->setOpFile($output_folder_ns); + $ar_generator->setClasPrefix($class_prefix); + + if ($this->build_rel->Checked) { + $ar_generator->buildRelations(); + } + if ($table_name != "*") { + $ar_generator->generate($table_name); + } else { + $ar_generator->generateAll(); + } + $this->success_panel->CssClass = "success_panel"; + $this->generation_msg->Text = "The code has been generated successfully."; + } catch (Exception $ex) { + $this->success_panel->CssClass = "exception_panel"; + $this->generation_msg->Text = $ex->getMessage(); + } + $this->success_panel->Visible = true; + } + } + + public function preview($sender) { +// $ar_generator = new TWsatARGenerator(); +// $ar_generator->renderAllTablesInformation(); + throw new THttpException(500, "Not implemented yet."); + } + +} + ?> \ No newline at end of file diff --git a/framework/Wsat/pages/TWsatLogin.page b/framework/Wsat/pages/TWsatLogin.page index b256d719..d0a94f2a 100644 --- a/framework/Wsat/pages/TWsatLogin.page +++ b/framework/Wsat/pages/TWsatLogin.page @@ -29,9 +29,10 @@