DROP PROCEDURE IF EXISTS uspUpdateDictionaryItem 
GO
  CREATE PROCEDURE uspUpdateDictionaryItem 
     @pMegnevezes NVARCHAR(250)
    ,@pMegnevezes1 NVARCHAR(250)
    ,@pMegnevezes2 NVARCHAR(250)
    ,@pMegnevezes3 NVARCHAR(250)
    ,@pMegnevezes4 NVARCHAR(250)
    ,@pLathato CHAR(1)
    ,@pIsProtected CHAR(1)
    ,@pColor NVARCHAR(6)
    ,@pUserId INT
    ,@pId INT
    ,@pIntezmenyId INT
    ,@pTanevId INT
  AS
  BEGIN
    SET NOCOUNT ON;

    UPDATE T_DICTIONARYITEMBASE_OSSZES
    SET C_NAME = @pMegnevezes
      ,C_NAME_1 = @pMegnevezes1
      ,C_NAME_2 = @pMegnevezes2
      ,C_NAME_3 = @pMegnevezes3
      ,C_NAME_4 = @pMegnevezes4
      ,C_VISIBLE = @pLathato
      ,C_PROTECTED = @pIsProtected
      ,C_COLOR = @pColor
      ,SERIAL = SERIAL + 1
      ,LASTCHANGED = GETDATE()
      ,MODIFIER = @pUserId
    WHERE ID = @pId
      AND C_INTEZMENYID = @pIntezmenyId
      AND C_TANEVID = @pTanevId
  END
GO


