public function afterDelete($event)
 {
     $log = new zArLog();
     $log->description = 'User ' . Yii::app()->user->Name . ' deleted ' . get_class($this->Owner) . '[' . $this->Owner->getPrimaryKey() . '].';
     $log->action = 'DELETE';
     $log->model = get_class($this->Owner);
     $log->idModel = $this->Owner->getPrimaryKey();
     $log->field = '';
     $log->creationdate = new CDbExpression('NOW()');
     $log->userid = Yii::app()->user->id;
     $log->save();
 }
 protected function afterDelete()
 {
     $log = new zArLog();
     $log->description = 'User ' . Yii::app()->user->Name . ' deleted ' . get_class($this->Owner) . '[' . $this->system_ref . '].';
     $log->action = 'DELETE';
     $log->model = get_class($this->Owner);
     $log->idModel = $this->Owner->getPrimaryKey();
     $log->field = '';
     $log->creationdate = new CDbExpression('NOW()');
     $log->userid = Yii::app()->user->id;
     $log->save();
     uJournalDetail::model()->deleteAll('parent_id = ' . $this->id);
     return true;
 }