Advertisement
hecrus

Form Add SaveItem

Oct 10th, 2020
1,227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.62 KB | None | 0 0
  1. CREATE PROCEDURE [dbo].[fm_newHuman_saveItem]
  2.    @username nvarchar(256),
  3.    @itemID int,
  4.    @parameters ExtendedDictionaryParameter readonly
  5. AS
  6. BEGIN
  7.  
  8.  
  9.     declare @pfio nvarchar(max)
  10.     select @pfio = Value2 from @parameters where [key]='fio'
  11.     declare @pdepID nvarchar(max)
  12.     select @pdepID = Value2 from @parameters where [key]='depID'
  13.    
  14.     insert into hr_humans (fio, depID)
  15.     values (@pfio, try_cast(@pdepID as int))    
  16.  
  17.     -- 1 SELECT (Result, Msg)
  18.     select 1 Result, 'Создан' Msg, '' SuccessUrl, 1 HideFormAfterSubmit, '' RefreshContainer
  19.  
  20.  
  21.     -- SELECT 2 Вызов внешнего действия
  22. END
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement