Пример #1
0
 public function actionCreate()
 {
     $model = new Dolzh();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
     } else {
         return $this->render('create', ['model' => $model]);
     }
 }
Пример #2
0
 /**
  * @depends openCreateEmployee
  */
 public function loadData()
 {
     $dolzh = new Dolzh();
     $dolzh->dolzh_name = 'Кардиолог';
     $dolzh->save();
     $dolzh = new Dolzh();
     $dolzh->dolzh_name = 'Медсестра';
     $dolzh->save();
     $dolzh = new Dolzh();
     $dolzh->dolzh_name = 'Невролог';
     $dolzh->save();
     $podraz = new Podraz();
     $podraz->podraz_name = 'Терапевтическое';
     $podraz->save();
     $podraz = new Podraz();
     $podraz->podraz_name = 'Общеполиклиническое';
     $podraz->save();
     $build = new Build();
     $build->build_name = 'Поликлиника 1';
     $build->save();
     $build = new Build();
     $build->build_name = 'Поликлиника 2';
     $build->save();
     $build = new Build();
     $build->build_name = 'Поликлиника 3';
     $build->save();
 }