Advertisement
hecrus

pg_crumbs_human

Oct 10th, 2020
1,554
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.82 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.     declare @fio nvarchar(256)
  13.     select @fio = fio from hr_humans where id = @itemID
  14.    
  15.  
  16.     insert into #result
  17.     select iif(@langID=1, 'Home','Главная'), '/', '', 1
  18.     union
  19.     select 'База людей', '/hr', '', 2
  20.     union
  21.     select @fio, '', '', 3
  22.    
  23.     -- SELECT 1 Хлебные крошки
  24.     select * from #result order by ord
  25.    
  26.     -- SELECT 2 Параметры страницы
  27.     select 'Сотрудник '+ @fio Title
  28.     drop table #result
  29. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement