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