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

    File:                  alg_ruimtefunctie_delete.asp
    Description:           Verwijderen ruimtefunctie locatie/gebouw relatie

    Parameters:
        key                Strin van ruimtefunctie locatie/gebouw keys (required)
    Context:               Vanuit show-schermen en of vanuit overzichten
    Result:                JSON object
    Note:

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

var autfunction = "WEB_ALGMAN";

var authParams = user.checkAutorisation(autfunction);

var  key = getFParamInt('key');


var sql = "DELETE FROM alg_srtruimte_locatiegebouw"
        + " WHERE alg_srtruimte_lg_key IN (" + key + ")";


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

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