Пример #1
0
 public function przetargi_biezaceAction()
 {
     $this->setTitle('Bieżące postępowania przetargowe');
     $this->setUrl('przetargi_biezace.html');
     $this->setTemplate('auction/list.html');
     $auctionService = new Wsm_Db_Auction();
     $list = $auctionService->getCurrent();
     $this->addToView('auctionList', $list);
 }
Пример #2
0
 public function saveAction()
 {
     $auction = new Wsm_Auction();
     if ($this->has('id')) {
         $auction->setId($this->get('id'));
     }
     $auction->setTitle($this->get('title'));
     $auction->setContent($this->get('content'));
     $auction->setSignature($this->get('signature'));
     $auction->setDate($this->get('date'));
     $auction->setDateExpiry($this->get('dateExpiry'));
     $auctionService = new Wsm_Db_Auction();
     try {
         $auctionService->save($auction);
         $this->redirect('auctions/index?msg=saved');
     } catch (Exception $e) {
         $this->redirect('auctions/index?msg=save_error');
     }
 }