- Usuario -> orden por defecto en el grid.
git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_IntranetNueva/trunk@19 77cfc57b-8ef4-1849-9df6-4a38aa5da120
This commit is contained in:
parent
6472a667f3
commit
5227fb64a3
@ -86,21 +86,22 @@ class Usuario extends CActiveRecord
|
|||||||
*/
|
*/
|
||||||
public function search()
|
public function search()
|
||||||
{
|
{
|
||||||
// Warning: Please modify the following code to remove attributes that
|
// Warning: Please modify the following code to remove attributes that
|
||||||
// should not be searched.
|
// should not be searched.
|
||||||
|
|
||||||
$criteria=new CDbCriteria;
|
$criteria=new CDbCriteria;
|
||||||
|
$criteria->compare('email',$this->email,true);
|
||||||
|
$criteria->compare('name',$this->name,true);
|
||||||
|
$criteria->compare('username',$this->username,true);
|
||||||
|
$criteria->compare('last_login_time',$this->last_login_time,true);
|
||||||
|
|
||||||
$criteria->compare('id',$this->id);
|
$sort = new CSort;
|
||||||
$criteria->compare('email',$this->email,true);
|
$sort->defaultOrder = 'name ASC';
|
||||||
$criteria->compare('name',$this->name,true);
|
|
||||||
$criteria->compare('username',$this->username,true);
|
|
||||||
$criteria->compare('password',$this->password,true);
|
|
||||||
$criteria->compare('last_login_time',$this->last_login_time,true);
|
|
||||||
|
|
||||||
return new CActiveDataProvider($this, array(
|
return new CActiveDataProvider($this, array(
|
||||||
'criteria'=>$criteria,
|
'criteria' => $criteria,
|
||||||
));
|
'sort' => $sort,
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function afterValidate() {
|
protected function afterValidate() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user