-- This file is part of the it-crafts software and is subject to copyright protection.
-- (C) 2024, All rights reserved by Steffen Anders, Elsteraue - Germany
-- Visit also https://www.it-crafts.de.
--

--------------------------------------------------------------------------------------------------------
-- Optionen fuer eine WEB-Seite abrufen
IF 0 < (SELECT count(*) from [sysobjects] where [xtype] = 'P' and [name] = 'itcproc_getWebPageOptions')
  DROP PROCEDURE [dbo].[itcproc_getWebPageOptions]
GO
CREATE PROCEDURE [dbo].[itcproc_getWebPageOptions]
  @Param_Knr      varchar(20)
 ,@Param_Uid      varchar(30)
 ,@Param_PageName varchar(50)
 ,@Param_IsMobil  varchar(10)
AS
  IF @Param_PageName = 'wartungskopf-list' 
	SELECT 
		1 AS enableEdit
	   ,dbo.itcfunc_GetMyPermission(@Param_Knr, @Param_Uid, 'dbo.itcproc_WartungsAuftraege_add') AS enableAppend
	   ,0 AS enableDelete
	   ,'' AS fieldList
  ELSE 
    SELECT 'Nicht verfügbar itcproc_getWebPageOptions ' + @Param_PageName AS error
GO
