Пример #1
0
 /**
  * Приказы для ГАК
  *
  * @return array
  */
 public static function getUsatuSEBOrdersList()
 {
     $result = array();
     foreach (CActiveRecordProvider::getWithCondition(TABLE_USATU_ORDERS, "order_for_seb = 1")->getItems() as $ar) {
         $order = new COrderUsatu($ar);
         $result[$order->getId()] = $order->getName();
     }
     return $result;
 }
 public function actionSave()
 {
     $order = new COrderUsatu();
     $order->setAttributes(CRequest::getArray($order::getClassName()));
     if ($order->validate()) {
         $order->save();
         if ($this->continueEdit()) {
             $this->redirect("?action=edit&id=" . $order->getId());
         } else {
             $this->redirect("?action=index");
         }
         return true;
     }
     $this->addJSInclude(JQUERY_UI_JS_PATH);
     $this->addCSSInclude(JQUERY_UI_CSS_PATH);
     $this->setData("order", $order);
     $this->renderView("_orders_usatu/add.tpl");
 }