Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE PROCEDURE [dbo].[crud_tst-chart5_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 (title nvarchar(256), value int, color nvarchar(128))
- declare @mon int
- select @mon = Value from @filters where [Key] = 'mon'
- if @mon = 1
- insert into @result
- select '01' title, 5 Value, 'pink' color
- union
- select '05' title, 7 Value, 'powderBlue' color
- union
- select '10' title, 15 Value, 'lightGreen' color
- union
- select '15' title, 12 Value, 'cyan' color
- union
- select '20' title, 18 Value, 'aqua' color
- union
- select '25' title, 16 Value, 'purple' color
- union
- select '31' title, 15 Value, 'gold' color
- else
- insert into @result
- select '01' title, 15 Value, 'pink' color
- union
- select '05' title, 19 Value, 'powderBlue' color
- union
- select '10' title, 21 Value, 'lightGreen' color
- union
- select '15' title, 17 Value, 'cyan' color
- union
- select '20' title, 14 Value, 'aqua' color
- union
- select '25' title, 18 Value, 'purple' color
- union
- select '31' title, 20 Value, 'gold' color
- -- 1 SELECT - сами данные
- select * from @result
- order by title
- -- 2 SELECT - кол-во в таблице
- select count(*) from @result
- -- 3 SELECT Дополнительные настройки таблицы
- select 'chart' ViewType, 'radar' ChartType, case when @mon = 1 then iif(@langID=1, 'March 2020', 'Март 2020') else iif(@langID=1,'April 2020', 'Апрель 2020') end ChartTitle,
- 0 ChartWidth, 0 ChartHeight, 1 HidetitleCount, 1 InstantFilter,
- iif(@langID=1, 'Income statistics', 'Статистика дохода (тыс. руб.)') Title
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement