* show doing project only in index page.

This commit is contained in:
wangchunsheng
2009-11-05 07:14:19 +00:00
parent afd261932e
commit 5bf7ad754b
2 changed files with 5 additions and 3 deletions

View File

@@ -91,9 +91,11 @@ class projectModel extends model
}
/* 获得完整的列表。*/
public function getList()
public function getList($status = 'all')
{
return $this->dao->select('*')->from(TABLE_PROJECT)->where('iscat')->eq(0)->andwhere('company')->eq($this->app->company->id)->orderBy('status, end|desc')->fetchAll();
$sql = $this->dao->select('*')->from(TABLE_PROJECT)->where('iscat')->eq(0)->andwhere('company')->eq($this->app->company->id);
if($status != 'all') $sql->andWhere('status')->in($status);
return $sql->orderBy('status, end|desc')->fetchAll();
}
/* 通过Id获取项目信息。*/