From 5c1132f6da292a689bc52bd7f20a83ff8d733fbd Mon Sep 17 00:00:00 2001 From: wei <> Date: Wed, 26 Jul 2006 01:44:57 +0000 Subject: Allow nested GroupBy result maps --- demos/time-tracker/protected/App_Code/UserReport.php | 6 +++--- demos/time-tracker/protected/App_Code/UserReportsDao.php | 5 +++-- demos/time-tracker/protected/application.xml | 3 ++- demos/time-tracker/protected/pages/TimeTracker/LogTimeEntry.php | 4 +++- demos/time-tracker/protected/pages/TimeTracker/ReportProject.page | 6 +++--- 5 files changed, 14 insertions(+), 10 deletions(-) (limited to 'demos') diff --git a/demos/time-tracker/protected/App_Code/UserReport.php b/demos/time-tracker/protected/App_Code/UserReport.php index e7529120..d37de934 100644 --- a/demos/time-tracker/protected/App_Code/UserReport.php +++ b/demos/time-tracker/protected/App_Code/UserReport.php @@ -2,9 +2,9 @@ class UserReport { - public $Username = ''; - public $CategoryID = 0; - public $ActualDuration = 0.0; + public $CategoryName = ''; + public $users = array(); + public $ProjectName = ''; } ?> \ No newline at end of file diff --git a/demos/time-tracker/protected/App_Code/UserReportsDao.php b/demos/time-tracker/protected/App_Code/UserReportsDao.php index 3cf943af..c6eab660 100644 --- a/demos/time-tracker/protected/App_Code/UserReportsDao.php +++ b/demos/time-tracker/protected/App_Code/UserReportsDao.php @@ -14,10 +14,11 @@ class UserReportsDao extends BaseDao return $sqlmap->queryForList('GetTimeReportByCategoryID', $categoryID); } - public function getTimeReportsByProjectID($projectID) + public function getTimeReportsByProjectIDs($projects) { + $ids = implode(',', array_map('intval', $projects)); $sqlmap = $this->getConnection(); - return $sqlmap->queryForList('GetTimeReportByProjectID', $projectID); + return $sqlmap->queryForList('GetTimeReportByProjectIDs', $ids); } } diff --git a/demos/time-tracker/protected/application.xml b/demos/time-tracker/protected/application.xml index 02be327b..97e26ae8 100644 --- a/demos/time-tracker/protected/application.xml +++ b/demos/time-tracker/protected/application.xml @@ -1,5 +1,5 @@ - + @@ -10,6 +10,7 @@ + diff --git a/demos/time-tracker/protected/pages/TimeTracker/LogTimeEntry.php b/demos/time-tracker/protected/pages/TimeTracker/LogTimeEntry.php index cc27c93c..a134289c 100644 --- a/demos/time-tracker/protected/pages/TimeTracker/LogTimeEntry.php +++ b/demos/time-tracker/protected/pages/TimeTracker/LogTimeEntry.php @@ -50,8 +50,10 @@ class LogTimeEntry extends TPage $this->projectMembers->DataSource = $users; $this->projectMembers->dataBind(); if(is_int($index = array_search($this->User->Name, $users))) + { $this->projectMembers->SelectedIndex = $index; - $this->showTimeSheet(); + $this->showTimeSheet(); + } } public function showTimeSheet() diff --git a/demos/time-tracker/protected/pages/TimeTracker/ReportProject.page b/demos/time-tracker/protected/pages/TimeTracker/ReportProject.page index 065b6b17..50345afa 100644 --- a/demos/time-tracker/protected/pages/TimeTracker/ReportProject.page +++ b/demos/time-tracker/protected/pages/TimeTracker/ReportProject.page @@ -5,10 +5,10 @@ Project Report - - - + + -- cgit v1.2.3