Ejemplo n.º 1
0
 public function actionEdit()
 {
     $code = Yii::app()->request->getParam("code", '');
     $op = Yii::app()->request->getParam("op", '');
     if (!$code) {
         // ID不存在
         exit;
     }
     $type = Yii::app()->params['configType']['HOSPITAL'];
     $configModel = new ConfigModel();
     $hospital = $configModel->getModel($type, $code);
     $hospitals = $configModel->getSetByType($type);
     if ($hospitals) {
         unset($hospitals[$code]);
     }
     //分享信息
     $shareModel = new ShareModel();
     $shares = $shareModel->getSetByCode($code);
     $this->setPageTitle($op == 'edit' ? '编辑医院' : '查看医院');
     $this->render('edit', array('hospital' => $hospital, 'hospitals' => $hospitals, 'shares' => $shares, 'op' => $op));
 }