프로젝트

일반

사용자정보

개정판 d1afd412

IDd1afd412e5ce886a8463e2fd251633da531e4f80
상위 c3b48db0
하위 add4c093

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

issue #000: Eq Tag Pump 진행

Change-Id: Iac6d96c53d5e1a6a1085e70fb2bd699c938429a3

차이점 보기:

DTI_PID/ID2PSN/DB.cs
162 162

  
163 163
                    matched = names.FirstOrDefault(param => param == PSN_PIPESYSTEMNETWORK);
164 164
                    dicColCheck.Clear();
165
                    dicColCheck.Add("OID",                      "NVARCHAR(255)");
166
                    dicColCheck.Add("Type",                     "NVARCHAR(255)");
167
                    dicColCheck.Add("OrderNumber",              "NVARCHAR(255)");
168
                    dicColCheck.Add("Pipeline_OID",             "NVARCHAR(255)");
169
                    dicColCheck.Add("From_Data",                "NVARCHAR(255)");
165
                    dicColCheck.Add("OID", "NVARCHAR(255)");
166
                    dicColCheck.Add("Type", "NVARCHAR(255)");
167
                    dicColCheck.Add("OrderNumber", "NVARCHAR(255)");
168
                    dicColCheck.Add("Pipeline_OID", "NVARCHAR(255)");
169
                    dicColCheck.Add("From_Data", "NVARCHAR(255)");
170 170
                    dicColCheck.Add("To_Data", "NVARCHAR(255)");
171 171
                    dicColCheck.Add("TopologySet_OID_Key", "NVARCHAR(125)");
172 172
                    dicColCheck.Add("PSNRevisionNumber", "NVARCHAR(255)");
......
177 177
                    dicColCheck.Add("IncludingVirtualData", "NVARCHAR(10)");
178 178
                    dicColCheck.Add("PSNAccuracy", "REAL");
179 179
                    dicColCheck.Add("Pocket", "NVARCHAR(10)");
180
                    
180
                    dicColCheck.Add("EGTag", "NVARCHAR(255)");
181
                    dicColCheck.Add("HasMLTags", "NVARCHAR(50)");
182

  
181 183
                    if (matched == null)
182 184
                    {
183 185
                        var query = $"CREATE TABLE {PSN_PIPESYSTEMNETWORK} (OID NVARCHAR(255), Type NVARCHAR(255), OrderNumber NVARCHAR(255), Pipeline_OID NVARCHAR(255), From_Data NVARCHAR(255), " +
184 186
                            "To_Data NVARCHAR(255), TopologySet_OID_Key NVARCHAR(125), PSNRevisionNumber NVARCHAR(255), IsValid INTEGER, Status NVARCHAR(255), PBS NVARCHAR(255), Drawings NVARCHAR(255), " +
185
                            "IncludingVirtualData NVARCHAR(10), PSNAccuracy REAL, Pocket NVARCHAR(10))";
187
                            "IncludingVirtualData NVARCHAR(10), PSNAccuracy REAL, Pocket NVARCHAR(10), EGTag NVARCHAR(255), HasMLTags NVARCHAR(50))";
186 188
                        using (var cmd = connection.GetSqlStringCommand(query))
187 189
                        {
188 190
                            cmd.ExecuteNonQuery();
......
740 742

  
741 743
            return dt;
742 744
        }
743
        
745

  
744 746
        public static DataTable SelectInsulationPurpose()
745 747
        {
746 748
            DataTable dt = null;
......
852 854
            {
853 855
                try
854 856
                {
855
                   // var query = "SELECT DISTINCT Attribute, DisplayAttribute FROM SymbolAttribute;";
857
                    // var query = "SELECT DISTINCT Attribute, DisplayAttribute FROM SymbolAttribute;";
856 858
                    var query = "SELECT DISTINCT Attribute FROM SymbolAttribute;";
857 859
                    using (var ds = connection.ExecuteDataSet(connection.GetSqlStringCommand(query)))
858 860
                    {
......
1137 1139
            return dt;
1138 1140
        }
1139 1141

  
1140
  
1142

  
1141 1143
        public static DataTable SelectEquipmentNoPocketSetting()
1142 1144
        {
1143 1145
            DataTable dt = null;
......
1183 1185
                }
1184 1186
            }
1185 1187

  
1186
            return dt;            
1188
            return dt;
1187 1189
        }
1188 1190

  
1189 1191
        public static bool SaveHeaderSetting(List<HeaderInfo> headerInfos)
......
1213 1215
                        }
1214 1216
                        txn.Commit();
1215 1217
                    }
1216
                    
1218

  
1217 1219
                }
1218 1220
                catch (Exception ex)
1219 1221
                {
......
1312 1314
                    {
1313 1315
                        var query = $"DELETE FROM {PSN_TRANSFORMKEYWORD_SETTING}";
1314 1316
                        connection.ExecuteNonQuery(connection.GetSqlStringCommand(query), txn);
1315
                        
1317

  
1316 1318
                        foreach (KeywordItem item in keywordItems)
1317 1319
                        {
1318 1320
                            query = $"INSERT INTO {PSN_TRANSFORMKEYWORD_SETTING} ([INDEX], NAME, KEYWORD) VALUES (@INDEX, @NAME, @KEYWORD)";
1319 1321
                            var cmd = connection.GetSqlStringCommand(query);
1320 1322
                            AddWithValue(cmd, "@INDEX", item.Index);
1321 1323
                            AddWithValue(cmd, "@NAME", item.Name);
1322
                            AddWithValue(cmd, "@KEYWORD", item.Keyword);                            
1324
                            AddWithValue(cmd, "@KEYWORD", item.Keyword);
1323 1325
                            connection.ExecuteNonQuery(cmd, txn);
1324 1326
                        }
1325
                        
1327

  
1326 1328
                        txn.Commit();
1327 1329
                    }
1328 1330
                    catch (Exception ex)
......
1534 1536
                {
1535 1537
                    if (names.Count == 0)
1536 1538
                    {
1537
                        
1539

  
1538 1540
                        var query = $"CREATE TABLE ARS_COMMON.dbo.PSNRevision ([OID] [uniqueidentifier] ,[Project_OID] [uniqueidentifier] ," +
1539 1541
                            $"[ProjectCode] nvarchar(255), [RevNumber] int ,[UserName] nvarchar(255) ,[TimeData] nvarchar(255) ," +
1540 1542
                            $"[PSNDatabasePath] nvarchar(255) ,	[PsnByPBSFilter] varchar(20) ,[PsnByNPDFilter] varchar(20) ,[PidDrawings] int ,	" +
......
1616 1618
                                $", @PsnByPBSFilter, @PsnByNPDFilter, @PidDrawings, @PipeSystems, @PipeLines, @Topologies, @PipeSystemNetworks, @InValidPSNs, " +
1617 1619
                                $"@E2E, @E2B, @B2E, @HDE, @HD2, @HDB, @B2B, @LastModificationdate, @ID2_PSN)";
1618 1620
                            var cmd = connection.GetSqlStringCommand(query);
1619
                      
1621

  
1620 1622
                            AddWithValue(cmd, "@ProjectCode", ProjectCode);
1621 1623
                            AddWithValue(cmd, "@RevNumber", RevNumber);
1622 1624
                            AddWithValue(cmd, "@UserName", UserName);
......
1680 1682
                    using (var txn = connection.BeginTransaction())
1681 1683
                    {
1682 1684
                        try
1683
                        {                           
1684
                         
1685
                        {
1686

  
1685 1687
                            var query = $"INSERT INTO ARS_COMMON.dbo.PSNRevision (OID, Project_OID, ProjectCode, RevNumber, UserName, TimeData, PSNDatabasePath, " +
1686 1688
                                $"PsnByPBSFilter, PsnByNPDFilter, PidDrawings, PipeSystems, PipeLines, Topologies, PipeSystemNetworks, InValidPSNs, E2E, E2B, B2E, HDE, " +
1687 1689
                                $"HD2, HDB, B2B, LastModificationdate, ID2_PSN) VALUES (NEWID(), NEWID(), @ProjectCode, @RevNumber, @UserName, @TimeData, @PSNDatabasePath" +
......
1720 1722
                            // AddWithValue(cmd, "@LastModificationdate", oDateTime.ToString(ci));
1721 1723
                            AddWithValue(cmd, "@LastModificationdate", "");
1722 1724
                            AddWithValue(cmd, "@ID2_PSN", "Y");
1723
                            
1725

  
1724 1726
                            connection.ExecuteNonQuery(cmd, txn);
1725
                            
1727

  
1726 1728
                            txn.Commit();
1727 1729
                        }
1728 1730
                        catch (Exception ex)
......
1746 1748
        {
1747 1749
            ID2Info id2Info = ID2Info.GetInstance();
1748 1750

  
1749
            bool result = true;            
1751
            bool result = true;
1750 1752

  
1751 1753
            using (IAbstractDatabase connection = id2Info.CreateConnection())
1752 1754
            {
......
1888 1890
                            foreach (DataRow row in item.PipeSystemNetwork.Rows)
1889 1891
                            {
1890 1892
                                query = $"INSERT INTO {PSN_PIPESYSTEMNETWORK} " +
1891
                                    $"(OID, Type, OrderNumber, Pipeline_OID, FROM_DATA, TO_DATA, TopologySet_OID_Key, PSNRevisionNumber, PBS, Drawings, IsValid, Status, IncludingVirtualData, PSNAccuracy, Pocket) VALUES " +
1892
                                    $"(@OID, @Type, @OrderNumber, @Pipeline_OID, @FROM_DATA, @TO_DATA, @TopologySet_OID_Key, @PSNRevisionNumber,  @PBS, @Drawings, @IsValid, @Status, @IncludingVirtualData, @PSNAccuracy, @Pocket)";
1893
                                    $"(OID, Type, OrderNumber, Pipeline_OID, FROM_DATA, TO_DATA, TopologySet_OID_Key, PSNRevisionNumber, PBS, Drawings, IsValid, Status, IncludingVirtualData, PSNAccuracy, Pocket, EGTag, HasMLTags) VALUES " +
1894
                                    $"(@OID, @Type, @OrderNumber, @Pipeline_OID, @FROM_DATA, @TO_DATA, @TopologySet_OID_Key, @PSNRevisionNumber,  @PBS, @Drawings, @IsValid, @Status, @IncludingVirtualData, @PSNAccuracy, @Pocket, @EGTag, @HasMLTags)";
1893 1895
                                var cmd = connection.GetSqlStringCommand(query);
1894 1896
                                AddWithValue(cmd, "@OID", string.IsNullOrEmpty(row["OID"].ToString()) ? "" : row["OID"].ToString());
1895 1897
                                AddWithValue(cmd, "@Type", string.IsNullOrEmpty(row["Type"].ToString()) ? "" : row["Type"].ToString());
......
1922 1924

  
1923 1925
                                AddWithValue(cmd, "@Pocket", string.IsNullOrEmpty(row["Pocket"].ToString()) ? "Yes" : row["Pocket"].ToString());
1924 1926

  
1927
                                AddWithValue(cmd, "@EGTag", string.IsNullOrEmpty(row["EGTag"].ToString()) ? "" : row["EGTag"].ToString());
1928
                                AddWithValue(cmd, "@HasMLTags", string.IsNullOrEmpty(row["HasMLTags"].ToString()) ? "False" : row["HasMLTags"].ToString());
1925 1929
                                connection.ExecuteNonQuery(cmd, txn);
1926 1930
                            }
1927 1931

  
......
1960 1964
                                connection.ExecuteNonQuery(cmd, txn);
1961 1965
                            }
1962 1966

  
1963
                            if(id2Info.ID2DBType == ID2DB_Type.MSSQL)
1967
                            if (id2Info.ID2DBType == ID2DB_Type.MSSQL)
1964 1968
                            {
1965 1969
                                query = $"If(db_id(N'" + PSN_COMMON + "') IS NULL) CREATE DATABASE [" + PSN_COMMON + "]";
1966 1970
                                connection.ExecuteNonQuery(connection.GetSqlStringCommand(query), txn);
1967 1971
                            }
1968
                          
1972

  
1969 1973

  
1970 1974
                            txn.Commit();
1971 1975
                        }
......
1977 1981

  
1978 1982
                    }
1979 1983
                    void AddColumn(string TableName, Dictionary<string, string> dicCol, List<string> colnames)
1980
                    {                        
1984
                    {
1981 1985
                        bool check = false;
1982 1986
                        if (colnames != null)
1983 1987
                        {
......
2249 2253
                                    param.Value = row["UID"].ToString();
2250 2254
                                    cmd.Parameters.Add(param);
2251 2255
                                }
2252
                                
2256

  
2253 2257
                                {
2254 2258
                                    var param = cmd.CreateParameter();
2255 2259
                                    param.ParameterName = "@Code";
......
2263 2267
                                    param.Value = row["Description"].ToString();
2264 2268
                                    cmd.Parameters.Add(param);
2265 2269
                                }
2266
                                
2270

  
2267 2271
                                {
2268 2272
                                    var param = cmd.CreateParameter();
2269 2273
                                    param.ParameterName = "@Remarks";
......
2345 2349
                            newRow["PSNAccuracy"] = row["PSNAccuracy"].ToString();
2346 2350

  
2347 2351
                            newRow["Pocket"] = row["Pocket"].ToString();
2348
                            
2352

  
2353
                            newRow["EGTag"] = row["EGTag"].ToString();
2354
                            newRow["HasMLTags"] = row["HasMLTags"].ToString();
2349 2355
                            result.PipeSystemNetwork.Rows.Add(newRow);
2350 2356
                        }
2351 2357
                    }
......
2537 2543

  
2538 2544
                            newRow["PBS"] = row["PBS"].ToString();
2539 2545
                            newRow["Drawings"] = row["Drawings"].ToString();
2540
                            
2546

  
2541 2547
                            newRow["IncludingVirtualData"] = row["IncludingVirtualData"].ToString();
2542 2548
                            newRow["PSNAccuracy"] = row["PSNAccuracy"].ToString();
2543 2549

  
2544 2550
                            newRow["Pocket"] = row["Pocket"].ToString();
2545
                            
2551
                            newRow["EGTag"] = row["EGTag"].ToString();
2552
                            newRow["HasMLTags"] = row["HasMLTags"].ToString();
2553

  
2546 2554
                            dt.Rows.Add(newRow);
2547 2555
                        }
2548 2556
                    }
......
2580 2588
            return dt;
2581 2589
        }
2582 2590

  
2583
       
2591

  
2584 2592
        //Anohter DB
2585 2593
        public static bool ConnTestAndCreateAnotherTable()
2586 2594
        {
......
2675 2683
                    dicColCheck.Add("IncludingVirtualData", "NVARCHAR(10)");
2676 2684
                    dicColCheck.Add("PSNAccuracy", "REAL");
2677 2685
                    dicColCheck.Add("Pocket", "NVARCHAR(10)");
2678
                    
2686
                    dicColCheck.Add("EGTag", "NVARCHAR(255)");
2687
                    dicColCheck.Add("HasMLTags", "NVARCHAR(50)");
2688

  
2679 2689
                    if (matched == null)
2680 2690
                    {
2681 2691
                        var query = $"CREATE TABLE {PSN_PIPESYSTEMNETWORK} (OID NVARCHAR(255), Type NVARCHAR(255), OrderNumber NVARCHAR(255), Pipeline_OID NVARCHAR(255), From_Data NVARCHAR(255), " +
2682 2692
                            "To_Data NVARCHAR(255), TopologySet_OID_Key NVARCHAR(125), PSNRevisionNumber NVARCHAR(255), IsValid INTEGER, Status NVARCHAR(255), PBS NVARCHAR(255), Drawings NVARCHAR(255), " +
2683
                            "IncludingVirtualData NVARCHAR(10),  PSNAccuracy REAL, Pocket NVARCHAR(10))";
2693
                            "IncludingVirtualData NVARCHAR(10),  PSNAccuracy REAL, Pocket NVARCHAR(10), EGTag NVARCHAR(255), HasMLTags NVARCHAR(50))";
2684 2694
                        using (var cmd = connection.GetSqlStringCommand(query))
2685 2695
                        {
2686 2696
                            cmd.ExecuteNonQuery();
......
3012 3022
                    {
3013 3023
                        AddColumn(PSN_AIRFINCOOLERSETTING, dicColCheck);
3014 3024
                    }
3015
                    
3025

  
3016 3026

  
3017 3027
                    var query2 = $"If(db_id(N'" + PSN_COMMON + "') IS NULL) CREATE DATABASE [" + PSN_COMMON + "]";
3018 3028
                    if (id2Info.ID2DBType == AnotherID2DB_Type.MSSQL)
......
3098 3108
                            AddWithValue(cmd, "@UserName", UserName);
3099 3109

  
3100 3110
                            System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo("en-US");
3101
                            DateTime oDateTime = DateTime.Now;                            
3111
                            DateTime oDateTime = DateTime.Now;
3102 3112

  
3103 3113
                            AddWithValue(cmd, "@TimeData", oDateTime.ToString(ci)); //String.Format("{0:G}", dt) // DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss")
3104
                            
3114

  
3105 3115
                            AddWithValue(cmd, "@PSNDatabasePath", PSNDatabasePath);
3106 3116

  
3107 3117
                            AddWithValue(cmd, "@PsnByPBSFilter", PsnByPBSFilter);
......
3123 3133

  
3124 3134
                            AddWithValue(cmd, "@LastModificationdate", oDateTime.ToString(ci));
3125 3135
                            AddWithValue(cmd, "@ID2_PSN", "Y");
3126
                            
3136

  
3127 3137
                            connection.ExecuteNonQuery(cmd, txn);
3128 3138

  
3129 3139
                            txn.Commit();
......
3411 3421
                            foreach (DataRow row in item.PipeSystemNetwork.Rows)
3412 3422
                            {
3413 3423
                                query = $"INSERT INTO {PSN_PIPESYSTEMNETWORK} " +
3414
                                    $"(OID, Type, OrderNumber, Pipeline_OID, FROM_DATA, TO_DATA, TopologySet_OID_Key, PSNRevisionNumber, PBS, Drawings, IsValid, Status, IncludingVirtualData, PSNAccuracy, Pocket) VALUES " +
3415
                                    $"(@OID, @Type, @OrderNumber, @Pipeline_OID, @FROM_DATA, @TO_DATA, @TopologySet_OID_Key, @PSNRevisionNumber,  @PBS, @Drawings, @IsValid, @Status, @IncludingVirtualData, @PSNAccuracy, @Pocket)";
3424
                                    $"(OID, Type, OrderNumber, Pipeline_OID, FROM_DATA, TO_DATA, TopologySet_OID_Key, PSNRevisionNumber, PBS, Drawings, IsValid, Status, IncludingVirtualData, PSNAccuracy, Pocket, EGTag, HasMLTags) VALUES " +
3425
                                    $"(@OID, @Type, @OrderNumber, @Pipeline_OID, @FROM_DATA, @TO_DATA, @TopologySet_OID_Key, @PSNRevisionNumber,  @PBS, @Drawings, @IsValid, @Status, @IncludingVirtualData, @PSNAccuracy, @Pocket, @EGTag, @HasMLTags)";
3416 3426
                                var cmd = connection.GetSqlStringCommand(query);
3417 3427
                                AddWithValue(cmd, "@OID", string.IsNullOrEmpty(row["OID"].ToString()) ? "" : row["OID"].ToString());
3418 3428
                                AddWithValue(cmd, "@Type", string.IsNullOrEmpty(row["Type"].ToString()) ? "" : row["Type"].ToString());
......
3444 3454
                                    AddWithValue(cmd, "@PSNAccuracy", row["PSNAccuracy"].ToString().Replace("%", ""));
3445 3455

  
3446 3456
                                AddWithValue(cmd, "@Pocket", string.IsNullOrEmpty(row["Pocket"].ToString()) ? "Yes" : row["Pocket"].ToString());
3457
                                AddWithValue(cmd, "@EGTag", string.IsNullOrEmpty(row["EGTag"].ToString()) ? "" : row["EGTag"].ToString());
3458
                                AddWithValue(cmd, "@HasMLTags", string.IsNullOrEmpty(row["HasMLTags"].ToString()) ? "False" : row["HasMLTags"].ToString());
3459

  
3447 3460
                                connection.ExecuteNonQuery(cmd, txn);
3448 3461
                            }
3449 3462

  
......
3748 3761
                                AddWithValue(cmd, "@NAME", row["NAME"].ToString());
3749 3762
                                connection.ExecuteNonQuery(cmd, txn);
3750 3763
                            }
3751
                            
3764

  
3752 3765

  
3753 3766
                            txn.Commit();
3754 3767
                        }
......
3782 3795
                    {
3783 3796
                        try
3784 3797
                        {
3785
                            
3798

  
3786 3799
                            var query = $"If(db_id(N'" + PSN_COMMON + "') IS NULL) CREATE DATABASE [" + PSN_COMMON + "]";
3787 3800
                            if (id2Info.ID2DBType == AnotherID2DB_Type.MSSQL)
3788
                            {                                
3801
                            {
3789 3802
                                connection.ExecuteNonQuery(connection.GetSqlStringCommand(query), txn);
3790 3803
                            }
3791 3804

  
DTI_PID/ID2PSN/Form/EquipmentNoPocketSetting.Designer.cs
74 74
            this.ribbonControl.ShowDisplayOptionsMenuButton = DevExpress.Utils.DefaultBoolean.False;
75 75
            this.ribbonControl.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.ShowOnMultiplePages;
76 76
            this.ribbonControl.ShowToolbarCustomizeItem = false;
77
            this.ribbonControl.Size = new System.Drawing.Size(631, 32);
77
            this.ribbonControl.Size = new System.Drawing.Size(639, 32);
78 78
            this.ribbonControl.Toolbar.ShowCustomizeItem = false;
79 79
            // 
80 80
            // layoutControl1
......
88 88
            this.layoutControl1.Name = "layoutControl1";
89 89
            this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(488, 408, 650, 400);
90 90
            this.layoutControl1.Root = this.Root;
91
            this.layoutControl1.Size = new System.Drawing.Size(631, 643);
91
            this.layoutControl1.Size = new System.Drawing.Size(639, 647);
92 92
            this.layoutControl1.TabIndex = 1;
93 93
            this.layoutControl1.Text = "layoutControl1";
94 94
            // 
......
98 98
            this.gridEquipment.MainView = this.gridViewEquipment;
99 99
            this.gridEquipment.MenuManager = this.ribbonControl;
100 100
            this.gridEquipment.Name = "gridEquipment";
101
            this.gridEquipment.Size = new System.Drawing.Size(583, 510);
101
            this.gridEquipment.Size = new System.Drawing.Size(591, 514);
102 102
            this.gridEquipment.TabIndex = 4;
103 103
            this.gridEquipment.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
104 104
            this.gridViewEquipment});
......
112 112
            // btnClose
113 113
            // 
114 114
            this.btnClose.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btnClose.ImageOptions.Image")));
115
            this.btnClose.Location = new System.Drawing.Point(549, 595);
115
            this.btnClose.Location = new System.Drawing.Point(557, 599);
116 116
            this.btnClose.Name = "btnClose";
117 117
            this.btnClose.Size = new System.Drawing.Size(70, 36);
118 118
            this.btnClose.StyleController = this.layoutControl1;
......
123 123
            // btnSave
124 124
            // 
125 125
            this.btnSave.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btnSave.ImageOptions.Image")));
126
            this.btnSave.Location = new System.Drawing.Point(457, 595);
126
            this.btnSave.Location = new System.Drawing.Point(465, 599);
127 127
            this.btnSave.Name = "btnSave";
128 128
            this.btnSave.Size = new System.Drawing.Size(68, 36);
129 129
            this.btnSave.StyleController = this.layoutControl1;
......
133 133
            // 
134 134
            // btnAddValveGroup
135 135
            // 
136
            this.btnAddValveGroup.Location = new System.Drawing.Point(478, 43);
136
            this.btnAddValveGroup.Location = new System.Drawing.Point(484, 43);
137 137
            this.btnAddValveGroup.Name = "btnAddValveGroup";
138
            this.btnAddValveGroup.Size = new System.Drawing.Size(129, 22);
138
            this.btnAddValveGroup.Size = new System.Drawing.Size(131, 22);
139 139
            this.btnAddValveGroup.StyleController = this.layoutControl1;
140 140
            this.btnAddValveGroup.TabIndex = 2;
141 141
            this.btnAddValveGroup.Text = " Add Equipment";
......
152 152
            this.emptySpaceItem2,
153 153
            this.layoutControlGroup2});
154 154
            this.Root.Name = "Root";
155
            this.Root.Size = new System.Drawing.Size(631, 643);
155
            this.Root.Size = new System.Drawing.Size(639, 647);
156 156
            this.Root.TextVisible = false;
157 157
            // 
158 158
            // emptySpaceItem3
159 159
            // 
160 160
            this.emptySpaceItem3.AllowHotTrack = false;
161
            this.emptySpaceItem3.Location = new System.Drawing.Point(0, 583);
161
            this.emptySpaceItem3.Location = new System.Drawing.Point(0, 587);
162 162
            this.emptySpaceItem3.Name = "emptySpaceItem3";
163
            this.emptySpaceItem3.Size = new System.Drawing.Size(445, 40);
163
            this.emptySpaceItem3.Size = new System.Drawing.Size(453, 40);
164 164
            this.emptySpaceItem3.TextSize = new System.Drawing.Size(0, 0);
165 165
            // 
166 166
            // layoutControlItem4
167 167
            // 
168 168
            this.layoutControlItem4.Control = this.btnSave;
169
            this.layoutControlItem4.Location = new System.Drawing.Point(445, 583);
169
            this.layoutControlItem4.Location = new System.Drawing.Point(453, 587);
170 170
            this.layoutControlItem4.MaxSize = new System.Drawing.Size(72, 40);
171 171
            this.layoutControlItem4.MinSize = new System.Drawing.Size(72, 40);
172 172
            this.layoutControlItem4.Name = "layoutControlItem4";
......
178 178
            // layoutControlItem5
179 179
            // 
180 180
            this.layoutControlItem5.Control = this.btnClose;
181
            this.layoutControlItem5.Location = new System.Drawing.Point(537, 583);
181
            this.layoutControlItem5.Location = new System.Drawing.Point(545, 587);
182 182
            this.layoutControlItem5.MaxSize = new System.Drawing.Size(74, 40);
183 183
            this.layoutControlItem5.MinSize = new System.Drawing.Size(74, 40);
184 184
            this.layoutControlItem5.Name = "layoutControlItem5";
......
190 190
            // emptySpaceItem2
191 191
            // 
192 192
            this.emptySpaceItem2.AllowHotTrack = false;
193
            this.emptySpaceItem2.Location = new System.Drawing.Point(517, 583);
193
            this.emptySpaceItem2.Location = new System.Drawing.Point(525, 587);
194 194
            this.emptySpaceItem2.MaxSize = new System.Drawing.Size(20, 40);
195 195
            this.emptySpaceItem2.MinSize = new System.Drawing.Size(20, 40);
196 196
            this.emptySpaceItem2.Name = "emptySpaceItem2";
......
207 207
            this.emptySpaceItem1});
208 208
            this.layoutControlGroup2.Location = new System.Drawing.Point(0, 0);
209 209
            this.layoutControlGroup2.Name = "layoutControlGroup2";
210
            this.layoutControlGroup2.Size = new System.Drawing.Size(611, 583);
210
            this.layoutControlGroup2.Size = new System.Drawing.Size(619, 587);
211 211
            this.layoutControlGroup2.Text = "Equipment No Pocket Items";
212 212
            // 
213 213
            // layoutControlItem6
......
215 215
            this.layoutControlItem6.Control = this.gridEquipment;
216 216
            this.layoutControlItem6.Location = new System.Drawing.Point(0, 26);
217 217
            this.layoutControlItem6.Name = "layoutControlItem6";
218
            this.layoutControlItem6.Size = new System.Drawing.Size(587, 514);
218
            this.layoutControlItem6.Size = new System.Drawing.Size(595, 518);
219 219
            this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
220 220
            this.layoutControlItem6.TextVisible = false;
221 221
            // 
222 222
            // layoutControlItem3
223 223
            // 
224 224
            this.layoutControlItem3.Control = this.btnAddValveGroup;
225
            this.layoutControlItem3.Location = new System.Drawing.Point(454, 0);
225
            this.layoutControlItem3.Location = new System.Drawing.Point(460, 0);
226 226
            this.layoutControlItem3.Name = "layoutControlItem3";
227
            this.layoutControlItem3.Size = new System.Drawing.Size(133, 26);
227
            this.layoutControlItem3.Size = new System.Drawing.Size(135, 26);
228 228
            this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
229 229
            this.layoutControlItem3.TextVisible = false;
230 230
            // 
......
233 233
            this.emptySpaceItem1.AllowHotTrack = false;
234 234
            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 0);
235 235
            this.emptySpaceItem1.Name = "emptySpaceItem1";
236
            this.emptySpaceItem1.Size = new System.Drawing.Size(454, 26);
236
            this.emptySpaceItem1.Size = new System.Drawing.Size(460, 26);
237 237
            this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
238 238
            // 
239 239
            // EquipmentNoPocketSetting
240 240
            // 
241 241
            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
242 242
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
243
            this.ClientSize = new System.Drawing.Size(631, 675);
243
            this.ClientSize = new System.Drawing.Size(639, 679);
244 244
            this.Controls.Add(this.layoutControl1);
245 245
            this.Controls.Add(this.ribbonControl);
246 246
            this.Name = "EquipmentNoPocketSetting";
DTI_PID/ID2PSN/Form/EquipmentSetting.Designer.cs
84 84
            this.ribbonControl.ShowDisplayOptionsMenuButton = DevExpress.Utils.DefaultBoolean.False;
85 85
            this.ribbonControl.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.ShowOnMultiplePages;
86 86
            this.ribbonControl.ShowToolbarCustomizeItem = false;
87
            this.ribbonControl.Size = new System.Drawing.Size(626, 32);
87
            this.ribbonControl.Size = new System.Drawing.Size(634, 32);
88 88
            this.ribbonControl.Toolbar.ShowCustomizeItem = false;
89 89
            // 
90 90
            // layoutControl1
......
97 97
            this.layoutControl1.Name = "layoutControl1";
98 98
            this.layoutControl1.OptionsView.UseDefaultDragAndDropRendering = false;
99 99
            this.layoutControl1.Root = this.Root;
100
            this.layoutControl1.Size = new System.Drawing.Size(626, 678);
100
            this.layoutControl1.Size = new System.Drawing.Size(634, 682);
101 101
            this.layoutControl1.TabIndex = 1;
102 102
            this.layoutControl1.Text = "layoutControl1";
103 103
            // 
104 104
            // btnClose
105 105
            // 
106 106
            this.btnClose.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btnClose.ImageOptions.Image")));
107
            this.btnClose.Location = new System.Drawing.Point(544, 630);
107
            this.btnClose.Location = new System.Drawing.Point(552, 634);
108 108
            this.btnClose.Name = "btnClose";
109 109
            this.btnClose.Size = new System.Drawing.Size(70, 36);
110 110
            this.btnClose.StyleController = this.layoutControl1;
......
115 115
            // btnSave
116 116
            // 
117 117
            this.btnSave.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btnSave.ImageOptions.Image")));
118
            this.btnSave.Location = new System.Drawing.Point(452, 630);
118
            this.btnSave.Location = new System.Drawing.Point(460, 634);
119 119
            this.btnSave.Name = "btnSave";
120 120
            this.btnSave.Size = new System.Drawing.Size(68, 36);
121 121
            this.btnSave.StyleController = this.layoutControl1;
......
128 128
            this.xtraTabControlSetting.Location = new System.Drawing.Point(12, 12);
129 129
            this.xtraTabControlSetting.Name = "xtraTabControlSetting";
130 130
            this.xtraTabControlSetting.SelectedTabPage = this.xtraTabPageNoPocket;
131
            this.xtraTabControlSetting.Size = new System.Drawing.Size(602, 614);
131
            this.xtraTabControlSetting.Size = new System.Drawing.Size(610, 618);
132 132
            this.xtraTabControlSetting.TabIndex = 4;
133 133
            this.xtraTabControlSetting.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
134 134
            this.xtraTabPageNoPocket,
......
138 138
            // 
139 139
            this.xtraTabPageNoPocket.Controls.Add(this.tableLayoutPanel1);
140 140
            this.xtraTabPageNoPocket.Name = "xtraTabPageNoPocket";
141
            this.xtraTabPageNoPocket.Size = new System.Drawing.Size(600, 588);
141
            this.xtraTabPageNoPocket.Size = new System.Drawing.Size(608, 592);
142 142
            this.xtraTabPageNoPocket.Text = "Equipment for No pocket";
143 143
            // 
144 144
            // tableLayoutPanel1
......
153 153
            this.tableLayoutPanel1.RowCount = 2;
154 154
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
155 155
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 556F));
156
            this.tableLayoutPanel1.Size = new System.Drawing.Size(600, 588);
156
            this.tableLayoutPanel1.Size = new System.Drawing.Size(608, 592);
157 157
            this.tableLayoutPanel1.TabIndex = 1;
158 158
            // 
159 159
            // gridEquipment
160 160
            // 
161 161
            this.gridEquipment.Dock = System.Windows.Forms.DockStyle.Fill;
162
            this.gridEquipment.Location = new System.Drawing.Point(3, 35);
162
            this.gridEquipment.Location = new System.Drawing.Point(3, 39);
163 163
            this.gridEquipment.MainView = this.gridViewEquipment;
164 164
            this.gridEquipment.MenuManager = this.ribbonControl;
165 165
            this.gridEquipment.Name = "gridEquipment";
166
            this.gridEquipment.Size = new System.Drawing.Size(594, 550);
166
            this.gridEquipment.Size = new System.Drawing.Size(602, 550);
167 167
            this.gridEquipment.TabIndex = 5;
168 168
            this.gridEquipment.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
169 169
            this.gridViewEquipment});
......
177 177
            // simpleButton1
178 178
            // 
179 179
            this.simpleButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
180
            this.simpleButton1.Location = new System.Drawing.Point(487, 3);
180
            this.simpleButton1.Location = new System.Drawing.Point(495, 3);
181 181
            this.simpleButton1.Name = "simpleButton1";
182 182
            this.simpleButton1.Size = new System.Drawing.Size(110, 22);
183 183
            this.simpleButton1.StyleController = this.layoutControl1;
......
189 189
            // 
190 190
            this.xtraTabPageAirPinCooler.Controls.Add(this.tableLayoutPanel2);
191 191
            this.xtraTabPageAirPinCooler.Name = "xtraTabPageAirPinCooler";
192
            this.xtraTabPageAirPinCooler.Size = new System.Drawing.Size(600, 588);
192
            this.xtraTabPageAirPinCooler.Size = new System.Drawing.Size(608, 592);
193 193
            this.xtraTabPageAirPinCooler.Text = "Equipment Grouping Tag";
194 194
            // 
195 195
            // tableLayoutPanel2
......
204 204
            this.tableLayoutPanel2.RowCount = 2;
205 205
            this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 4.965754F));
206 206
            this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 95.03425F));
207
            this.tableLayoutPanel2.Size = new System.Drawing.Size(600, 588);
207
            this.tableLayoutPanel2.Size = new System.Drawing.Size(608, 592);
208 208
            this.tableLayoutPanel2.TabIndex = 1;
209 209
            // 
210 210
            // gridControlAirFinCooler
......
214 214
            this.gridControlAirFinCooler.MainView = this.gridViewAirFinCooler;
215 215
            this.gridControlAirFinCooler.MenuManager = this.ribbonControl;
216 216
            this.gridControlAirFinCooler.Name = "gridControlAirFinCooler";
217
            this.gridControlAirFinCooler.Size = new System.Drawing.Size(594, 553);
217
            this.gridControlAirFinCooler.Size = new System.Drawing.Size(602, 557);
218 218
            this.gridControlAirFinCooler.TabIndex = 0;
219 219
            this.gridControlAirFinCooler.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
220 220
            this.gridViewAirFinCooler});
......
228 228
            // btnAddValveGroup
229 229
            // 
230 230
            this.btnAddValveGroup.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
231
            this.btnAddValveGroup.Location = new System.Drawing.Point(487, 3);
231
            this.btnAddValveGroup.Location = new System.Drawing.Point(495, 3);
232 232
            this.btnAddValveGroup.Name = "btnAddValveGroup";
233 233
            this.btnAddValveGroup.Size = new System.Drawing.Size(110, 22);
234 234
            this.btnAddValveGroup.StyleController = this.layoutControl1;
......
247 247
            this.emptySpaceItem1,
248 248
            this.emptySpaceItem2});
249 249
            this.Root.Name = "Root";
250
            this.Root.Size = new System.Drawing.Size(626, 678);
250
            this.Root.Size = new System.Drawing.Size(634, 682);
251 251
            this.Root.TextVisible = false;
252 252
            // 
253 253
            // layoutControlItem1
......
255 255
            this.layoutControlItem1.Control = this.xtraTabControlSetting;
256 256
            this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
257 257
            this.layoutControlItem1.Name = "layoutControlItem1";
258
            this.layoutControlItem1.Size = new System.Drawing.Size(606, 618);
258
            this.layoutControlItem1.Size = new System.Drawing.Size(614, 622);
259 259
            this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
260 260
            this.layoutControlItem1.TextVisible = false;
261 261
            // 
262 262
            // layoutControlItem2
263 263
            // 
264 264
            this.layoutControlItem2.Control = this.btnSave;
265
            this.layoutControlItem2.Location = new System.Drawing.Point(440, 618);
265
            this.layoutControlItem2.Location = new System.Drawing.Point(448, 622);
266 266
            this.layoutControlItem2.MaxSize = new System.Drawing.Size(72, 40);
267 267
            this.layoutControlItem2.MinSize = new System.Drawing.Size(72, 40);
268 268
            this.layoutControlItem2.Name = "layoutControlItem2";
......
274 274
            // layoutControlItem3
275 275
            // 
276 276
            this.layoutControlItem3.Control = this.btnClose;
277
            this.layoutControlItem3.Location = new System.Drawing.Point(532, 618);
277
            this.layoutControlItem3.Location = new System.Drawing.Point(540, 622);
278 278
            this.layoutControlItem3.MaxSize = new System.Drawing.Size(74, 40);
279 279
            this.layoutControlItem3.MinSize = new System.Drawing.Size(74, 40);
280 280
            this.layoutControlItem3.Name = "layoutControlItem3";
......
286 286
            // emptySpaceItem1
287 287
            // 
288 288
            this.emptySpaceItem1.AllowHotTrack = false;
289
            this.emptySpaceItem1.Location = new System.Drawing.Point(512, 618);
289
            this.emptySpaceItem1.Location = new System.Drawing.Point(520, 622);
290 290
            this.emptySpaceItem1.MaxSize = new System.Drawing.Size(20, 40);
291 291
            this.emptySpaceItem1.MinSize = new System.Drawing.Size(20, 40);
292 292
            this.emptySpaceItem1.Name = "emptySpaceItem1";
......
297 297
            // emptySpaceItem2
298 298
            // 
299 299
            this.emptySpaceItem2.AllowHotTrack = false;
300
            this.emptySpaceItem2.Location = new System.Drawing.Point(0, 618);
300
            this.emptySpaceItem2.Location = new System.Drawing.Point(0, 622);
301 301
            this.emptySpaceItem2.Name = "emptySpaceItem2";
302
            this.emptySpaceItem2.Size = new System.Drawing.Size(440, 40);
302
            this.emptySpaceItem2.Size = new System.Drawing.Size(448, 40);
303 303
            this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
304 304
            // 
305 305
            // EquipmentSetting
306 306
            // 
307 307
            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
308 308
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
309
            this.ClientSize = new System.Drawing.Size(626, 710);
309
            this.ClientSize = new System.Drawing.Size(634, 714);
310 310
            this.Controls.Add(this.layoutControl1);
311 311
            this.Controls.Add(this.ribbonControl);
312 312
            this.Name = "EquipmentSetting";
DTI_PID/ID2PSN/Form/MainForm.cs
345 345
                            || selectRow["Drawings"].ToString() != row["Drawings"].ToString()
346 346
                            || selectRow["IncludingVirtualData"].ToString() != row["IncludingVirtualData"].ToString()
347 347
                            || Convert.ToDouble(selectRow["PSNAccuracy"].ToString().Replace("%", "")) != Convert.ToDouble(row["PSNAccuracy"].ToString().Replace("%", ""))
348
                            || selectRow["Pocket"].ToString() != row["Pocket"].ToString())
348
                            || selectRow["Pocket"].ToString() != row["Pocket"].ToString()
349
                            || selectRow["EGTag"].ToString() != row["EGTag"].ToString()
350
                            || selectRow["HasMLTags"].ToString() != row["HasMLTags"].ToString())
349 351
                        {
350 352
                            bCheck = true;
351 353
                        }
......
523 525
            PSNPageDT.Columns.Add("Status", typeof(string));                   
524 526
            PSNPageDT.Columns.Add("IncludingVirtualData", typeof(string));
525 527
            PSNPageDT.Columns.Add("PSNAccuracy", typeof(string));
526
            PSNPageDT.Columns.Add("Pocket", typeof(string));            
528
            PSNPageDT.Columns.Add("Pocket", typeof(string));
529
            PSNPageDT.Columns.Add("EGTag", typeof(string));
530
            PSNPageDT.Columns.Add("HasMLTags", typeof(string));
527 531
            PSNPageDT.Columns.Add("Show", typeof(string));
528 532

  
529 533

  
......
657 661
                newRow["PSNAccuracy"] = String.Format("{0:0.00}", Convert.ToDouble(row["PSNAccuracy"])) + "%";
658 662

  
659 663
                newRow["Pocket"] = row["Pocket"].ToString();
660
                
664
                newRow["EGTag"] = row["EGTag"].ToString();
665
                newRow["HasMLTags"] = row["HasMLTags"].ToString();
661 666
                PSNPageDT.Rows.Add(newRow);
662 667
            }
663 668

  
DTI_PID/ID2PSN/Form/MainForm.resx
118 118
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119 119
  </resheader>
120 120
  <metadata name="defaultLookAndFeel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
121
    <value>197, 17</value>
121
    <value>17, 56</value>
122 122
  </metadata>
123 123
  <assembly alias="DevExpress.Data.v19.1" name="DevExpress.Data.v19.1, Version=19.1.2.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
124 124
  <data name="btnExportPSN.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v19.1" mimetype="application/x-microsoft.net.object.bytearray.base64">
......
234 234
</value>
235 235
  </data>
236 236
  <metadata name="contextMenuPSN.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
237
    <value>359, 17</value>
237
    <value>17, 95</value>
238 238
  </metadata>
239 239
  <metadata name="sqLiteCommandBuilder1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
240
    <value>507, 17</value>
240
    <value>17, 134</value>
241 241
  </metadata>
242 242
  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
243 243
    <value>48</value>
DTI_PID/ID2PSN/PSN.cs
253 253
            try
254 254
            {
255 255
                int afcTagNum = 0;
256

  
256
                int pumpTagNum = 0;
257 257
                #region EquipmentAirFinCooler Info
258 258
                EquipmentAirFinCoolerInfo EquipmentAirFinCooler = new EquipmentAirFinCoolerInfo();
259 259
                DataTable dtEquipmentAirFinCooler = DB.SelectAirFinCoolerSetting();
260 260
                foreach (DataRow row in dtEquipmentAirFinCooler.Rows)
261 261
                {
262
                    //pump type도 마찬가지?
263 262
                    EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Add(new EquipmentAirFinCoolerItem()
264 263
                    {
265 264
                        Type = row["Type"].ToString(),
......
269 268
                #endregion
270 269

  
271 270
                DataRow[] airFinCoolerRows = PipeSystemNetwork.Select("AFC = 'P1'");
271
                DataRow[] pumpRows = PipeSystemNetwork.Select("PUMP = 'PUMP'");
272
                // 1, 2번
273
                foreach (DataRow dataRow in pumpRows) 
274
                {
275
                    pumpTagNum++;
276

  
277
                    DataRow[] pathItemRows = PathItems.Select(string.Format("PipeSystemNetwork_OID = '{0}'", dataRow["OID"].ToString()));
278

  
279
                    string EGFlowDirection = string.Empty;
280
                    if (EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Where(x => x.Type == "Pump" && dataRow["From_Data"].ToString().Contains(x.Name)).Count() > 0)
281
                        EGFlowDirection = "O";
282
                    else if (EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Where(x => x.Type == "Pump" && dataRow["To_Data"].ToString().Contains(x.Name)).Count() > 0)
283
                        EGFlowDirection = "I";
284

  
285

  
286
                    foreach (DataRow dr in pathItemRows)
287
                    {
288
                        dr["EqpGroupTag"] = "PUMP" + string.Format("-{0}", string.Format("{0:D3}", pumpTagNum));                       
289
                        dr["EGFlowDirection"] = EGFlowDirection;
290
                    }
291
                }
292

  
293
                // 3, 4번
294
                foreach (DataRow dataRow in pumpRows) 
295
                {
296

  
297
                    DataRow[] pathItemRows = PathItems.Select(string.Format("PipeSystemNetwork_OID = '{0}'", dataRow["OID"].ToString()));
298

  
299
                    string EGFlowDirection = string.Empty;
300
                    if (EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Where(x => x.Type == "Pump" && dataRow["From_Data"].ToString().Contains(x.Name)).Count() > 0)
301
                        EGFlowDirection = "O";
302
                    else if (EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Where(x => x.Type == "Pump" && dataRow["To_Data"].ToString().Contains(x.Name)).Count() > 0)
303
                        EGFlowDirection = "I";
304

  
305
                    List<string> lstViewPipeSystemNetwork_OID = new List<string>();
306

  
307
                    foreach (DataRow dr in pathItemRows)
308
                    {
309
                        if(dr.Field<string>("ViewPipeSystemNetwork_OID") != dataRow["OID"].ToString())
310
                        {
311
                            string viewEGFlowDirection = string.Empty;
312
                            if (PipeSystemNetwork.Select(string.Format("OID = '{0}'", dr.Field<string>("ViewPipeSystemNetwork_OID"))).Count() > 0)
313
                            {
314
                                DataRow data = PipeSystemNetwork.Select(string.Format("OID = '{0}'", dr.Field<string>("ViewPipeSystemNetwork_OID"))).First();
315
                                if (EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Where(x => x.Type == "Pump" && data["From_Data"].ToString().Contains(x.Name)).Count() > 0)
316
                                    viewEGFlowDirection = "O";
317
                                else if (EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Where(x => x.Type == "Pump" && data["To_Data"].ToString().Contains(x.Name)).Count() > 0)
318
                                    viewEGFlowDirection = "I";
319

  
320
                                if (EGFlowDirection.Equals(viewEGFlowDirection) && !lstViewPipeSystemNetwork_OID.Contains(dr.Field<string>("ViewPipeSystemNetwork_OID")))
321
                                    lstViewPipeSystemNetwork_OID.Add(dr.Field<string>("ViewPipeSystemNetwork_OID"));
322
                            }
323
                            else
324
                            {
325
                            }
326
                        }
327
                    }
328

  
329
                    string selectViewOID = string.Empty;
330

  
331
                    if (EGFlowDirection == "O") //From 이면 시작점에서 제일 먼 값
332
                    {
333
                        foreach (string viewOID in lstViewPipeSystemNetwork_OID)
334
                        {
335
                            if (PipeSystemNetwork.Select(string.Format("PUMP = 'PUMP' AND OID = '{0}'", viewOID)).Count() > 0)
336
                            {                                
337
                                selectViewOID = pathItemRows.Where(x => x.Field<string>("ViewPipeSystemNetwork_OID") == viewOID).Last().Field<string>("OID");
338
                            }
339
                        }
340
                    }
341
                    else if (EGFlowDirection == "I") //To 이면 시작점에서 제일 가까운 값
342
                    {
343
                        foreach (string viewOID in lstViewPipeSystemNetwork_OID)
344
                        {
345
                            if (PipeSystemNetwork.Select(string.Format("PUMP = 'PUMP' AND OID = '{0}'", viewOID)).Count() > 0)
346
                            {
347
                                selectViewOID = pathItemRows.Where(x => x.Field<string>("ViewPipeSystemNetwork_OID") == viewOID).Last().Field<string>("OID");
348
                                break;
349
                            }
350
                        }
351
                    }
352

  
353
                    if (!string.IsNullOrEmpty(selectViewOID)) //selectViewOID 가 있으면
354
                    {              
355
                        string EqpGroupTag = string.Empty;                       
356

  
357
                        if (lstViewPipeSystemNetwork_OID.Contains(pathItemRows.First().Field<string>("ViewPipeSystemNetwork_OID")))
358
                        {
359
                            DataRow[] viewpathItemRows = PathItems.Select(string.Format("PipeSystemNetwork_OID = '{0}'", pathItemRows.First().Field<string>("ViewPipeSystemNetwork_OID")));
360

  
361
                            foreach (DataRow row in viewpathItemRows)
362
                            {
363
                                if (!string.IsNullOrEmpty(row.Field<string>("EqpGroupTag")))
364
                                {
365
                                    EqpGroupTag = row.Field<string>("EqpGroupTag");
366
                                    break;
367
                                }
368
                            }
369

  
370
                            foreach (DataRow dr in pathItemRows)
371
                            {
372
                                dr["EqpGroupTag"] = EqpGroupTag;
373
                            }
374

  
375
                        }
376
                        else
377
                        {
378
                            bool bCheck = false;
379
                            if (EGFlowDirection == "I") //From (B) Case 일 때,
380
                            {
381
                                foreach (DataRow dr in pathItemRows)
382
                                {
383
                                    if (!bCheck)
384
                                    {
385
                                        dr["MainLineTag"] = "M";
386
                                    }
387
                                    else
388
                                    {
389
                                        dr["EqpGroupTag"] = string.Empty;
390
                                        dr["MainLineTag"] = string.Empty;
391
                                        dr["EGTConnectedPoint"] = "0";
392
                                    }
393

  
394
                                    if (selectViewOID == dr["OID"].ToString())
395
                                    {
396
                                        dr["EGTConnectedPoint"] = "1";
397
                                        bCheck = true;
398
                                    }
399
                                }
400

  
401
                            }
402
                            else if (EGFlowDirection == "O") //To(A) Case 일 때,
403
                            {
404
                                foreach (DataRow dr in pathItemRows)
405
                                {
406
                                    if (!bCheck)
407
                                    {
408
                                        dr["EqpGroupTag"] = string.Empty;
409
                                        dr["MainLineTag"] = string.Empty;
410
                                        dr["EGTConnectedPoint"] = "0";
411
                                    }
412
                                    else
413
                                    {
414
                                        dr["MainLineTag"] = "M";
415
                                    }
416

  
417
                                    if (selectViewOID == dr["OID"].ToString())
418
                                    {
419
                                        dr["EGTConnectedPoint"] = "1";
420
                                        bCheck = true;
421
                                    }
422
                                }
423
                            }
424
                        }
425
                    }
426
                    else
427
                    {
428
                        foreach (DataRow dr in pathItemRows)
429
                        {
430
                            dr["EqpGroupTag"] = string.Empty;
431
                            dr["EGFlowDirection"] = string.Empty;
432
                        }
433
                    }
434
                }
435
                                
436
                // 5번
437
                foreach (DataRow dataRow in pumpRows)
438
                {
439
                    DataRow[] pathItemRows = PathItems.Select(string.Format("PipeSystemNetwork_OID = '{0}'", dataRow["OID"].ToString()));
440

  
441
                    bool bCheck = false;
442
                    string EqpGroupTag = string.Empty;
443

  
444
                    string EGFlowDirection = string.Empty;
445
                    if (EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Where(x => x.Type == "Pump" && dataRow["From_Data"].ToString().Contains(x.Name)).Count() > 0)
446
                        EGFlowDirection = "I";
447
                    else if (EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Where(x => x.Type == "Pump" && dataRow["To_Data"].ToString().Contains(x.Name)).Count() > 0)
448
                        EGFlowDirection = "O";
449

  
450
                    List<string> lstViewPipeSystemNetwork_OID = new List<string>();
451

  
452
                    if (EGFlowDirection.Equals("I"))
453
                    {
454
                        foreach (DataRow dr in pathItemRows)
455
                        {
456
                            if (!string.IsNullOrEmpty(dr.Field<string>("MainLineTag")) && dr.Field<string>("MainLineTag").Equals("M"))
457
                                bCheck = true;
458

  
459
                            if (!string.IsNullOrEmpty(dr.Field<string>("EqpGroupTag")))
460
                                EqpGroupTag = dr.Field<string>("EqpGroupTag");
461

  
462
                            if (bCheck && !string.IsNullOrEmpty(EqpGroupTag))
463
                                break;
464
                        }
465

  
466
                        foreach (DataRow dr in pathItemRows)
467
                        {
468
                            if (!string.IsNullOrEmpty(dr.Field<string>("EqpGroupTag")) && EqpGroupTag.Equals(dr.Field<string>("EqpGroupTag")) &&
469
                                !dataRow["OID"].ToString().Equals(dr.Field<string>("ViewPipeSystemNetwork_OID")))
470
                            {
471
                                lstViewPipeSystemNetwork_OID.Add(dr.Field<string>("ViewPipeSystemNetwork_OID"));
472
                            }
473
                        }
474
                        
475
                        if (bCheck && lstViewPipeSystemNetwork_OID.Count() > 0)
476
                        {
477
                            foreach (string viewPipesystem in lstViewPipeSystemNetwork_OID)
478
                            {
479
                                if (PipeSystemNetwork.Select(string.Format("OID = '{0}'", viewPipesystem)).Count() == 0)
480
                                    continue;
481

  
482
                                DataRow dr = PipeSystemNetwork.Select(string.Format("OID = '{0}'", viewPipesystem)).First();
483

  
484
                                if (EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Where(x => x.Type == "Pump" && dr["From_Data"].ToString().Contains(x.Name)).Count() > 0) 
485
                                {
486
                                    string selectViewOID = string.Empty;
487
                                    DataRow[] viewpathItemRows = PathItems.Select(string.Format("PipeSystemNetwork_OID = '{0}'", viewPipesystem));
488
                                    foreach (DataRow viewdr in viewpathItemRows)
489
                                    {
490
                                        if (!string.IsNullOrEmpty(viewdr["EqpGroupTag"].ToString()))
491
                                            viewdr["EqpGroupTag"] = EqpGroupTag;
492
                                    }
493
                                }
494

  
495
                              
496
                            }
497
                        }
498
                    }
499
                   
500
                }
501
                
272 502
                foreach (DataRow dataRow in airFinCoolerRows)
273 503
                {
274 504
                    afcTagNum++;
......
446 676
                        }
447 677
                    }
448 678
                }
679

  
680
                //psn data 정리
681
                foreach(DataRow pipesystem in PipeSystemNetwork.Rows)
682
                {
683
                    DataRow[] pathItemRows = PathItems.Select(string.Format("PipeSystemNetwork_OID = '{0}'", pipesystem["OID"].ToString()));
684
                    string EGTag = string.Empty;
685
                    string HasMLTags = "False";
686

  
687
                    foreach (DataRow dataRow in pathItemRows)
688
                    {
689
                        if (string.IsNullOrEmpty(EGTag) && !string.IsNullOrEmpty(dataRow.Field<string>("EqpGroupTag")))
690
                            EGTag = dataRow.Field<string>("EqpGroupTag");
691

  
692
                        if (HasMLTags.Equals("False") && !string.IsNullOrEmpty(dataRow.Field<string>("MainLineTag")) && dataRow.Field<string>("MainLineTag").Equals("M"))
693
                            HasMLTags = "True";
694

  
695
                        if (!string.IsNullOrEmpty(EGTag) && HasMLTags == "True")
696
                            break;
697
                    }
698

  
699
                    pipesystem["EGTag"] = EGTag;
700
                    pipesystem["HasMLTags"] = HasMLTags;
701
                }
449 702
            }
450 703
            catch (Exception ex)
451 704
            {
......
1330 1583
                pipeSystemNetworkDT.Columns.Add("IncludingVirtualData", typeof(string));
1331 1584
                pipeSystemNetworkDT.Columns.Add("PSNAccuracy", typeof(string));
1332 1585
                pipeSystemNetworkDT.Columns.Add("Pocket", typeof(string));
1586
                pipeSystemNetworkDT.Columns.Add("EGTag", typeof(string));
1587
                pipeSystemNetworkDT.Columns.Add("HasMLTags", typeof(string));
1333 1588
                pipeSystemNetworkDT.Columns.Add("AFC", typeof(string));
1589
                pipeSystemNetworkDT.Columns.Add("PUMP", typeof(string));
1334 1590

  
1335 1591
                DataTable topologySetDT = new DataTable();
1336 1592
                topologySetDT.Columns.Add("OID", typeof(string));
......
1935 2191
                                        string AFC = "P2";
1936 2192
                                        if(PSNItem.StartType == PSNType.Equipment && From_item.Equipment != null)
1937 2193
                                        {
1938
                                            if (EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Where(x => x.Name.Equals(From_item.Equipment.Name)).Count() > 0)
2194
                                            if (EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Where(x => x.Type != "Pump" && x.Name.Equals(From_item.Equipment.Name)).Count() > 0)
1939 2195
                                                AFC = "P1";
2196
                                            else if (EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Where(x => x.Type == "Pump" && x.Name.Equals(From_item.Equipment.Name)).Count() > 0)
2197
                                                newRow["PUMP"] = "PUMP";
1940 2198
                                        }
1941 2199

  
1942 2200
                                        if (PSNItem.EndType == PSNType.Equipment && To_item.Equipment != null)
1943 2201
                                        {
1944
                                            if (EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Where(x => x.Name.Equals(To_item.Equipment.Name)).Count() > 0)
2202
                                            if (EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Where(x => x.Type != "Pump" && x.Name.Equals(To_item.Equipment.Name)).Count() > 0)
1945 2203
                                                AFC = "P1";
2204
                                            else if (EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Where(x => x.Type == "Pump" && x.Name.Equals(To_item.Equipment.Name)).Count() > 0)
2205
                                                newRow["PUMP"] = "PUMP";
1946 2206
                                        }
1947 2207

  
1948 2208
                                        newRow["AFC"] = AFC;
2209

  
2210
                                        newRow["EGTag"] = string.Empty;
2211
                                        newRow["HasMLTags"] = "False";
1949 2212
                                        pipeSystemNetworkDT.Rows.Add(newRow);
1950 2213
                                    }
1951 2214
                                }
......
2428 2691
                            }
2429 2692
                            else
2430 2693
                            {
2431
                                PathItems.Rows.InsertAt(createLineRow(PathItems.Select(string.Format("PipeLine_OID = '{0}' AND ItemName = 'PipeRun' AND PipeSystemNetwork_OID = '{1}'", item.PSNPipeLineID, dataRow["OID"])).First()), insertIndex);
2694
                                if(PathItems.Select(string.Format("PipeLine_OID = '{0}' AND ItemName = 'PipeRun' AND PipeSystemNetwork_OID = '{1}'", item.PSNPipeLineID, dataRow["OID"])).Count() > 0)
2695
                                    PathItems.Rows.InsertAt(createLineRow(PathItems.Select(string.Format("PipeLine_OID = '{0}' AND ItemName = 'PipeRun' AND PipeSystemNetwork_OID = '{1}'", item.PSNPipeLineID, dataRow["OID"])).First()), insertIndex);
2432 2696

  
2433
                                PathItems.Rows.InsertAt(createTerminatorRow(pathItemRows.First(), FROM_DATA), insertIndex);
2697
                                    PathItems.Rows.InsertAt(createTerminatorRow(pathItemRows.First(), FROM_DATA), insertIndex);
2698
                                   
2699
                                
2434 2700
                                bCount = 3;
2435 2701
                            }
2436 2702

  
......
2487 2753
                            else
2488 2754
                            {
2489 2755
                                PathItems.Rows.InsertAt(createTerminatorRow(pathItemRows.Last(), TO_DATA), insertIndex);
2490
                                PathItems.Rows.InsertAt(createLineRow(PathItems.Select(string.Format("PipeLine_OID = '{0}' AND ItemName = 'PipeRun' AND PipeSystemNetwork_OID = '{1}'", item.PSNPipeLineID, dataRow["OID"])).Last()), insertIndex);
2756
                                if(PathItems.Select(string.Format("PipeLine_OID = '{0}' AND ItemName = 'PipeRun' AND PipeSystemNetwork_OID = '{1}'", item.PSNPipeLineID, dataRow["OID"])).Count() > 0)
2757
                                    PathItems.Rows.InsertAt(createLineRow(PathItems.Select(string.Format("PipeLine_OID = '{0}' AND ItemName = 'PipeRun' AND PipeSystemNetwork_OID = '{1}'", item.PSNPipeLineID, dataRow["OID"])).Last()), insertIndex);
2491 2758
                            }
2492 2759

  
2493
                            //if (!bCheck)
2494
                            //{
2495
                            //    if (item.ItemType == ItemType.Line)
2496
                            //    {
2497
                            //        PathItems.Rows.InsertAt(createTerminatorRow(pathItemRows.Last(), TO_DATA), insertIndex + 1);
2498
                            //    }
2499
                            //    else
2500
                            //    {
2501
                            //        PathItems.Rows.InsertAt(createTerminatorRow(pathItemRows.Last(), TO_DATA), insertIndex + 1);
2502
                            //        PathItems.Rows.InsertAt(createLineRow(PathItems.Select(string.Format("PipeLine_OID = '{0}' AND ItemName = 'PipeRun' AND PipeSystemNetwork_OID = '{1}'", item.PSNPipeLineID, dataRow["OID"])).Last()), insertIndex + 1);
2503
                            //    }
2504
                            //}
2505
                            //else
2506
                            //{
2507
                            //    if (item.ItemType == ItemType.Line)
2508
                            //    {
2509
                            //        PathItems.Rows.InsertAt(createTerminatorRow(pathItemRows[pathItemRows.Count() - bCount], TO_DATA), insertIndex + 1);
2510
                            //    }
2511
                            //    else
2512
                            //    {
2513
                            //        PathItems.Rows.InsertAt(createTerminatorRow(pathItemRows[pathItemRows.Count() - bCount], TO_DATA), insertIndex + 1);
2514
                            //        PathItems.Rows.InsertAt(createLineRow(PathItems.Select(string.Format("PipeLine_OID = '{0}' AND ItemName = 'PipeRun' AND PipeSystemNetwork_OID = '{1}'", item.PSNPipeLineID, dataRow["OID"])).Last()), insertIndex + 1);
2515
                            //    }
2516
                            //}
2517

  
2518

  
2519 2760
                            PSNItem.EndType = PSNType.Equipment;
2520 2761
                        }
2521 2762
                        catch (Exception ex)

내보내기 Unified diff

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