Advertisement
hecrus

tree checkboxes SaveItem

Nov 3rd, 2020
1,105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.64 KB | None | 0 0
  1. CREATE PROCEDURE [dbo].[fm_tst-form-treeview_saveItem]
  2.    @username nvarchar(256),
  3.    @itemID int,
  4.    @parameters ExtendedDictionaryParameter READONLY
  5. AS
  6. BEGIN
  7.    
  8.     declare @pf1 nvarchar(max)
  9.     select @pf1 = Value2 from @parameters where [key]='f1'
  10.    
  11.     exec as_print @str = @pf1
  12.    
  13.     update tst_categories
  14.     set selected= 0
  15.    
  16.     update tst_categories
  17.     set selected= 1
  18.     where id in (select Value from dbo.split(@pf1,',') where Value<>'')
  19.    
  20.     -- SELECT 1 (Result, Msg, SuccessUrl, HideFormAfterSubmit, RefreshContainer)
  21.     select 1 Result, 'OK' Msg, '' SuccessUrl, 0 HideFormAfterSubmit, '' RefreshContainer
  22. END
  23.  
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement