Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE PROCEDURE [dbo].[crud_tst-dyntree_getItems]
- @filters CRUDFilterParameter READONLY,
- @sort sql_variant,
- @direction nvarchar(8),
- @page int,
- @pageSize int,
- @username nvarchar(32)
- AS
- BEGIN
- declare @langID int
- select @langID = try_cast(Value as int) from @filters where [Key]='langID'
- declare @result TABLE (id int, parentID int, name nvarchar(256), data nvarchar(max))
- insert into @result
- select id, parentID, name, '{"s":1}' data from tst_cats
- -- 1 SELECT - сами данные 1
- select * from @result
- order by id desc
- -- 2 SELECT - кол-во в таблице
- select count(*)
- from @result
- -- 3 SELECT Дополнительные настройки таблицы
- select
- iif(@langID=1, 'Interactive tree', 'Интерактивное дерево') Title,
- 'dynamicTree' ViewType,
- '{ "levelDistance": 100, "setCurrentAsRoot": false, "orientation": "top",
- "contHeight":"400px",
- "itemFormCode": "tst-dynTreeItem",
- "itemFormContainer": ".itemFormDetails"
- }' dynamicTreeOptions
- -- 4 SELECT Данные для подвала страницы или данные для Ганта/Канбана (если установлен ViewType в 3 SELECT)
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement