summaryrefslogtreecommitdiff
path: root/demos/time-tracker/protected/App_Code/Dao/TimeEntryDao.php
diff options
context:
space:
mode:
authorwei <>2006-12-17 22:20:50 +0000
committerwei <>2006-12-17 22:20:50 +0000
commit2570226fbac3e26b1e94896b50d1db4bc1aa3308 (patch)
tree421108ccbdc0ef021e6af4fa35b1d6bcbc352b37 /demos/time-tracker/protected/App_Code/Dao/TimeEntryDao.php
parentddc0de38f64e5834ce04f0407a8416172b596655 (diff)
Add TDataSourceConfig, TSqlMapConfig, TActiveRecordConfig
Diffstat (limited to 'demos/time-tracker/protected/App_Code/Dao/TimeEntryDao.php')
-rw-r--r--demos/time-tracker/protected/App_Code/Dao/TimeEntryDao.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/demos/time-tracker/protected/App_Code/Dao/TimeEntryDao.php b/demos/time-tracker/protected/App_Code/Dao/TimeEntryDao.php
index 7207ed47..4bd74eb5 100644
--- a/demos/time-tracker/protected/App_Code/Dao/TimeEntryDao.php
+++ b/demos/time-tracker/protected/App_Code/Dao/TimeEntryDao.php
@@ -4,33 +4,33 @@ class TimeEntryDao extends BaseDao
{
public function addNewTimeEntry($entry)
{
- $sqlmap = $this->getConnection();
- $sqlmap->insert('AddNewTimeEntry', $entry);
+ $sqlmap = $this->getSqlMap();
+ $sqlmap->insert('AddNewTimeEntry', $entry);
}
-
+
public function getTimeEntryByID($entryID)
{
- $sqlmap = $this->getConnection();
- return $sqlmap->queryForObject('GetTimeEntryByID', $entryID);
+ $sqlmap = $this->getSqlMap();
+ return $sqlmap->queryForObject('GetTimeEntryByID', $entryID);
}
-
+
public function deleteTimeEntry($entryID)
{
- $sqlmap = $this->getConnection();
+ $sqlmap = $this->getSqlMap();
$sqlmap->delete('DeleteTimeEntry', $entryID);
}
-
+
public function getTimeEntriesInProject($username, $projectID)
{
- $sqlmap = $this->getConnection();
+ $sqlmap = $this->getSqlMap();
$param['username'] = $username;
$param['project'] = $projectID;
return $sqlmap->queryForList('GetAllTimeEntriesByProjectIdAndUser', $param);
}
-
+
public function updateTimeEntry($entry)
{
- $sqlmap = $this->getConnection();
+ $sqlmap = $this->getSqlMap();
$sqlmap->update('UpdateTimeEntry', $entry);
}
}