<%@language = "javascript" %>
<% /*
     $Revision$
     $Id$

     File:               get_ctr_info.asp
     Description:        Levert de discipline gegevens op van de ctr discipline.
     Parameters:
        ctr_disc         ctr discipline key
*/ %>

<%
var JSON_Result = true;
%>

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

<%
/***** Get webform parameters *****/
var ctr_disc = getQParamInt("ctr_disc", -1);
// Geen autorisatie check nodig
/***** End get webform parameters *****/

var sql = "SELECT cd.ins_discipline_key"
        + "     , cd.ins_discipline_omschrijving"
        + "     , cdp.ctr_disc_params_controle_type"
        + "     , cdp.ctr_disc_params_ismjob"
        + "     , mld_stdmelding_key"
        + "  FROM ctr_discipline cd"
        + "     , ctr_disc_params cdp"
        + " WHERE cd.ins_discipline_key = cdp.ctr_ins_discipline_key"
        + "   AND cd.ins_discipline_key = " + ctr_disc;
var oRs = Oracle.Execute(sql);

var disc_key = oRs("ins_discipline_key").Value;
var disc_omschr = oRs("ins_discipline_omschrijving").Value;
var controle_type = oRs("ctr_disc_params_controle_type").Value;
var ismjob = oRs("ctr_disc_params_ismjob").Value == 1;
var mld_stdmelding_key = oRs("mld_stdmelding_key").Value;

var result = { disc_key: ctr_disc,
               disc_omschr: disc_omschr,
               controle_type: controle_type,
               ismjob: ismjob,
               stdmelding_key: mld_stdmelding_key };
Response.Write(JSON.stringify(result));
%>
<% ASPPAGE_END(); %> 
