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

	GO
		CREATE PROC NET_DEL_CLIENTE
	(
	  @pCodCliente INT = NULL
	, @pType VARCHAR(30) = NULL
	, @pStatus INT = NULL

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


	SET NOCOUNT OFF 
	END 

