Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE OR ALTER PROCEDURE [dbo].[falcon_dragDrop]
- @parameters ExtendedDictionaryParameter readonly,
- @username nvarchar(256)
- AS
- BEGIN
- declare @elementItemID int, @elementCode nvarchar(128),
- @containerItemID int, @containerCode nvarchar(128)
- select @elementItemID = try_cast(Value2 as int)
- from @parameters where lower([Key])='elementitemid'
- select @elementCode= Value2
- from @parameters where lower([Key])='elementcode'
- select @containerItemID = try_cast(Value2 as int)
- from @parameters where lower([Key])='containeritemid'
- select @containerCode = Value2
- from @parameters where lower([Key])='containercode'
- declare @actionType nvarchar(128) = case
- when @elementCode= 'copyType' then 'copy'
- when @elementCode= 'moveType' then 'move'
- when @elementCode= 'deleteType' then 'delete'
- when @elementCode= 'backType' then 'back'
- end
- if(@elementCode='linkedTable1') begin
- -- SELECT 1
- select 1 Result, '' Msg,
- '' icon, '.linkedForm' RefreshContainer,
- '.linkedForm' ReplaceContainer,
- '<div class="as-form" data-code="watch_linkedForm" data-itemID="'+cast(@elementItemID as nvarchar)+'"></div>' ReplaceContainerHtml,
- 'copy' [action] -- move, back, delete, copy
- return
- end
- -- SELECT 1
- select 1 Result, '' Msg,
- 'fa-cogs' icon, '' RefreshContainer, '' ReplaceContainer, '' ReplaceContainerHtml,
- isnull(@actionType, 'copy') [action] -- move, back, delete, copy
- -- SELECT 2 Outer commands
- END
Advertisement
Add Comment
Please, Sign In to add comment