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

    File:
    Description:
    Parameters:
    Note:

*/
%>

<!-- #include file="../../appl/Shared/common.inc" -->
<!-- #include file="../../appl/Shared/selector.inc" -->
<!-- #include file="../../appl/ins/ins.inc" -->
<!-- #include file="../../appl/ins/ins_flexkenmerksrtcontrole.inc" -->
<!-- #include file="../../appl/pda/mobile.inc" -->
<!-- #include file="../../appl/pda/iface.inc" -->
<!-- #include file="../../appl/pda/resultset_table.inc" -->

<%
// Get parameters

var qrc=0;
var route = getQParam("route", "none");

%>
  <html>
    <head>
<%    FCLTMHeader.Generate({}); %>
    </head>
    <body>
<%

if (route != "none")
{
  PAGE_START();
  HEADER({title: "Route ingevuld", back:0, home:1});
  CONTENT_START();
   var sql = "BEGIN PRS.upsertkenmerk (1000, " + user_key + ",  " + safe.quoted_sql(route) + "); END;"
   Oracle.Execute(sql);
   ROFIELD("sel_srtcontrole_oms", "Route", route, {});
}
else
{

  PAGE_START();
  HEADER({title: "Kies de route", back:!qrc, home:1});
  CONTENT_START();

  function fncolLink(oRs)
  {
    return "../../cust/asdl/kies_route.asp?route=" + oRs("ins_srtcontroledl_xcp_groep").Value;
  };


  var sql = "SELECT  rownum, ins_srtcontroledl_xcp_groep from (SELECT DISTINCT ins_srtcontroledl_xcp_groep FROM ins_srtcontroledl_xcp) ORDER BY ins_srtcontroledl_xcp_groep"

  var rst = new ResultsetTable({sql: sql,
                                keyColumn: "rownum",
                                linkColumn: fncolLink,
                                detailColumn: "ins_srtcontroledl_xcp_groep",
                                ID: "srtcontroletable",
                                showAll: true
                                });

  var cnt = rst.processResultset();

  CONTENT_END();
  FOOTER();
  PAGE_END();
}
%>
    </body>
  </html>
