<?php use_helper('UrlFunctions'); ?>
<?php

if(isset($delete)){
  if($id){
    $o_DocenteBean = new DocenteBean();
    $o_DocenteBean->setDocenteId($id);
    
    $o_DocenteBean->setUsuarioRegistro(myUser::getUser()->getUserId());
    $o_DocenteSystemClass = new DocenteSystemClass($o_DocenteBean);
    $bResult = $o_DocenteSystemClass->eliminarDocente();
    
    if($bResult){
      ?>
      <script language="JavaScript">
      parent.objMainTab.reqBody('<?=buildUrl('doc/list')?>','001&delete=1&cod=<?=$o_DocenteBean->getCodigoDocente()?>');
      parent.objMainTab.windowsCloseAll();
      </script>
      <?
      
    }else{
       $url = buildUrl('doc/delete', "block=".$block."&error=1");
    }
  } 
}
