<?php

class KemlerController extends Controller
{

  public function actionCreate()
  {
    $adrCodes = AdrCode::model()->selectCode()->findAll();
    $onuCodes = OnuCode::model()->selectCode()->findAll();
    $this->renderPartial(
      '_create',
      array(
        'adrCodes' => $adrCodes,
        'onuCodes' => $onuCodes
      )
    );
  }

  public function actionAdrDescription($code)
  {
    $adrCode = AdrCode::model()->byCode($code)->find();
    echo $adrCode->description;
    Yii::app()->end();
  }

  public function actionOnuDescription($code)
  {
    $onuCode = OnuCode::model()->byCode($code)->find();
    echo $onuCode->description;
    Yii::app()->end();
  }


}
