Advertisement
hecrus

Master GetItem

Oct 24th, 2020
2,524
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 2.91 KB | None | 0 0
  1. CREATE PROCEDURE [dbo].[fm_clientQuestionaries_getItem]
  2.     @itemID int,   
  3.     @username nvarchar(256),
  4.     @parameters ExtendedDictionaryParameter READONLY   
  5. AS
  6. BEGIN
  7. declare @langID int
  8.     select @langID = try_cast(Value as int) from @parameters where [Key] = 'langID'
  9.  
  10.    
  11.    
  12.     declare @userGuid uniqueidentifier
  13.     select @userGuid = try_cast(Value as uniqueidentifier) from @parameters where [Key] = 'falconGuid'
  14.  
  15.     select
  16.         (select answer from falcon_clientQuestionaries where userGuid = @userGuid and question = 'channel') channel,
  17.         'Yandex||Google||Youtube||Socials||Newtorking' example_channel,
  18.         1 edt_channel,
  19.         (select answer from falcon_clientQuestionaries where userGuid = @userGuid and question = 'link') link,
  20.         1 edt_link,
  21.         (select answer from falcon_clientQuestionaries where userGuid = @userGuid and question = 'negative') negative,
  22.         1 edt_negative,
  23.         (select answer from falcon_clientQuestionaries where userGuid = @userGuid and question = 'positive') positive,
  24.         1 edt_positive,
  25.         (select answer from falcon_clientQuestionaries where userGuid = @userGuid and question = 'mostinteresting') mostinteresting,
  26.         1 edt_mostinteresting,
  27.         (select answer from falcon_clientQuestionaries where userGuid = @userGuid and question = 'notenough') notenough,
  28.         1 edt_notenough,
  29.         (select answer from falcon_clientQuestionaries where userGuid = @userGuid and question = 'moreinformation') moreinformation,
  30.         1 edt_moreinformation,
  31.         (select answer from falcon_clientQuestionaries where userGuid = @userGuid and question = 'alternative') alternative,
  32.         1 edt_alternative,
  33.         (select answer from falcon_clientQuestionaries where userGuid = @userGuid and question = 'po') po,
  34.         1 edt_po,
  35.         (select answer from falcon_clientQuestionaries where userGuid = @userGuid and question = 'like') [like],
  36.         1 edt_like,
  37.         (select answer from falcon_clientQuestionaries where userGuid = @userGuid and question = 'email') email,
  38.         1 edt_email,
  39.         (select answer from falcon_clientQuestionaries where userGuid = @userGuid and question = 'phone') phone,
  40.         1 edt_phone,
  41.         '1' access,
  42.         1 edt_access
  43.    
  44.     select 'line' progressType,
  45.         iif(@langID=1, 'Getting a discount on Falcon Space (demo)', 'Получение скидки на Falcon Space (демо)') Title,
  46.         iif(@langID=1, 'Your discount will be based on the completeness of your Falcon Space questions. <br />
  47. Each questionnaire is checked manually after filling in and the amount of the discount is confirmed.', 'Ваша скидка будет зависеть от степени заполненности вопросов по Falcon Space. <br />
  48. Каждая анкета проверяется после заполнения вручную и подтверждается размер скидки. ') Subtitle ,
  49.         iif(@langID=1, 'Get discount', 'Получить скидку') ButtonText
  50. END
  51.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement