diff options
author | wei <> | 2006-07-26 01:44:57 +0000 |
---|---|---|
committer | wei <> | 2006-07-26 01:44:57 +0000 |
commit | 5c1132f6da292a689bc52bd7f20a83ff8d733fbd (patch) | |
tree | 3b61f33aff5aac63bc192564602c2ff482913cf5 /demos/time-tracker | |
parent | cbb7a11179b9c1c46e35f04d07d6386a44e400b2 (diff) |
Allow nested GroupBy result maps
Diffstat (limited to 'demos/time-tracker')
5 files changed, 14 insertions, 10 deletions
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 @@ <?xml version="1.0" encoding="utf-8"?>
-<application id="Database" Mode="Debug">
+<application id="Database" Mode="Performance">
<!-- configure to use Quickstart theme directory -->
<paths>
@@ -10,6 +10,7 @@ <using namespace="Application.App_Code.*" />
</paths>
<modules>
+ <module id="cache" class="System.Caching.TMemCache" />
<module id="sqlmap" class="TSQLMap"
configFile="Application.App_Data.mysql-sqlmap" />
<module id="daos" class="DaoManager" Connection="sqlmap">
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 @@ <legend>Project Report</legend>
<com:TMultiView ID="views" ActiveViewIndex="0">
<com:TView>
- <com:TLabel ForControl="projects"
+ <com:TLabel ForControl="projectList"
Text="Select a project. Use ctrl+click to select multiple resources at once: "/>
- <com:TListBox ID="projects" CssClass="projects" />
- <com:TButton Text="Generate Report" />
+ <com:TListBox ID="projectList" CssClass="projects" SelectionMode="Multiple" />
+ <com:TButton Text="Generate Report" OnClick="generateReport_Clicked"/>
</com:TView>
</com:TMultiView>
|