Advertisement
hecrus

Human SQL Page

Oct 10th, 2020
1,141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.73 KB | None | 0 0
  1. CREATE PROCEDURE [dbo].[pg_crumbs_human]
  2.     @roles nvarchar(128),
  3.     @itemID nvarchar(128) = '',
  4.     @urlParameters CRUDFilterParameter READONLY
  5. AS
  6. BEGIN
  7. declare @langID int
  8. select @langID = try_cast(Value as int) from @urlParameters where [Key]='langID'
  9.  
  10.     CREATE TABLE dbo.#result (title nvarchar(256), link nvarchar(256), tooltip nvarchar(256), ord int)
  11.  
  12.     insert into #result
  13.     select iif(@langID=1, 'Home','Главная'), '/', '', 1
  14.     union
  15.     select 'База людей', '/hr', '', 2
  16.    
  17.     -- SELECT 1 Хлебные крошки
  18.     select * from #result order by ord
  19.    
  20.     -- SELECT 2 Параметры страницы
  21.     select 'Сотрудник '+ fio Title from hr_humans where id = @itemID
  22.     drop table #result
  23. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement