Esempio n. 1
0
 public function run()
 {
     $id = Yii::app()->request->getParam('id');
     $proxy = new BOrder();
     $result = $proxy->deleteOrder($id);
     echo CJSON::encode($result);
 }
Esempio n. 2
0
 public function run()
 {
     $id = Yii::app()->request->getParam('id');
     $proxy = new BOrder();
     $result = $proxy->getOrderInfo($id);
     if ($result['code'] == 200) {
         $this->controller->renderPartial('view', array('id' => $id, 'data' => $result['data']));
     } else {
         throw new CHttpException($result['code'], $result['message']);
     }
 }
Esempio n. 3
0
 public function run()
 {
     $start = Yii::app()->request->getParam('start');
     $proxy = new BOrder();
     $result = $proxy->getOrderList($start, 10);
     $count = $result['count'];
     if (Yii::app()->request->isAjaxRequest) {
         $data = array('recordsTotal' => $count, 'recordsFiltered' => $count, 'data' => $result['data']);
         echo CJSON::encode($data);
     } else {
         $this->controller->render('list', array('count' => $count));
     }
 }