<%@ LANGUAGE = JavaScript %>
<% /*
    $Revision$
    $Id$

    File:           job_delete.asp
    Status:         100%
    Description:    Verwijderen van een (1) fac_activiteit

    Parameters:
    Context:        Vanuit show-schermen en of vanuit overzichten
    Result:         JSON object
    Note:

*/
var JSON_Result = true;
%>
<!--#include file="../Shared/common.inc"-->
<!--#include file="../Shared/json2.js" -->
<%
protectRequest.validateToken();

    var autfunction = "WEB_MLDFOF";
    var authparams = user.checkAutorisation(autfunction);

    var  key = getFParamInt('key');

    // We hebben er nu cascades op staan, en de historie is minder dan irrelevant.
    sql = "DELETE FROM fac_activiteit WHERE fac_activiteit_key = "+key;

    result = { success: true, deleted: true };
    var err = Oracle.Execute(sql, true);
    if (err.friendlyMsg)
    {
        result.message = err.friendlyMsg;
        result.success = false;
        result.deleted = false;
    }

    Response.Write(JSON.stringify(result));
%>