﻿-- =============================================
-- Author:        Sólyom Péter
-- Create date: 2016.06.15.
-- Description:    A tanévhez tartozó alapadatokat és sémákat generálja le.
-- =============================================
DROP PROCEDURE IF EXISTS [dev].[uspSetDictionaryItemsDefaultValue]
GO

CREATE PROCEDURE [dev].[uspSetDictionaryItemsDefaultValue]
   @pIntezmenyId int
  ,@pTanevId int
AS
BEGIN
  SET NOCOUNT ON;

  -- ============================================================================================
  -- T_NAPTIPUS
  -- ============================================================================================
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'T', C_ISTANITASINAP = 'T', C_ISTANORAI = 'T', C_ISTANORANKIVULI = 'T', C_ISLENEMKOTOTTMUNKAIDO = 'T' WHERE ID = 1384 AND C_ALTANEVID = @pTanevId -- Na
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'T', C_ISTANITASINAP = 'T', C_ISTANORAI = 'T', C_ISTANORANKIVULI = 'T', C_ISLENEMKOTOTTMUNKAIDO = 'T' WHERE ID = 1385 AND C_ALTANEVID = @pTanevId -- Tanítási nap
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'F', C_ISTANITASINAP = 'F', C_ISTANORAI = 'F', C_ISTANORANKIVULI = 'F', C_ISLENEMKOTOTTMUNKAIDO = 'F' WHERE ID = 1386 AND C_ALTANEVID = @pTanevId -- Munkaszüneti nap
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'F', C_ISTANITASINAP = 'F', C_ISTANORAI = 'F', C_ISTANORANKIVULI = 'F', C_ISLENEMKOTOTTMUNKAIDO = 'F' WHERE ID = 1387 AND C_ALTANEVID = @pTanevId -- Tanítás nélküli munkanap
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'F', C_ISTANITASINAP = 'F', C_ISTANORAI = 'F', C_ISTANORANKIVULI = 'F', C_ISLENEMKOTOTTMUNKAIDO = 'F' WHERE ID = 1388 AND C_ALTANEVID = @pTanevId -- Szülői értekezlet (tanítás nélkül)
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'T', C_ISTANITASINAP = 'T', C_ISTANORAI = 'T', C_ISTANORANKIVULI = 'T', C_ISLENEMKOTOTTMUNKAIDO = 'T' WHERE ID = 1389 AND C_ALTANEVID = @pTanevId -- Egész napos kirándulás
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'F', C_ISTANITASINAP = 'F', C_ISTANORAI = 'F', C_ISTANORANKIVULI = 'F', C_ISLENEMKOTOTTMUNKAIDO = 'T' WHERE ID = 1390 AND C_ALTANEVID = @pTanevId -- Fogadónap (tanítás nélküli)
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'F', C_ISTANITASINAP = 'F', C_ISTANORAI = 'F', C_ISTANORANKIVULI = 'F', C_ISLENEMKOTOTTMUNKAIDO = 'F' WHERE ID = 1391 AND C_ALTANEVID = @pTanevId -- Szabadnap (intézményvezetői hatáskörben)
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'F', C_ISTANITASINAP = 'F', C_ISTANORAI = 'F', C_ISTANORANKIVULI = 'F', C_ISLENEMKOTOTTMUNKAIDO = 'F' WHERE ID = 1392 AND C_ALTANEVID = @pTanevId -- Tanítási szünet
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'T', C_ISTANITASINAP = 'T', C_ISTANORAI = 'T', C_ISTANORANKIVULI = 'T', C_ISLENEMKOTOTTMUNKAIDO = 'T' WHERE ID = 1393 AND C_ALTANEVID = @pTanevId -- Rövidített órákat tartalmazó tanítási nap
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'T', C_ISTANITASINAP = 'T', C_ISTANORAI = 'T', C_ISTANORANKIVULI = 'T', C_ISLENEMKOTOTTMUNKAIDO = 'T' WHERE ID = 1394 AND C_ALTANEVID = @pTanevId -- Első tanítási nap
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'T', C_ISTANITASINAP = 'T', C_ISTANORAI = 'T', C_ISTANORANKIVULI = 'T', C_ISLENEMKOTOTTMUNKAIDO = 'T' WHERE ID = 1395 AND C_ALTANEVID = @pTanevId -- Utolsó tanítási nap
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'F', C_ISTANITASINAP = 'F', C_ISTANORAI = 'F', C_ISTANORANKIVULI = 'F', C_ISLENEMKOTOTTMUNKAIDO = 'F' WHERE ID = 1396 AND C_ALTANEVID = @pTanevId -- Ünnepnap
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'F', C_ISTANITASINAP = 'F', C_ISTANORAI = 'F', C_ISTANORANKIVULI = 'F', C_ISLENEMKOTOTTMUNKAIDO = 'F' WHERE ID = 1397 AND C_ALTANEVID = @pTanevId -- Téli szünet
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'F', C_ISTANITASINAP = 'F', C_ISTANORAI = 'F', C_ISTANORANKIVULI = 'F', C_ISLENEMKOTOTTMUNKAIDO = 'F' WHERE ID = 1398 AND C_ALTANEVID = @pTanevId -- Tavaszi szünet
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'F', C_ISTANITASINAP = 'F', C_ISTANORAI = 'F', C_ISTANORANKIVULI = 'F', C_ISLENEMKOTOTTMUNKAIDO = 'F' WHERE ID = 1399 AND C_ALTANEVID = @pTanevId -- Őszi szünet
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'T', C_ISTANITASINAP = 'T', C_ISTANORAI = 'T', C_ISTANORANKIVULI = 'T', C_ISLENEMKOTOTTMUNKAIDO = 'T' WHERE ID = 1400 AND C_ALTANEVID = @pTanevId -- Első félév vége
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'T', C_ISTANITASINAP = 'T', C_ISTANORAI = 'T', C_ISTANORANKIVULI = 'T', C_ISLENEMKOTOTTMUNKAIDO = 'T' WHERE ID = 1401 AND C_ALTANEVID = @pTanevId -- Vizsganap
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'T', C_ISTANITASINAP = 'T', C_ISTANORAI = 'T', C_ISTANORANKIVULI = 'T', C_ISLENEMKOTOTTMUNKAIDO = 'T' WHERE ID = 1402 AND C_ALTANEVID = @pTanevId -- Utolsó tanítási nap a végzős évfolyamokon
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'T', C_ISTANITASINAP = 'T', C_ISTANORAI = 'T', C_ISTANORANKIVULI = 'T', C_ISLENEMKOTOTTMUNKAIDO = 'T' WHERE ID = 1403 AND C_ALTANEVID = @pTanevId -- I. negyedév vége
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'T', C_ISTANITASINAP = 'T', C_ISTANORAI = 'T', C_ISTANORANKIVULI = 'T', C_ISLENEMKOTOTTMUNKAIDO = 'T' WHERE ID = 1404 AND C_ALTANEVID = @pTanevId -- III. negyedév vége
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'F', C_ISTANITASINAP = 'F', C_ISTANORAI = 'T', C_ISTANORANKIVULI = 'T', C_ISLENEMKOTOTTMUNKAIDO = 'T' WHERE ID = 1405 AND C_ALTANEVID = @pTanevId -- Egybefüggő szakmai gyakorlati nap
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'F', C_ISTANITASINAP = 'F', C_ISTANORAI = 'T', C_ISTANORANKIVULI = 'T', C_ISLENEMKOTOTTMUNKAIDO = 'T' WHERE ID = 1406 AND C_ALTANEVID = @pTanevId -- Nyári oktatási nap
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'T', C_ISTANITASINAP = 'T', C_ISTANORAI = 'T', C_ISTANORANKIVULI = 'T', C_ISLENEMKOTOTTMUNKAIDO = 'T' WHERE ID = 1649 AND C_ALTANEVID = @pTanevId -- Nyílt nap
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'F', C_ISTANITASINAP = 'F', C_ISTANORAI = 'F', C_ISTANORANKIVULI = 'F', C_ISLENEMKOTOTTMUNKAIDO = 'F' WHERE ID = 6833 AND C_ALTANEVID = @pTanevId -- Pihenőnap
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'T', C_ISTANITASINAP = 'T', C_ISTANORAI = 'T', C_ISTANORANKIVULI = 'T', C_ISLENEMKOTOTTMUNKAIDO = 'T' WHERE ID = 7600 AND C_ALTANEVID = @pTanevId -- Utolsó tanítási nap a végzős évfolyamokon (rendészeti iskolákban)
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'T', C_ISTANITASINAP = 'T', C_ISTANORAI = 'T', C_ISTANORANKIVULI = 'T', C_ISLENEMKOTOTTMUNKAIDO = 'T' WHERE ID = 7601 AND C_ALTANEVID = @pTanevId -- Utolsó tanítási nap a végzős évfolyamokon (honvédelmi iskolákban)
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'T', C_ISTANITASINAP = 'T', C_ISTANORAI = 'T', C_ISTANORANKIVULI = 'T', C_ISLENEMKOTOTTMUNKAIDO = 'T' WHERE ID = 7602 AND C_ALTANEVID = @pTanevId -- Utolsó tanítási nap a végzős évfolyamokon (keresztféléves képzésben)
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'T', C_ISTANITASINAP = 'T', C_ISTANORAI = 'T', C_ISTANORANKIVULI = 'T', C_ISLENEMKOTOTTMUNKAIDO = 'T' WHERE ID = 7603 AND C_ALTANEVID = @pTanevId -- Utolsó tanítási nap a végzős évfolyamokon (részszakképesítéses oktatásban)
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'T', C_ISTANITASINAP = 'T', C_ISTANORAI = 'T', C_ISTANORANKIVULI = 'T', C_ISLENEMKOTOTTMUNKAIDO = 'T' WHERE ID = 7604 AND C_ALTANEVID = @pTanevId -- Első tanítási nap (keresztféléves képzésben)
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'T', C_ISTANITASINAP = 'T', C_ISTANORAI = 'T', C_ISTANORANKIVULI = 'T', C_ISLENEMKOTOTTMUNKAIDO = 'T' WHERE ID = 7605 AND C_ALTANEVID = @pTanevId -- Első félév vége (keresztféléves képzésben)
  UPDATE T_NAPTIPUS SET C_ISSORSZAMOZANDO = 'F', C_ISTANITASINAP = 'F', C_ISTANORAI = 'F', C_ISTANORANKIVULI = 'F', C_ISLENEMKOTOTTMUNKAIDO = 'F' WHERE ID = 8407 AND C_ALTANEVID = @pTanevId -- Rendkívüli tanítási szünet


  -- ============================================================================================
  -- T_CSOPORTTIPUS
  -- ============================================================================================
  UPDATE T_CSOPORTTIPUS SET C_ISTANORAICELU = 'T' WHERE ID = 6877 AND C_ALTANEVID = @pTanevId -- Hittan csoport
  UPDATE T_CSOPORTTIPUS SET C_ISTANORAICELU = 'T' WHERE ID = 1034 AND C_ALTANEVID = @pTanevId -- Iskolai csoport (tanórai célú)
  UPDATE T_CSOPORTTIPUS SET C_ISMUVESZETI = 'T' WHERE ID IN (1071, 1070, 1069, 1068, 1067, 6756, 6757, 6758, 6759, 6760, 6761) AND C_ALTANEVID = @pTanevId -- AMI-s csoporttípusok


  -- ============================================================================================
  -- T_OKTATASINEVELESIFELADAT
  -- ============================================================================================
  UPDATE T_OKTATASINEVELESIFELADAT SET C_ESLKOZEPESATLAG = 2.5 WHERE ID IN (1160, 1161, 1162, 5435, 1176, 6463, 7664, 7760, 7764, 7765, 7766, 7894, 7895, 7896) AND C_ALTANEVID = @pTanevId


  -- ============================================================================================
  -- T_ERTEKELESTIPUS
  -- ============================================================================================
  UPDATE T_ERTEKELESTIPUS SET C_ISEGYSZERADHATO = 'T' WHERE ID IN (1519, 1520, 1522, 1523, 1524, 1525) AND C_ALTANEVID = @pTanevId 


  -- ============================================================================================
  -- T_EVFOLYAMTIPUS
  -- ============================================================================================
  UPDATE T_EVFOLYAMTIPUS SET C_ISOSSZEVONT = 'T' WHERE ID IN (6908, 6909, 6910, 6911, 6912, 6913, 7366) AND C_ALTANEVID = @pTanevId; 

  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 1296 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Kis' WHERE ID = 1297 AND C_TANEVID = @pTanevId;  
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Középső' WHERE ID = 1298 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Nagy' WHERE ID = 1299 AND C_TANEVID = @pTanevId;  
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 1300 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 1301 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 1302 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'1' WHERE ID = 1303 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'2' WHERE ID = 1304 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'3' WHERE ID = 1305 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'4' WHERE ID = 1306 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'5' WHERE ID = 1307 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'6' WHERE ID = 1308 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'7' WHERE ID = 1309 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'8' WHERE ID = 1310 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'9' WHERE ID = 1311 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'10' WHERE ID = 1312 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'11' WHERE ID = 1313 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'12' WHERE ID = 1314 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'13' WHERE ID = 1315 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 1316 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 1317 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 1318 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 1319 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 1320 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 1321 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 1322 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 1323 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 1324 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 1325 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 1326 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'5' WHERE ID = 1330 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'7' WHERE ID = 1331 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'9' WHERE ID = 1332 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'9' WHERE ID = 1333 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'5' WHERE ID = 1334 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'7' WHERE ID = 1335 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'9' WHERE ID = 1336 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 1337 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 3016 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 3017 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'9' WHERE ID = 3018 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'9' WHERE ID = 3019 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 3020 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 3021 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 3022 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6468 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6469 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6470 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6471 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6472 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6473 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6474 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6475 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6476 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6477 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6478 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6479 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6480 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6481 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6482 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6520 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6702 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6703 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6704 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6705 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6818 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6819 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6908 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6909 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6910 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6911 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6912 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 6913 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'7' WHERE ID = 7109 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'8' WHERE ID = 7110 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'9' WHERE ID = 7111 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'9' WHERE ID = 7112 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'9' WHERE ID = 7113 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'9' WHERE ID = 7114 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'10' WHERE ID = 7115 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'10' WHERE ID = 7116 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'10' WHERE ID = 7117 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'10' WHERE ID = 7118 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'11' WHERE ID = 7119 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'11' WHERE ID = 7120 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'11' WHERE ID = 7121 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'11' WHERE ID = 7122 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'12' WHERE ID = 7123 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'12' WHERE ID = 7124 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'12' WHERE ID = 7125 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'12' WHERE ID = 7126 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'9' WHERE ID = 7127 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'9' WHERE ID = 7128 AND C_TANEVID = @pTanevId; 
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 7129 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 7366 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = N'Na' WHERE ID = 7721 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '9' WHERE ID = 7862 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '10' WHERE ID = 7874 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '15' WHERE ID = 7911 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = 'Ksz/13' WHERE ID = 8394 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '12' WHERE ID = 7877 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '12' WHERE ID = 7902 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '10' WHERE ID = 8397 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = 'Ksz/14' WHERE ID = 8409 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = 'Ksz/11' WHERE ID = 7866 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '12' WHERE ID = 7878 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '13' WHERE ID = 7903 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '11' WHERE ID = 8398 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '9' WHERE ID = 7870 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '10' WHERE ID = 7907 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '9' WHERE ID = 7869 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '9' WHERE ID = 7906 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = 'Na' WHERE ID = 8401 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '10' WHERE ID = 7863 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '11' WHERE ID = 7875 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '15' WHERE ID = 8395 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = 'Ksz/12' WHERE ID = 7867 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = 'Na' WHERE ID = 7904 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '12' WHERE ID = 8399 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '9' WHERE ID = 7872 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '14' WHERE ID = 7884 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '12' WHERE ID = 7909 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '9' WHERE ID = 7871 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '13' WHERE ID = 7883 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '11' WHERE ID = 7908 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '11' WHERE ID = 7864 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '11' WHERE ID = 7876 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '12' WHERE ID = 7901 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '9' WHERE ID = 8396 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = 'Ksz/13' WHERE ID = 8408 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '10' WHERE ID = 7873 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '13' WHERE ID = 7910 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '9' WHERE ID = 7868 AND C_TANEVID = @pTanevId;
  UPDATE T_DICTIONARYITEMBASE SET C_NAME_4 = '9' WHERE ID = 7905 AND C_TANEVID = @pTanevId;  

  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1296 WHERE ID = 1296 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1298 WHERE ID = 1297 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1299 WHERE ID = 1298 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 1299 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1300 WHERE ID = 1300 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1302 WHERE ID = 1301 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1303 WHERE ID = 1302 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1304 WHERE ID = 1303 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1305 WHERE ID = 1304 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1306 WHERE ID = 1305 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1307 WHERE ID = 1306 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1308 WHERE ID = 1307 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1309 WHERE ID = 1308 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1310 WHERE ID = 1309 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 1310 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1312 WHERE ID = 1311 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1313 WHERE ID = 1312 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1314 WHERE ID = 1313 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1315 WHERE ID = 1314 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 1315 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1323 WHERE ID = 1316 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1318 WHERE ID = 1317 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1322 WHERE ID = 1318 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1320 WHERE ID = 1319 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1321 WHERE ID = 1320 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 6468 WHERE ID = 1321 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 6468 WHERE ID = 1322 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1325 WHERE ID = 1323 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 1324 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 6520 WHERE ID = 1325 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 1326 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1307 WHERE ID = 1330 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1309 WHERE ID = 1331 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1311 WHERE ID = 1332 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1311 WHERE ID = 1333 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1307 WHERE ID = 1334 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1309 WHERE ID = 1335 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1311 WHERE ID = 1336 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 1337 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 3017 WHERE ID = 3016 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 8408 WHERE ID = 3017 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1311 WHERE ID = 3018 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1311 WHERE ID = 3019 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1311 WHERE ID = 3020 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 3021 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 3022 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 6468 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 6469 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1299 WHERE ID = 6470 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 6471 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 6472 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 6473 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 6474 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 6475 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 6476 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 6477 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 6478 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 6479 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 6480 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 6481 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 6482 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 6520 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 6703 WHERE ID = 6702 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 6704 WHERE ID = 6703 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 6705 WHERE ID = 6704 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 6705 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 6819 WHERE ID = 6818 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 6819 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 6911 WHERE ID = 6908 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 6912 WHERE ID = 6909 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 6910 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 6913 WHERE ID = 6911 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 6912 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 6913 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7110 WHERE ID = 7109 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7112 WHERE ID = 7110 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7115 WHERE ID = 7111 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7116 WHERE ID = 7112 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7117 WHERE ID = 7113 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7118 WHERE ID = 7114 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7119 WHERE ID = 7115 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7120 WHERE ID = 7116 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7121 WHERE ID = 7117 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7122 WHERE ID = 7118 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7123 WHERE ID = 7119 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7124 WHERE ID = 7120 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7125 WHERE ID = 7121 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7126 WHERE ID = 7122 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 7123 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 7124 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 7125 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 7126 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7112 WHERE ID = 7127 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 1311 WHERE ID = 7128 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7129 WHERE ID = 7129 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7366 WHERE ID = 7366 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7863 WHERE ID = 7862 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7864 WHERE ID = 7863 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7865 WHERE ID = 7864 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 7865 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7867 WHERE ID = 7866 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 8394 WHERE ID = 7867 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 7868 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7871 WHERE ID = 7869 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7872 WHERE ID = 7870 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7873 WHERE ID = 7871 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7874 WHERE ID = 7872 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7875 WHERE ID = 7873 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7876 WHERE ID = 7874 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7877 WHERE ID = 7875 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7878 WHERE ID = 7876 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7879 WHERE ID = 7877 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7880 WHERE ID = 7878 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7881 WHERE ID = 7879 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7882 WHERE ID = 7880 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 7881 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 7882 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7884 WHERE ID = 7883 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 8395 WHERE ID = 7884 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 7889 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 7901 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7903 WHERE ID = 7902 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 7903 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 7904 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7906 WHERE ID = 7905 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7907 WHERE ID = 7906 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7908 WHERE ID = 7907 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 7909 WHERE ID = 7908 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 7909 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 7910 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 7911 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 8394 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 8395 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 8397 WHERE ID = 8396 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 8398 WHERE ID = 8397 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 8399 WHERE ID = 8398 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 8399 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 8401 WHERE ID = 8401 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = 8409 WHERE ID = 8408 AND C_ALTANEVID = @pTanevId;
  UPDATE T_EVFOLYAMTIPUS SET C_KOVETKEZOEVFOLYAMTIPUSID = null WHERE ID = 8409 AND C_ALTANEVID = @pTanevId;



END
GO
