Пример #1
0
 public function saveTarieven($post, $user_id)
 {
     $tarievenDag = new UserTarievenDag();
     $tarievenNacht = new UserTarievenNacht();
     $tarievenWeekend = new UserTarievenWeekend();
     $tariefReizen = new UserReistarief();
     $tarievenDag->load($post);
     $tarievenDag->user_id = $user_id;
     $tarievenDag->naam = 'Dagdienst';
     $tarievenDag->omschrijving = 'Dagdienst';
     $tarievenDag->save(false);
     $tarievenNacht->load($post);
     $tarievenNacht->user_id = $user_id;
     $tarievenNacht->naam = 'Nachtdienst';
     $tarievenNacht->omschrijving = 'Nachtdienst';
     $tarievenNacht->save(false);
     $tarievenWeekend->load($post);
     $tarievenWeekend->user_id = $user_id;
     $tarievenWeekend->naam = 'Weekenddienst';
     $tarievenWeekend->omschrijving = 'Weekenddienst';
     $tarievenWeekend->save(false);
     $tariefReizen->load($post);
     $tariefReizen->user_id = $user_id;
     $tariefReizen->save(false);
     return;
 }
Пример #2
0
 public function saveTarieven($post, $user_id)
 {
     //$tarievenDag        = UserTarievenDag::findOne(['user_id'=>$user->id,'naam'=>'Dagdienst']);
     //$tarievenNacht      = UserTarievenNacht::findOne(['user_id'=>$user->id,'naam'=>'Nachtdienst']);
     //$tarievenWeekend    = UserTarievenWeekend::findOne(['user_id'=>$user->id,'naam'=>'Weekenddienst']);
     //$tariefReizen       = UserReistarief::findOne(['user_id'=>$user->id,]);
     $tarievenDag = new UserTarievenDag();
     $tarievenNacht = new UserTarievenNacht();
     $tarievenWeekend = new UserTarievenWeekend();
     $tariefReizen = new UserReistarief();
     $tarievenDag->load($post);
     $tarievenDag->user_id = $user_id;
     $tarievenDag->naam = 'Dagdienst';
     $tarievenDag->omschrijving = 'Dagdienst';
     $tarievenDag->save(false);
     $tarievenNacht->load($post);
     $tarievenNacht->user_id = $user_id;
     $tarievenNacht->naam = 'Nachtdienst';
     $tarievenNacht->omschrijving = 'Nachtdienst';
     $tarievenNacht->save(false);
     $tarievenWeekend->load($post);
     $tarievenWeekend->user_id = $user_id;
     $tarievenWeekend->naam = 'Weekenddienst';
     $tarievenWeekend->omschrijving = 'Weekenddienst';
     $tarievenWeekend->save(false);
     return;
 }