Пример #1
0
 public static function PopulateStatusViewModel($orderId)
 {
     $model = new StatusEditOrderViewModel();
     $model->orderId = $orderId;
     $statuss = StatusService::GetAll();
     for ($i = 0; $i < count($statuss); $i++) {
         $model->names[$i] = $statuss[$i]->name;
     }
     return $model;
 }
Пример #2
0
 public function action_NewStatus()
 {
     PermissionHelper::Verification('Editor');
     $name = $_POST['InputStatus'];
     $order_id = $_POST['id'];
     $order = OrderService::GetById($order_id);
     $oldStatus = $order->statusorder_id;
     $order->statusorder_id = StatusService::GetByName($name)->statusorder_id;
     OrderService::Save($order);
     header("Location: /Order/Item?id=" . $oldStatus);
 }