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

    File:        ins_delete_srtdeel.asp
    Description: Verwijder een srtdeel
    Parameters:  srtdeel_key
    Context:     Vanuit show-scherm en of vanuit overzicht
*/ %>

<%
var JSON_Result = true;
%>

<!-- #include file="../Shared/common.inc" -->
<!-- #include file="../Shared/json2.js" -->

<%
protectRequest.validateToken();
FCLTHeader.Requires({ plugins:["jQuery"],
                      js: []})

var authparams = user.checkAutorisation("WEB_INSMGT");
user.auth_required_or_abort(authparams.ALGwritelevel < 9 && authparams.PRSwritelevel < 9);

var srtdeel_key = getFParamInt("srtdeel_key");

sql = "UPDATE ins_srtdeel"
    + "   SET ins_srtdeel_verwijder = SYSDATE"
    + " WHERE ins_srtdeel_key = " + srtdeel_key;

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

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