hecrus

Drag and drop SQL

Feb 7th, 2021
2,886
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE PROCEDURE [dbo].[falcon_dragDrop]
  2.    @parameters ExtendedDictionaryParameter readonly,
  3.     @username nvarchar(256)
  4. AS
  5. BEGIN
  6.     DECLARE @elementItemID INT, @elementCode nvarchar(128), @containerItemID INT, @containerCode nvarchar(128)
  7.     SELECT @elementItemID = try_cast(Value2 AS INT) FROM @parameters WHERE LOWER([KEY])='elementitemid'
  8.     SELECT @elementCode= Value2 FROM @parameters WHERE LOWER([KEY])='elementcode'
  9.     SELECT @containerItemID = try_cast(Value2 AS INT) FROM @parameters WHERE LOWER([KEY])='containeritemid'
  10.     SELECT @containerCode = Value2 FROM @parameters WHERE LOWER([KEY])='containercode'
  11.  
  12.    
  13.    
  14.     DECLARE @actionType nvarchar(128) = CASE  
  15.         WHEN @elementCode= 'copyType' THEN 'copy'
  16.         WHEN @elementCode= 'moveType' THEN 'move'
  17.         WHEN @elementCode=  'deleteType' THEN 'delete'
  18.         WHEN @elementCode= 'backType' THEN 'back'
  19.     END
  20.    
  21.     EXEC as_print @str=@elementCode
  22.  
  23.     -- SELECT 1
  24.     SELECT 1 RESULT, iif(@elementCode='moveAlert' , 'OK!', '') Msg, 'fa-cogs' icon, 'body' RefreshContainer, @actionType [action] -- move, back, delete, copy
  25.  
  26.     -- SELECT 2 Outer commands
  27.  
  28. END
  29.  
  30.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×