表单 申请权限 卡控

 

表单自定义Store Procedure

usp_FORMKIND(去点)_ApplyFormPermission

 

 

CREATE PROCEDURE [dbo].[usp_FORMKIND_ApplyFormPermission]
		@p_strEmpID  nvarchar(30),
		@p_strFormKind  nvarchar(30)
AS 
BEGIN
	SET NOCOUNT ON;


	IF NOT EXISTS(SELECT * FROM AM_EMPLOYEE	
			WHERE EMP_ID=@p_strEmpID
			AND EMP_ID IN(SELECT EMPLOYEEID FROM ***.dbo.PSNACCOUNT 
					WHERE PERSONID IN(SELECT DISTINCT DIRECTOR FROM eHR_DB.dbo.ORGSTDSTRUCT WHERE DIRECTOR !=''))
			
		)
	BEGIN
		RETURN  1
		
		
	END
	ELSE
	BEGIN
		RETURN  0
	END
END

你可能感兴趣的:(表单 申请权限 卡控)