/** * Displays a particular model. * @param integer $id the ID of the model to be displayed */ public function actionInfoDialog($id_dogovor) { $model = $this->loadModel($id_dogovor); // $contragent=Contragent::model()->findByPk($model->id_contragent); $contragent = Ispolnitel::model()->getDogovora(1); $this->renderPartial('dialog_view', array('dogovor_model' => $model, 'contragent_model' => $contragent), false, true); /* $this->renderPartial('dialog_view',array( 'model'=>$this->loadModel($id_dogovor), ), false, true); */ }
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * @param integer $id the ID of the model to be loaded * @return Ispolnitel the loaded model * @throws CHttpException */ public function loadModel($id) { $model = Ispolnitel::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }