<?php
/* Mantenimiento de los registros de la tabla SEG_TareaRol redefinidos por el usaurio */
class SEG_TareaRolDP extends BaseSEG_TareaRolDP
{
    public static function deletePorRol( $s_Rol )
    {
        $s_SQLQuery = "DELETE FROM SEG_TareaRol WHERE  IdRol = '$s_Rol';";
        Conexion::getConexion()->createStatement()->executeQuery( $s_SQLQuery );
        return true;
    }
    
    /* Graba un nuevo registro */
    /*public function save()
    {
        $o_tareaRolFN = new TareaRolFN();

        $s_SQLQuery1 = "REPLACE INTO SEG_TareaRol ( ";
        $s_SQLQuery2 = "VALUES ( ";
        $s_Separator = "";
        if ( !is_null( $this->getRolId() ) )
        {
            $s_SQLQuery1 .= $s_Separator."IdRol";
            $s_SQLQuery2 .= $s_Separator."'".$this->getRolId()."'";
            $s_Separator = ", ";
        }
        if ( !is_null( $this->getIdTarea() ) )
        {
            $s_SQLQuery1 .= $s_Separator."IdTarea";
            $s_SQLQuery2 .= $s_Separator."'".$this->getIdTarea()."'";
            $s_Separator = ", ";
        }
        if ( !is_null( $this->getSysInsAt() ) )
        {
            $s_SQLQuery1 .= $s_Separator."FechaCreacion";
            $s_SQLQuery2 .= $s_Separator."'".$this->getSysInsAt()."'";
            $s_Separator = ", ";
        }
        if ( !is_null( $this->getSysInsUsr() ) )
        {
            $s_SQLQuery1 .= $s_Separator."UsuarioCreacion";
            $s_SQLQuery2 .= $s_Separator."'".$this->getSysInsUsr()."'";
            $s_Separator = ", ";
        }
        if ( !is_null( $this->getSysLstUpdAt() ) )
        {
            $s_SQLQuery1 .= $s_Separator."FechaModificacion";
            $s_SQLQuery2 .= $s_Separator."'".$this->getSysLstUpdAt()."'";
            $s_Separator = ", ";
        }
        if ( !is_null( $this->getSysLstUpdUsr() ) )
        {
            $s_SQLQuery1 .= $s_Separator."UsuarioModificacion";
            $s_SQLQuery2 .= $s_Separator."'".$this->getSysLstUpdUsr()."'";
            $s_Separator = ", ";
        }
        $s_SQLQuery = $s_SQLQuery1." ) ".$s_SQLQuery2." );";
        $o_Resource = $o_tareaRolFN->getConnect();
        mysql_query( "SET NAMES 'utf8'", $o_Resource );
        $o_Result = mysql_query( $s_SQLQuery, $o_Resource );
        if ( $o_Result === false )
        {
            throw new Exception( mysql_error() );
        }

        return true;
    }*/
}
?>