#
#		ITSV GmbH
#	CCDB - Command and Control Database
#
#	FILE:		dquermfile_oeinfo.txt
#	DESCRIPTION:	DQUERY definition for CCDB DQUERY "oeinfo"
#
@querytitle
		Information über eine Organisations-Einheit
@querydescription
		\
@group
		GROUPS
@paramnames
		oeid:oeid
@formpagetitle
		Informationen zu einer Organisations-Einheit
@formitems.paramformextension
		<ul><li><a href="/dquery?dataname=addoe">Neue Organisations-Einheit hinzufügen</a></li></ul>
@querytype
		dbselect
@sql
		select oe.OEID as "ID", 'OEID' as "Eigenschaft", oe.OEID as "Wert", '' as "Aktionen" from CCOE oe where oe.OEID=::oeid::
		\
		UNION
		\
		select oe.OEID as "ID", 'NAME' as "Eigenschaft", oe.OENAME as "Wert", '' as "Aktionen" from CCOE oe where oe.OEID=::oeid::
		\
		UNION
		\
		select oe.OEID as "ID", 'PARENT' as "Eigenschaft", oe.OEPARENT as "Wert", '' as "Aktionen" from CCOE oe where oe.OEID=::oeid::
		\
		UNION
		\
		select oe.OEID as "ID", 'DESC' as "Eigenschaft", oe.OEDESC as "Wert", '' as "Aktionen" from CCOE oe where oe.OEID=::oeid::
		\
		UNION
		\
		select oe.OEID as "ID", 'URL' as "Eigenschaft", oe.OEURL as "Wert", '' as "Aktionen" from CCOE oe where oe.OEID=::oeid::
@title
		Organisationseinheit
@post_query
		that.sr = aux.select_result_data(that.result,{select: {cmd: 'select', colnum: 2, where: 'rowvalue[1]=="NAME"'}});
		\
		if (that.sr.error) {
		\
		that.result.setResultAttribute('oename','Fehler: '+aux.objTxt(that.sr.error));
		\
		} else if (that.sr.getRowCount()<1) {
		\
		that.result.setResultAttribute('oename','NAME nicht gefunden');
		\
		} else {
		\
		that.result.setResultAttribute('oename',that.sr.getCellValue(0,0));
		\
		}
@decoration.decorate_colcell.2
		$CONTROL:werteingabe:c2options
@c2options.control_type
		edit
@c2options.value
		@@celldata@@
@c2options.url
		/dquery?dataname=performObjectAction&objtype=oe&key=@@row.ID@@&attribute=@@row.Eigenschaft@@&action=SET
@c2options.submitlabel
		Speichern
@c2options.textinput_fieldname
		value
