프로젝트

일반

사용자정보

개정판 284fa2c9

ID284fa2c97e925f7a6ff8139ff12234b93a46c44b
상위 dd27861e
하위 e87a55ae, 9e04d900

이지연이(가) 약 3년 전에 추가함

issue #000:

Change-Id: I6a600a1d1869b65f32f28368718a9fc357738a86

차이점 보기:

DTI_PID/ID2PSN/DB.cs
383 383

  
384 384
                    matched = names.FirstOrDefault(param => param == PSN_TRANSFORMKEYWORD_SETTING);
385 385
                    dicColCheck.Clear();
386
                    dicColCheck.Add("[INDEX]", "INTEGER");
387
                    dicColCheck.Add("[NAME]", "TEXT");
388
                    dicColCheck.Add("[KEYWORD]", "TEXT");
386
                    dicColCheck.Add("INDEX", "INTEGER");
387
                    dicColCheck.Add("NAME", "TEXT");
388
                    dicColCheck.Add("KEYWORD", "TEXT");
389 389
                    if (matched == null)
390 390
                    {
391 391
                        var query = $"CREATE TABLE {PSN_TRANSFORMKEYWORD_SETTING} ([INDEX] INTEGER, [NAME] TEXT, [KEYWORD] TEXT)";
......
486 486

  
487 487
                    matched = names.FirstOrDefault(param => param == PSN_NOPOCKETSETTING);
488 488
                    dicColCheck.Clear();
489
                    dicColCheck.Add("[INDEX]", "INTEGER");
490
                    dicColCheck.Add("[TYPE]", "TEXT");
491
                    dicColCheck.Add("[NAME]", "TEXT");
489
                    dicColCheck.Add("INDEX", "INTEGER");
490
                    dicColCheck.Add("TYPE", "TEXT");
491
                    dicColCheck.Add("NAME", "TEXT");
492 492
                    if (matched == null)
493 493
                    {
494 494
                        var query = $"CREATE TABLE {PSN_NOPOCKETSETTING} ([INDEX] INTEGER, [TYPE] TEXT, [NAME] TEXT)";
......
503 503
                    }
504 504

  
505 505
                    matched = names.FirstOrDefault(param => param == PSN_AIRFINCOOLERSETTING);
506

  
506 507
                    dicColCheck.Clear();
507
                    dicColCheck.Add("[INDEX]", "INTEGER");
508
                    dicColCheck.Add("[TYPE]", "TEXT");
509
                    dicColCheck.Add("[NAME]", "TEXT");
508
                    dicColCheck.Add("INDEX", "INTEGER");
509
                    dicColCheck.Add("TYPE", "TEXT");
510
                    dicColCheck.Add("TagIdentifier", "TEXT");
511
                    dicColCheck.Add("AttributeName", "TEXT");
512
                    dicColCheck.Add("NAME", "TEXT");
513

  
510 514
                    if (matched == null)
511 515
                    {
512
                        var query = $"CREATE TABLE {PSN_AIRFINCOOLERSETTING} ([INDEX] INTEGER, [TYPE] TEXT, [NAME] TEXT)";
516
                        var query = $"CREATE TABLE {PSN_AIRFINCOOLERSETTING} ([INDEX] INTEGER, [TYPE] TEXT, [TagIdentifier] TEXT, [AttributeName] TEXT, [NAME] TEXT)";
513 517
                        using (var cmd = connection.GetSqlStringCommand(query))
514 518
                        {
515 519
                            cmd.ExecuteNonQuery();
......
1173 1177
            {
1174 1178
                try
1175 1179
                {
1176
                    var query = $@"SELECT [INDEX], [TYPE], [NAME] FROM {PSN_AIRFINCOOLERSETTING};";
1180
                    var query = $@"SELECT [INDEX], [TYPE], [TagIdentifier], [AttributeName], [NAME] FROM {PSN_AIRFINCOOLERSETTING};";
1177 1181
                    using (var ds = connection.ExecuteDataSet(connection.GetSqlStringCommand(query)))
1178 1182
                    {
1179 1183
                        dt = ds.Tables[0].Copy();
......
1387 1391

  
1388 1392
                        foreach (EquipmentAirFinCoolerItem item in keywordItems)
1389 1393
                        {
1390
                            query = $"INSERT INTO {PSN_AIRFINCOOLERSETTING} ([INDEX], [TYPE], [NAME]) VALUES (@INDEX, @TYPE, @NAME)";
1394
                            query = $"INSERT INTO {PSN_AIRFINCOOLERSETTING} ([INDEX], [TYPE], [TagIdentifier], [AttributeName], [NAME]) VALUES (@INDEX, @TYPE, @TagIdentifier, @AttributeName, @NAME)";
1391 1395
                            var cmd = connection.GetSqlStringCommand(query);
1392 1396
                            AddWithValue(cmd, "@INDEX", item.Index);
1393 1397
                            AddWithValue(cmd, "@TYPE", item.Type);
1398
                            AddWithValue(cmd, "@TagIdentifier", item.TagIdentifier);
1399
                            AddWithValue(cmd, "@AttributeName", item.AttributeName);
1394 1400
                            AddWithValue(cmd, "@NAME", item.Name);
1395 1401
                            connection.ExecuteNonQuery(cmd, txn);
1402

  
1396 1403
                        }
1397 1404

  
1398 1405
                        txn.Commit();
......
2989 2996

  
2990 2997
                    matched = names.FirstOrDefault(param => param == PSN_NOPOCKETSETTING);
2991 2998
                    dicColCheck.Clear();
2992
                    dicColCheck.Add("[INDEX]", "INTEGER");
2993
                    dicColCheck.Add("[TYPE]", "TEXT");
2994
                    dicColCheck.Add("[NAME]", "TEXT");
2999
                    dicColCheck.Add("INDEX", "INTEGER");
3000
                    dicColCheck.Add("TYPE", "TEXT");
3001
                    dicColCheck.Add("NAME", "TEXT");
2995 3002
                    if (matched == null)
2996 3003
                    {
2997 3004
                        var query = $"CREATE TABLE {PSN_NOPOCKETSETTING} ([INDEX] INTEGER, [TYPE] TEXT, [NAME] TEXT)";
......
3007 3014

  
3008 3015
                    matched = names.FirstOrDefault(param => param == PSN_AIRFINCOOLERSETTING);
3009 3016
                    dicColCheck.Clear();
3010
                    dicColCheck.Add("[INDEX]", "INTEGER");
3011
                    dicColCheck.Add("[TYPE]", "TEXT");
3012
                    dicColCheck.Add("[NAME]", "TEXT");
3017
                    dicColCheck.Add("INDEX", "INTEGER");
3018
                    dicColCheck.Add("TYPE", "TEXT");
3019
                    dicColCheck.Add("TagIdentifier", "NVARCHAR(50)");
3020
                    dicColCheck.Add("AttributeName", "NVARCHAR(255)");
3021
                    dicColCheck.Add("NAME", "TEXT");
3022

  
3013 3023
                    if (matched == null)
3014 3024
                    {
3015
                        var query = $"CREATE TABLE {PSN_AIRFINCOOLERSETTING}  ([INDEX] INTEGER, [TYPE] TEXT, [NAME] TEXT)";
3025
                        var query = $"CREATE TABLE {PSN_AIRFINCOOLERSETTING} ([INDEX] INTEGER, [TYPE] TEXT, [TagIdentifier] TEXT, [AttributeName] TEXT, [NAME] TEXT)";
3026
                       
3016 3027
                        using (var cmd = connection.GetSqlStringCommand(query))
3017 3028
                        {
3018 3029
                            cmd.ExecuteNonQuery();
......
3276 3287
        }
3277 3288

  
3278 3289
        public static bool SaveAnotherPSNData(PSN item, List<HeaderInfo> headerInfos, List<VentDrainInfo> ventDrainInfos,
3279
          List<KeywordItem> keywordItems, DataTable dtTopologyRule, DataTable dtFluidCode, DataTable dtPMC, DataTable dtInsulation, DataTable dtvalvegrouping, DataTable dtnopocket)
3290
          List<KeywordItem> keywordItems, DataTable dtTopologyRule, DataTable dtFluidCode, DataTable dtPMC, DataTable dtInsulation, DataTable dtvalvegrouping, DataTable dtnopocket, DataTable dtafc)
3280 3291
        {
3281 3292
            AnotherID2Info id2Info = AnotherID2Info.GetInstance();
3282 3293

  
......
3751 3762
                            //air fin cooler Setting
3752 3763
                            query = $"DELETE FROM {PSN_AIRFINCOOLERSETTING}";
3753 3764
                            connection.ExecuteNonQuery(connection.GetSqlStringCommand(query), txn);
3754

  
3755
                            foreach (DataRow row in dtnopocket.Rows)
3765
                             
3766
                            foreach (DataRow row in dtafc.Rows)
3756 3767
                            {
3757
                                query = $"INSERT INTO {PSN_AIRFINCOOLERSETTING} ([INDEX], [TYPE], [NAME]) VALUES (@INDEX, @TYPE, @NAME)";
3768
                                query = $"INSERT INTO {PSN_AIRFINCOOLERSETTING} ([INDEX], [TYPE], [TagIdentifier], [AttributeName], [NAME]) VALUES (@INDEX, @TYPE, @TagIdentifier, @AttributeName, @NAME)";
3758 3769
                                var cmd = connection.GetSqlStringCommand(query);
3759 3770
                                AddWithValue(cmd, "@INDEX", row["INDEX"].ToString());
3760 3771
                                AddWithValue(cmd, "@TYPE", row["TYPE"].ToString());
3772
                                AddWithValue(cmd, "@TagIdentifier", row["TagIdentifier"].ToString());
3773
                                AddWithValue(cmd, "@AttributeName", row["AttributeName"].ToString());
3761 3774
                                AddWithValue(cmd, "@NAME", row["NAME"].ToString());
3762 3775
                                connection.ExecuteNonQuery(cmd, txn);
3763 3776
                            }

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)