KFNS#40578 notitie aan contract -> mail toegevoegd
svn path=/Website/trunk/; revision=34209
This commit is contained in:
56
APPL/CNT/cnt_edit_note_save.asp
Normal file
56
APPL/CNT/cnt_edit_note_save.asp
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
<%@language = "javascript"%>
|
||||||
|
<% /*
|
||||||
|
$Revision$
|
||||||
|
$Id$
|
||||||
|
|
||||||
|
File: cnt/cnt_edit_note.asp
|
||||||
|
Description: Bekijken en/of aanvullen van een notitie behorende bij een melding
|
||||||
|
in een apart blokje
|
||||||
|
Parameters: fronto/backo
|
||||||
|
Context: vanuit melding-detail/overzicht
|
||||||
|
Note: STATUS: functioneel wel ok, moet nog in redesign 5i mee.
|
||||||
|
TODO: mld-labels ver-cnt-en
|
||||||
|
*/
|
||||||
|
var JSON_Result = true; %>
|
||||||
|
|
||||||
|
<!-- #include file="../Shared/common.inc" -->
|
||||||
|
<!-- #include file="../Shared/json2.js" -->
|
||||||
|
<!-- #include file="../Shared/save2db.inc" -->
|
||||||
|
<!-- #include file="./cnt.inc" -->
|
||||||
|
|
||||||
|
<%
|
||||||
|
var cnt_key = getQParamInt("cnt_key");
|
||||||
|
var note_key = getQParamInt("note_key", -1);
|
||||||
|
var note = getFParam("note");
|
||||||
|
|
||||||
|
var this_cnt = cnt.func_enabled_contract(cnt_key); // Wat heb ik zoal aan rechten op dit contract?
|
||||||
|
user.auth_required_or_abort(this_cnt.canWriteNotes);
|
||||||
|
|
||||||
|
if (note != "")
|
||||||
|
{
|
||||||
|
var fields = [ { dbs: "cnt_contract_key", typ: "key", val: cnt_key },
|
||||||
|
{ dbs: "prs_perslid_key", typ: "key", val: user_key },
|
||||||
|
{ dbs: "cnt_contract_note_omschrijving", typ: "varchar", frm: "note", len: 4000 }
|
||||||
|
];
|
||||||
|
if (note_key > -1)
|
||||||
|
{
|
||||||
|
var sql = buildUpdate("cnt_contract_note", fields)
|
||||||
|
+ " cnt_contract_note_key = " + note_key
|
||||||
|
+ " AND prs_perslid_key = " + user_key; // Voorkom dat er een notitie van een ander aangepast wordt.
|
||||||
|
Oracle.Execute(sql);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var noteIns = buildInsert("cnt_contract_note", fields);
|
||||||
|
Oracle.Execute(noteIns.sql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var result = {success: true,
|
||||||
|
cnt_key: cnt_key,
|
||||||
|
note_key: note_key
|
||||||
|
};
|
||||||
|
|
||||||
|
Response.Write(JSON.stringify(result));
|
||||||
|
Response.End;
|
||||||
|
%>
|
||||||
Reference in New Issue
Block a user