public function loadModel($id)
 {
     $model = FcrtCurrencyRate::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, Yii::t('FcrnModule.crud_static', 'The requested page does not exist.'));
     }
     return $model;
 }
 public function loadModel($id)
 {
     $m = FcrtCurrencyRate::model();
     // apply scope, if available
     $scopes = $m->scopes();
     if (isset($scopes[$this->scope])) {
         $m->{$this->scope}();
     }
     $model = $m->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, Yii::t('FcrnModule.crud_static', 'The requested page does not exist.'));
     }
     return $model;
 }