public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanBRS(CRequest::getInt("id"));
     $plan = $object->plan_id;
     $object->remove();
     $this->redirect("workplanbrs.php?action=index&plan_id=" . $plan);
 }
 public function actionDelete()
 {
     $object = CBaseManager::getWorkPlanBRS(CRequest::getInt("id"));
     $plan = $object->plan;
     $object->remove();
     $order = 1;
     foreach ($plan->BRS as $brs) {
         $brs->ordering = $order++;
         $brs->save();
     }
     $this->redirect("workplanbrs.php?action=index&plan_id=" . $plan->getId());
 }