From 2570226fbac3e26b1e94896b50d1db4bc1aa3308 Mon Sep 17 00:00:00 2001
From: wei <>
Date: Sun, 17 Dec 2006 22:20:50 +0000
Subject: Add TDataSourceConfig, TSqlMapConfig, TActiveRecordConfig
---
demos/sqlmap/protected/pages/Sample/Home.page | 7 +++----
demos/sqlmap/protected/pages/Sample/ProductList.page | 9 ---------
demos/sqlmap/protected/pages/Sample/ProductList.php | 18 ------------------
demos/sqlmap/protected/pages/Sample/crud1.php | 6 +++---
demos/sqlmap/protected/pages/Sample/crud2.php | 9 ++++-----
5 files changed, 10 insertions(+), 39 deletions(-)
delete mode 100644 demos/sqlmap/protected/pages/Sample/ProductList.page
delete mode 100644 demos/sqlmap/protected/pages/Sample/ProductList.php
(limited to 'demos/sqlmap/protected/pages/Sample')
diff --git a/demos/sqlmap/protected/pages/Sample/Home.page b/demos/sqlmap/protected/pages/Sample/Home.page
index 6d059c7e..37e59b42 100644
--- a/demos/sqlmap/protected/pages/Sample/Home.page
+++ b/demos/sqlmap/protected/pages/Sample/Home.page
@@ -1,5 +1,4 @@
\ No newline at end of file
+ Tutorial 1
+ Tutorial 2
+
\ No newline at end of file
diff --git a/demos/sqlmap/protected/pages/Sample/ProductList.page b/demos/sqlmap/protected/pages/Sample/ProductList.page
deleted file mode 100644
index 904d411d..00000000
--- a/demos/sqlmap/protected/pages/Sample/ProductList.page
+++ /dev/null
@@ -1,9 +0,0 @@
-Database Examples
-
-
-
- Code: <%# $this->DataItem['productid'] %>
- Category: <%# $this->DataItem['category'] %>
-
-
-
\ No newline at end of file
diff --git a/demos/sqlmap/protected/pages/Sample/ProductList.php b/demos/sqlmap/protected/pages/Sample/ProductList.php
deleted file mode 100644
index a35c40ea..00000000
--- a/demos/sqlmap/protected/pages/Sample/ProductList.php
+++ /dev/null
@@ -1,18 +0,0 @@
-IsPostBack)
- {
- $sqlmap = $this->Application->Modules['petshop-sqlmap'];
- $products = $sqlmap->queryForList('SelectAllProducts');
- $this->productList->setDataSource($products);
- $this->productList->dataBind();
- }
- }
-}
-
-?>
\ No newline at end of file
diff --git a/demos/sqlmap/protected/pages/Sample/crud1.php b/demos/sqlmap/protected/pages/Sample/crud1.php
index 40733dc9..9ea6e05e 100644
--- a/demos/sqlmap/protected/pages/Sample/crud1.php
+++ b/demos/sqlmap/protected/pages/Sample/crud1.php
@@ -6,13 +6,13 @@ class crud1 extends TPage
{
private function loadData()
{
- $sqlmap = $this->Application->Modules['person-sample'];
+ $sqlmap = $this->Application->Modules['person-sample']->Client;
$this->personList->DataSource = $sqlmap->queryForList('SelectAll');
- $this->personList->dataBind();
+ $this->personList->dataBind();
}
public function onLoad($param)
- {
+ {
if(!$this->IsPostBack)
$this->loadData();
}
diff --git a/demos/sqlmap/protected/pages/Sample/crud2.php b/demos/sqlmap/protected/pages/Sample/crud2.php
index 46fe3893..3d2087bb 100644
--- a/demos/sqlmap/protected/pages/Sample/crud2.php
+++ b/demos/sqlmap/protected/pages/Sample/crud2.php
@@ -6,18 +6,17 @@ class crud2 extends TPage
{
private function sqlmap()
{
- return $this->Application->Modules['person-sample'];
+ return $this->Application->Modules['person-sample']->Client;
}
private function loadData()
{
- $this->personList->DataSource =
- $this->sqlmap()->queryForList('SelectAll');
+ $this->personList->DataSource = $this->sqlmap()->queryForList('SelectAll');
$this->personList->dataBind();
}
public function onLoad($param)
- {
+ {
if(!$this->IsPostBack)
$this->loadData();
}
@@ -44,7 +43,7 @@ class crud2 extends TPage
$person->HeightInMeters = $this->getText($param, 2);
$person->WeightInKilograms = $this->getText($param, 3);
$person->ID = $this->getKey($sender, $param);
-
+
$this->sqlmap()->update("Update", $person);
$this->refreshList($sender, $param);
}
--
cgit v1.2.3