	IF OBJECT_ID('NET_DEL_EVENTO') IS NOT NULL
		DROP PROC NET_DEL_EVENTO

	GO
		CREATE PROC NET_DEL_EVENTO
	(
	  @pCodEvento INT = NULL
	, @pType VARCHAR(30) = NULL
	, @pStatus INT = NULL

	)
	AS 
		
		BEGIN
			SET NOCOUNT ON
	
IF @pType = 'DELETE'		
				DELETE FROM 
										NET_EVENTO
							WHERE     
										((CodEvento  = @pCodEvento) );
ELSE
				UPDATE 
										NET_EVENTO
						SET
										Status =CASE WHEN  Status  = 1 THEN 0 ELSE 1 END
							WHERE     
										((CodEvento = @pCodEvento) );


	SET NOCOUNT OFF 
	END 

