프로젝트

일반

사용자정보

개정판 7d6d1693

ID7d6d16939d070dd389cec7aff8e4f27157681807
상위 a96d48f8
하위 6805be6e

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

issue #000: ValveGroupingSetting No Selection 삭제, No Selection 로직 제거, EGT 삭제 시 ML 및 연관 데이터 삭제 로직 추가, EGT Naming Rule 변경, Scope Break 로직 수정

Change-Id: I97a2ebb58bc9607c7448d884ba3cd1db16bb0f81

차이점 보기:

DTI_PID/ID2PSN/Document.cs
17 17
        public string FilePath { get; set; }
18 18
        public List<Item> Items { get; set; }
19 19
        public List<LineNumber> LineNumbers { get; set; }
20
        public bool MissingLineNumber1 { get; set; }
21
        public bool MissingLineNumber2 { get; set; }
22

  
23 20
        public List<Group> Groups { get; set; }
24 21
        public List<RunInfo> RunInfos { get; set; }
25 22
        public List<Item> SegmentBreaks { get; set; }
DTI_PID/ID2PSN/Form/DrawingList.Designer.cs
59 59
            this.ribbonControl.ShowDisplayOptionsMenuButton = DevExpress.Utils.DefaultBoolean.False;
60 60
            this.ribbonControl.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.ShowOnMultiplePages;
61 61
            this.ribbonControl.ShowToolbarCustomizeItem = false;
62
            this.ribbonControl.Size = new System.Drawing.Size(317, 32);
62
            this.ribbonControl.Size = new System.Drawing.Size(333, 32);
63 63
            this.ribbonControl.Toolbar.ShowCustomizeItem = false;
64 64
            // 
65 65
            // layoutControl1
......
70 70
            this.layoutControl1.Name = "layoutControl1";
71 71
            this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(963, 307, 650, 400);
72 72
            this.layoutControl1.Root = this.Root;
73
            this.layoutControl1.Size = new System.Drawing.Size(317, 122);
73
            this.layoutControl1.Size = new System.Drawing.Size(333, 130);
74 74
            this.layoutControl1.TabIndex = 1;
75 75
            this.layoutControl1.Text = "layoutControl1";
76 76
            // 
......
78 78
            // 
79 79
            this.lbDrawingList.Location = new System.Drawing.Point(12, 12);
80 80
            this.lbDrawingList.Name = "lbDrawingList";
81
            this.lbDrawingList.Size = new System.Drawing.Size(293, 98);
81
            this.lbDrawingList.Size = new System.Drawing.Size(309, 106);
82 82
            this.lbDrawingList.StyleController = this.layoutControl1;
83 83
            this.lbDrawingList.TabIndex = 7;
84 84
            this.lbDrawingList.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.lbDrawingList_MouseDoubleClick);
......
90 90
            this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
91 91
            this.layoutControlItem1});
92 92
            this.Root.Name = "Root";
93
            this.Root.Size = new System.Drawing.Size(317, 122);
93
            this.Root.Size = new System.Drawing.Size(333, 130);
94 94
            this.Root.TextVisible = false;
95 95
            // 
96 96
            // layoutControlItem1
......
98 98
            this.layoutControlItem1.Control = this.lbDrawingList;
99 99
            this.layoutControlItem1.Location = new System.Drawing.Point(0, 0);
100 100
            this.layoutControlItem1.Name = "layoutControlItem1";
101
            this.layoutControlItem1.Size = new System.Drawing.Size(297, 102);
101
            this.layoutControlItem1.Size = new System.Drawing.Size(313, 110);
102 102
            this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
103 103
            this.layoutControlItem1.TextVisible = false;
104 104
            // 
......
106 106
            // 
107 107
            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
108 108
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
109
            this.ClientSize = new System.Drawing.Size(317, 154);
109
            this.ClientSize = new System.Drawing.Size(333, 162);
110 110
            this.Controls.Add(this.layoutControl1);
111 111
            this.Controls.Add(this.ribbonControl);
112 112
            this.Name = "DrawingList";
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(647, 32);
77
            this.ribbonControl.Size = new System.Drawing.Size(655, 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(647, 651);
91
            this.layoutControl1.Size = new System.Drawing.Size(655, 655);
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(599, 518);
101
            this.gridEquipment.Size = new System.Drawing.Size(607, 522);
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(565, 603);
115
            this.btnClose.Location = new System.Drawing.Point(573, 607);
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(473, 603);
126
            this.btnSave.Location = new System.Drawing.Point(481, 607);
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(490, 43);
136
            this.btnAddValveGroup.Location = new System.Drawing.Point(496, 43);
137 137
            this.btnAddValveGroup.Name = "btnAddValveGroup";
138
            this.btnAddValveGroup.Size = new System.Drawing.Size(133, 22);
138
            this.btnAddValveGroup.Size = new System.Drawing.Size(135, 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(647, 651);
155
            this.Root.Size = new System.Drawing.Size(655, 655);
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, 591);
161
            this.emptySpaceItem3.Location = new System.Drawing.Point(0, 595);
162 162
            this.emptySpaceItem3.Name = "emptySpaceItem3";
163
            this.emptySpaceItem3.Size = new System.Drawing.Size(461, 40);
163
            this.emptySpaceItem3.Size = new System.Drawing.Size(469, 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(461, 591);
169
            this.layoutControlItem4.Location = new System.Drawing.Point(469, 595);
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(553, 591);
181
            this.layoutControlItem5.Location = new System.Drawing.Point(561, 595);
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(533, 591);
193
            this.emptySpaceItem2.Location = new System.Drawing.Point(541, 595);
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(627, 591);
210
            this.layoutControlGroup2.Size = new System.Drawing.Size(635, 595);
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(603, 522);
218
            this.layoutControlItem6.Size = new System.Drawing.Size(611, 526);
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(466, 0);
225
            this.layoutControlItem3.Location = new System.Drawing.Point(472, 0);
226 226
            this.layoutControlItem3.Name = "layoutControlItem3";
227
            this.layoutControlItem3.Size = new System.Drawing.Size(137, 26);
227
            this.layoutControlItem3.Size = new System.Drawing.Size(139, 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(466, 26);
236
            this.emptySpaceItem1.Size = new System.Drawing.Size(472, 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(647, 683);
243
            this.ClientSize = new System.Drawing.Size(655, 687);
244 244
            this.Controls.Add(this.layoutControl1);
245 245
            this.Controls.Add(this.ribbonControl);
246 246
            this.Name = "EquipmentNoPocketSetting";
DTI_PID/ID2PSN/Form/EquipmentNoPocketSetting.cs
146 146

  
147 147
                typeDT.Rows.Add(index, Type, SppidSymbolName, null);
148 148
            }
149
            
150 149
        }
151 150
      
152 151
        private void removeSymbolButton_Click(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
DTI_PID/ID2PSN/Form/EquipmentSetting.cs
49 49
        }
50 50

  
51 51
        private void gridViewSymbol_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
52
        {
52
        {            
53 53
            if (e.Column.FieldName == "Type")
54 54
            {
55 55
                DevExpress.XtraGrid.Views.Base.ColumnView columnView = sender as DevExpress.XtraGrid.Views.Base.ColumnView;
56 56
                if (!string.IsNullOrEmpty(e.Value.ToString()))
57 57
                {
58 58
                    string selectItem = e.Value.ToString();
59
                    DataTable dt = gridControlAirFinCooler.DataSource as DataTable;
60 59
                    if (selectItem.Contains("Air Fin Cooler"))
61 60
                    {
62
                        dt.Rows[columnView.FocusedRowHandle]["TagIdentifier"] = "AFC";
61
                        gridViewAirFinCooler.SetRowCellValue(columnView.FocusedRowHandle, "TagIdentifier", "AFC");
63 62
                    }
64 63
                    else if (selectItem.Contains("Pump"))
65 64
                    {
66
                        dt.Rows[columnView.FocusedRowHandle]["TagIdentifier"] = "PUMP";
67
                    }
65
                        gridViewAirFinCooler.SetRowCellValue(columnView.FocusedRowHandle, "TagIdentifier", "PUMP");
66
                    }                    
68 67
                }
69 68
            }
70

  
71 69
        }
72 70

  
73 71
        public void InitGridEquipmentNoPocket()
......
161 159
            repositoryGroupType2 = new RepositoryItemComboBox();
162 160
            repositoryGroupType2.Items.AddRange(new string[] { "Air Fin Cooler", "Pump" });
163 161
            repositoryGroupType2.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
164

  
165 162
            gridControlAirFinCooler.RepositoryItems.Add(repositoryGroupType2);
166 163
            gridColumn = gridViewAirFinCooler.Columns[1];
167 164
            gridColumn.Name = "Type";
......
213 210
            gridViewAirFinCooler.CustomRowCellEditForEditing += GridViewAirFinCooler_CustomRowCellEditForEditing;
214 211
        }
215 212

  
213

  
216 214
        private void GridViewAirFinCooler_CustomRowCellEditForEditing(object sender, CustomRowCellEditEventArgs e)
217 215
        {
218 216
            if (e.Column == (sender as GridView).Columns["AttributeName"])
......
229 227

  
230 228
                repositoryAttributeItem.Items.Clear();
231 229
                repositoryAttributeItem.Items.Add("");
232
              //  repositoryAttributeItem.Items.Add("NoSelection");
233 230
                foreach (DataRow dr in SymbolList.Rows)
234 231
                {
235 232
                    if (dr["SymbolName"].ToString().ToUpper().Equals(SppidSymbolName.ToUpper()))
......
283 280

  
284 281
                typeDT.Rows.Add(index, Type, SppidSymbolName, null);
285 282
            }
286

  
283
           // typeDT.DefaultView.Sort = "INDEX ASC";
284
            
287 285
        }
288 286

  
289 287
        public void InitAirFinCoolerData()
......
300 298

  
301 299
                typeDT.Rows.Add(index, Type, TagIdentifier, AttributeName, SppidSymbolName, null);
302 300
            }
303

  
301
           // typeDT.DefaultView.Sort = "INDEX ASC";
304 302
        }
305 303

  
306 304
        private void removeSymbolButton_Click(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
DTI_PID/ID2PSN/Form/MainForm.cs
490 490
            PSNPageDT.Columns.Add("Status", typeof(string));
491 491
            PSNPageDT.Columns.Add("IncludingVirtualData", typeof(string));
492 492
            PSNPageDT.Columns.Add("PSNAccuracy", typeof(string));
493
            //PSNPageDT.Columns.Add("AFC", typeof(string));
493
            PSNPageDT.Columns.Add("AFC", typeof(string));
494 494
            PSNPageDT.Columns.Add("Show", typeof(string));
495 495

  
496 496

  
......
630 630
                newRow["Pocket"] = row["Pocket"].ToString();
631 631
                newRow["EGTag"] = row["EGTag"].ToString();
632 632
                newRow["HasMLTags"] = row["HasMLTags"].ToString();
633
                //if(row.Table.Columns["AFC"] != null)
634
                //    newRow["AFC"] = row["AFC"].ToString();
633
                if(row.Table.Columns["AFC"] != null)
634
                    newRow["AFC"] = row["AFC"].ToString();
635 635
                
636 636
                PSNPageDT.Rows.Add(newRow);
637 637
            }
DTI_PID/ID2PSN/Form/TopologyRuleForm.Designer.cs
82 82
            this.ribbonControl.ShowDisplayOptionsMenuButton = DevExpress.Utils.DefaultBoolean.False;
83 83
            this.ribbonControl.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.ShowOnMultiplePages;
84 84
            this.ribbonControl.ShowToolbarCustomizeItem = false;
85
            this.ribbonControl.Size = new System.Drawing.Size(419, 32);
85
            this.ribbonControl.Size = new System.Drawing.Size(435, 32);
86 86
            this.ribbonControl.Toolbar.ShowCustomizeItem = false;
87 87
            // 
88 88
            // layoutControl1
......
99 99
            this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(642, 278, 650, 400);
100 100
            this.layoutControl1.OptionsView.UseDefaultDragAndDropRendering = false;
101 101
            this.layoutControl1.Root = this.Root;
102
            this.layoutControl1.Size = new System.Drawing.Size(419, 501);
102
            this.layoutControl1.Size = new System.Drawing.Size(435, 509);
103 103
            this.layoutControl1.TabIndex = 1;
104 104
            this.layoutControl1.Text = "layoutControl1";
105 105
            // 
......
109 109
            this.gridControlRule.MainView = this.gridViewRule;
110 110
            this.gridControlRule.MenuManager = this.ribbonControl;
111 111
            this.gridControlRule.Name = "gridControlRule";
112
            this.gridControlRule.Size = new System.Drawing.Size(395, 411);
112
            this.gridControlRule.Size = new System.Drawing.Size(411, 419);
113 113
            this.gridControlRule.TabIndex = 2;
114 114
            this.gridControlRule.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
115 115
            this.gridViewRule});
......
124 124
            // btnClose
125 125
            // 
126 126
            this.btnClose.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btnClose.ImageOptions.Image")));
127
            this.btnClose.Location = new System.Drawing.Point(337, 453);
127
            this.btnClose.Location = new System.Drawing.Point(353, 461);
128 128
            this.btnClose.Name = "btnClose";
129 129
            this.btnClose.Size = new System.Drawing.Size(70, 36);
130 130
            this.btnClose.StyleController = this.layoutControl1;
......
135 135
            // btnSave
136 136
            // 
137 137
            this.btnSave.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("btnSave.ImageOptions.Image")));
138
            this.btnSave.Location = new System.Drawing.Point(245, 453);
138
            this.btnSave.Location = new System.Drawing.Point(261, 461);
139 139
            this.btnSave.Name = "btnSave";
140 140
            this.btnSave.Size = new System.Drawing.Size(68, 36);
141 141
            this.btnSave.StyleController = this.layoutControl1;
......
146 146
            // Upbtn
147 147
            // 
148 148
            this.Upbtn.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("Upbtn.ImageOptions.Image")));
149
            this.Upbtn.Location = new System.Drawing.Point(293, 12);
149
            this.Upbtn.Location = new System.Drawing.Point(305, 12);
150 150
            this.Upbtn.Name = "Upbtn";
151 151
            this.Upbtn.Size = new System.Drawing.Size(24, 22);
152 152
            this.Upbtn.StyleController = this.layoutControl1;
......
156 156
            // DownBtn
157 157
            // 
158 158
            this.DownBtn.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("DownBtn.ImageOptions.Image")));
159
            this.DownBtn.Location = new System.Drawing.Point(341, 12);
159
            this.DownBtn.Location = new System.Drawing.Point(353, 12);
160 160
            this.DownBtn.Name = "DownBtn";
161
            this.DownBtn.Size = new System.Drawing.Size(24, 22);
161
            this.DownBtn.Size = new System.Drawing.Size(26, 22);
162 162
            this.DownBtn.StyleController = this.layoutControl1;
163 163
            this.DownBtn.TabIndex = 6;
164 164
            this.DownBtn.Click += new System.EventHandler(this.DownBtn_Click);
......
166 166
            // DelBtn
167 167
            // 
168 168
            this.DelBtn.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("DelBtn.ImageOptions.Image")));
169
            this.DelBtn.Location = new System.Drawing.Point(383, 12);
169
            this.DelBtn.Location = new System.Drawing.Point(397, 12);
170 170
            this.DelBtn.Name = "DelBtn";
171
            this.DelBtn.Size = new System.Drawing.Size(24, 22);
171
            this.DelBtn.Size = new System.Drawing.Size(26, 22);
172 172
            this.DelBtn.StyleController = this.layoutControl1;
173 173
            this.DelBtn.TabIndex = 7;
174 174
            this.DelBtn.Click += new System.EventHandler(this.DelBtn_Click);
......
190 190
            this.emptySpaceItem5,
191 191
            this.layoutControlItem6});
192 192
            this.Root.Name = "Root";
193
            this.Root.Size = new System.Drawing.Size(419, 501);
193
            this.Root.Size = new System.Drawing.Size(435, 509);
194 194
            this.Root.TextVisible = false;
195 195
            // 
196 196
            // layoutControlItem1
......
198 198
            this.layoutControlItem1.Control = this.gridControlRule;
199 199
            this.layoutControlItem1.Location = new System.Drawing.Point(0, 26);
200 200
            this.layoutControlItem1.Name = "layoutControlItem1";
201
            this.layoutControlItem1.Size = new System.Drawing.Size(399, 415);
201
            this.layoutControlItem1.Size = new System.Drawing.Size(415, 423);
202 202
            this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
203 203
            this.layoutControlItem1.TextVisible = false;
204 204
            // 
205 205
            // layoutControlItem2
206 206
            // 
207 207
            this.layoutControlItem2.Control = this.btnSave;
208
            this.layoutControlItem2.Location = new System.Drawing.Point(233, 441);
208
            this.layoutControlItem2.Location = new System.Drawing.Point(249, 449);
209 209
            this.layoutControlItem2.MaxSize = new System.Drawing.Size(72, 40);
210 210
            this.layoutControlItem2.MinSize = new System.Drawing.Size(72, 40);
211 211
            this.layoutControlItem2.Name = "layoutControlItem2";
......
217 217
            // layoutControlItem3
218 218
            // 
219 219
            this.layoutControlItem3.Control = this.btnClose;
220
            this.layoutControlItem3.Location = new System.Drawing.Point(325, 441);
220
            this.layoutControlItem3.Location = new System.Drawing.Point(341, 449);
221 221
            this.layoutControlItem3.MaxSize = new System.Drawing.Size(74, 40);
222 222
            this.layoutControlItem3.MinSize = new System.Drawing.Size(74, 40);
223 223
            this.layoutControlItem3.Name = "layoutControlItem3";
......
229 229
            // emptySpaceItem1
230 230
            // 
231 231
            this.emptySpaceItem1.AllowHotTrack = false;
232
            this.emptySpaceItem1.Location = new System.Drawing.Point(305, 441);
232
            this.emptySpaceItem1.Location = new System.Drawing.Point(321, 449);
233 233
            this.emptySpaceItem1.MaxSize = new System.Drawing.Size(20, 40);
234 234
            this.emptySpaceItem1.MinSize = new System.Drawing.Size(20, 40);
235 235
            this.emptySpaceItem1.Name = "emptySpaceItem1";
......
240 240
            // emptySpaceItem2
241 241
            // 
242 242
            this.emptySpaceItem2.AllowHotTrack = false;
243
            this.emptySpaceItem2.Location = new System.Drawing.Point(0, 441);
243
            this.emptySpaceItem2.Location = new System.Drawing.Point(0, 449);
244 244
            this.emptySpaceItem2.Name = "emptySpaceItem2";
245
            this.emptySpaceItem2.Size = new System.Drawing.Size(233, 40);
245
            this.emptySpaceItem2.Size = new System.Drawing.Size(249, 40);
246 246
            this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
247 247
            // 
248 248
            // emptySpaceItem3
......
250 250
            this.emptySpaceItem3.AllowHotTrack = false;
251 251
            this.emptySpaceItem3.Location = new System.Drawing.Point(0, 0);
252 252
            this.emptySpaceItem3.Name = "emptySpaceItem3";
253
            this.emptySpaceItem3.Size = new System.Drawing.Size(281, 26);
253
            this.emptySpaceItem3.Size = new System.Drawing.Size(293, 26);
254 254
            this.emptySpaceItem3.TextSize = new System.Drawing.Size(0, 0);
255 255
            // 
256 256
            // layoutControlItem4
257 257
            // 
258 258
            this.layoutControlItem4.Control = this.Upbtn;
259
            this.layoutControlItem4.Location = new System.Drawing.Point(281, 0);
259
            this.layoutControlItem4.Location = new System.Drawing.Point(293, 0);
260 260
            this.layoutControlItem4.Name = "layoutControlItem4";
261 261
            this.layoutControlItem4.Size = new System.Drawing.Size(28, 26);
262 262
            this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
......
265 265
            // layoutControlItem5
266 266
            // 
267 267
            this.layoutControlItem5.Control = this.DownBtn;
268
            this.layoutControlItem5.Location = new System.Drawing.Point(329, 0);
268
            this.layoutControlItem5.Location = new System.Drawing.Point(341, 0);
269 269
            this.layoutControlItem5.Name = "layoutControlItem5";
270
            this.layoutControlItem5.Size = new System.Drawing.Size(28, 26);
270
            this.layoutControlItem5.Size = new System.Drawing.Size(30, 26);
271 271
            this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
272 272
            this.layoutControlItem5.TextVisible = false;
273 273
            // 
274 274
            // emptySpaceItem4
275 275
            // 
276 276
            this.emptySpaceItem4.AllowHotTrack = false;
277
            this.emptySpaceItem4.Location = new System.Drawing.Point(309, 0);
277
            this.emptySpaceItem4.Location = new System.Drawing.Point(321, 0);
278 278
            this.emptySpaceItem4.Name = "emptySpaceItem4";
279 279
            this.emptySpaceItem4.Size = new System.Drawing.Size(20, 26);
280 280
            this.emptySpaceItem4.TextSize = new System.Drawing.Size(0, 0);
......
282 282
            // emptySpaceItem5
283 283
            // 
284 284
            this.emptySpaceItem5.AllowHotTrack = false;
285
            this.emptySpaceItem5.Location = new System.Drawing.Point(357, 0);
285
            this.emptySpaceItem5.Location = new System.Drawing.Point(371, 0);
286 286
            this.emptySpaceItem5.Name = "emptySpaceItem5";
287 287
            this.emptySpaceItem5.Size = new System.Drawing.Size(14, 26);
288 288
            this.emptySpaceItem5.TextSize = new System.Drawing.Size(0, 0);
......
290 290
            // layoutControlItem6
291 291
            // 
292 292
            this.layoutControlItem6.Control = this.DelBtn;
293
            this.layoutControlItem6.Location = new System.Drawing.Point(371, 0);
293
            this.layoutControlItem6.Location = new System.Drawing.Point(385, 0);
294 294
            this.layoutControlItem6.Name = "layoutControlItem6";
295
            this.layoutControlItem6.Size = new System.Drawing.Size(28, 26);
295
            this.layoutControlItem6.Size = new System.Drawing.Size(30, 26);
296 296
            this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
297 297
            this.layoutControlItem6.TextVisible = false;
298 298
            // 
......
300 300
            // 
301 301
            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
302 302
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
303
            this.ClientSize = new System.Drawing.Size(419, 533);
303
            this.ClientSize = new System.Drawing.Size(435, 541);
304 304
            this.Controls.Add(this.layoutControl1);
305 305
            this.Controls.Add(this.ribbonControl);
306 306
            this.Name = "TopologyRuleForm";
DTI_PID/ID2PSN/Form/ValveGroupingSetting.cs
101 101

  
102 102
            SymbolList = DB.SelectAllSymbolAttribute();
103 103

  
104
            //repositoryAttributeItem.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
105
            //repositoryAttributeItem.AppearanceDropDown.Font = Font;
106
            //repositoryAttributeItem.Items.Add("NoSelection");
107
            //foreach (DataRow dr in SymbolList.Rows)
108
            //{
109
            //    repositoryAttributeItem.Items.Add(dr["SymbolAttribute"].ToString());
110
            //}
111
            //repositoryAttributeItem.Items.Add("");
112

  
113 104
            repositoryAttributeItem.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
114 105
            repositoryAttributeItem.AppearanceDropDown.Font = Font;
115 106
            gridValveGroup.RepositoryItems.Add(repositoryAttributeItem);
......
165 156

  
166 157
                repositoryAttributeItem.Items.Clear();
167 158
                repositoryAttributeItem.Items.Add("");
168
                repositoryAttributeItem.Items.Add("NoSelection");
169 159
                foreach (DataRow dr in SymbolList.Rows)
170 160
                {
171 161
                    if(dr["SymbolName"].ToString().ToUpper().Equals(SppidSymbolName.ToUpper()))
......
173 163
                        repositoryAttributeItem.Items.Add(dr["SymbolAttribute"].ToString());
174 164
                    }                    
175 165
                }
176
                //repositoryAttributeItem.Items.Add("");
177 166
            }
178 167
        }
179 168

  
......
344 333
                    DataTable dt = gridValveGroup.DataSource as DataTable;
345 334
                    if (selectItem.Contains("Valves"))
346 335
                    {
347
                        dt.Rows[columnView.FocusedRowHandle]["TagIdentifier"] = "CV";
336
                        gridViewValveGroup.SetRowCellValue(columnView.FocusedRowHandle, "TagIdentifier", "CV");
337
                        //dt.Rows[columnView.FocusedRowHandle]["TagIdentifier"] = "CV";
348 338
                    }
349 339
                    else if (selectItem.Contains("Traps"))
350 340
                    {
351
                        dt.Rows[columnView.FocusedRowHandle]["TagIdentifier"] = "ST";
341
                        gridViewValveGroup.SetRowCellValue(columnView.FocusedRowHandle, "TagIdentifier", "ST");
342
                      //  dt.Rows[columnView.FocusedRowHandle]["TagIdentifier"] = "ST";
352 343
                    }
353 344
                    else if (selectItem.Contains("Reliefs"))
354 345
                    {
355
                        dt.Rows[columnView.FocusedRowHandle]["TagIdentifier"] = "PSV";
346
                        gridViewValveGroup.SetRowCellValue(columnView.FocusedRowHandle, "TagIdentifier", "PSV");
347
                       // dt.Rows[columnView.FocusedRowHandle]["TagIdentifier"] = "PSV";
348
                    }
349
                    else
350
                    {
351
                        gridViewValveGroup.SetRowCellValue(columnView.FocusedRowHandle, "TagIdentifier", string.Empty);
356 352
                    }
357 353
                }
358 354
            }
DTI_PID/ID2PSN/Object/Item.cs
53 53
        public Equipment Equipment { get; set; }
54 54
        public Document Document { get; set; }
55 55
        public string Keyword { get; set; }
56
        public bool MissingLineNumber1 { get; set; }
57
        public bool MissingLineNumber2 { get; set; }
56
  
58 57
    }
59 58

  
60 59
    public class Relation 
......
98 97
        public string Name { get; set; }
99 98
        public List<Attribute> Attributes { get; set; }
100 99
        public bool IsCopy { get; set; }
101

  
100
        public bool MissingLineNumber1 { get; set; }
101
        public bool MissingLineNumber2 { get; set; }
102 102

  
103 103
        public LineNumber Copy()
104 104
        {
DTI_PID/ID2PSN/PSN.cs
240 240
            // PSN의 정보를 저장
241 241
            splashScreenManager1.SetWaitFormDescription(i++ + " / 19  SetPSNData ( 45 % )");
242 242
            SavePSNData();
243
            // Update Keyword
243
            // Update PSN From/To Keyword & EndofHeader
244 244
            splashScreenManager1.SetWaitFormDescription(i++ + " / 19  UpdateKeywordForPSN ( 55 % )");
245
            UpdateKeywordForPSN();
245
            UpdateKeywordForPSN(); 
246 246
          
247 247
            // Topology의 subtype을 update(bypass, Header, 등등) 
248 248
            splashScreenManager1.SetWaitFormDescription(i++ + " / 19  UpdateSubType ( 60 % )");
......
258 258
            UpdateErrorForPSN();
259 259
            // Insert Tee
260 260
            splashScreenManager1.SetWaitFormDescription(i++ + " / 19  InsertTeePSN ( 75 % )");
261
            PathItemSorting();
261 262
            InsertTeePSN();
262 263

  
263
            // ValveGrouping
264
            PathItemSorting(); //test
264
            // ValveGrouping            
265 265
            splashScreenManager1.SetWaitFormDescription(i++ + " / 19  UpdateValveGrouping ( 80 % )");
266
            PathItemSorting(); //test
266 267
            UpdateValveGrouping();
267 268

  
268 269
            splashScreenManager1.SetWaitFormDescription(i++ + " / 19  PathItemSorting ( 85 % )");
......
382 383
                    DataRow[] pathItemRows = PathItems.Select(string.Format("PipeSystemNetwork_OID = '{0}'", dataRow["OID"].ToString()));
383 384

  
384 385
                    string EGTAG = "EGTAG";
385
                    string ItemTag = "ItemTag";
386
                   // string ItemTag = "ItemTag";
386 387
                    string EGFlowDirection = string.Empty;
387 388
                    string Prefix = string.Empty;
388
                    
389
                    string SymbolName = string.Empty;
389 390

  
390 391
                    PSNItem PSNItem = PSNItems.Find(x => x.PSN_OID() == dataRow["OID"].ToString());
391 392
                    if (PSNItem.Groups.First().Items.First().Equipment != null)
......
397 398
                                EGTAG = PSNItem.Groups.First().Items.First().Equipment.Attributes.Find(x => x.Name == equipmentAirFinCoolerItem.AttributeName) == null
398 399
                                   ? string.Empty : PSNItem.Groups.First().Items.First().Equipment.Attributes.Find(x => x.Name == equipmentAirFinCoolerItem.AttributeName).Value;
399 400

  
400
                            ItemTag = PSNItem.Groups.First().Items.First().Equipment.ItemTag;
401
                            SymbolName = PSNItem.Groups.First().Items.First().Equipment.Name;
401 402
                            Prefix = equipmentAirFinCoolerItem.TagIdentifier;                            
402 403
                            EGFlowDirection = "O";
403 404
                        }                        
404 405
                    } 
405
                    else if(PSNItem.Groups.Last().Items.Last().Equipment != null)
406
                    
407
                    if(string.IsNullOrEmpty(EGFlowDirection) && PSNItem.Groups.Last().Items.Last().Equipment != null)
406 408
                    {
407 409
                        if (EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Where(x => x.Type == "Pump" && PSNItem.Groups.Last().Items.Last().Equipment.Name.Contains(x.Name)).Count() > 0)
408 410
                        {
......
411 413
                                EGTAG = PSNItem.Groups.Last().Items.Last().Equipment.Attributes.Find(x => x.Name == equipmentAirFinCoolerItem.AttributeName) == null
412 414
                                    ? string.Empty : PSNItem.Groups.Last().Items.Last().Equipment.Attributes.Find(x => x.Name == equipmentAirFinCoolerItem.AttributeName).Value;
413 415

  
414
                            ItemTag = PSNItem.Groups.Last().Items.Last().Equipment.ItemTag;
416
                            SymbolName = PSNItem.Groups.Last().Items.Last().Equipment.Name;
415 417
                            Prefix = equipmentAirFinCoolerItem.TagIdentifier;                            
416 418
                            EGFlowDirection = "I";
417 419
                        }
......
420 422
                    //Attribute가 세팅되어있지 않다면
421 423
                    if (EGTAG.Equals("EGTAG"))
422 424
                    {
423
                        if (!eqkeyValuePairs.ContainsKey(ItemTag))
425
                        if (!eqkeyValuePairs.ContainsKey(SymbolName))
424 426
                        {
425
                            pumpTagNum++;
426
                            EGTAG = Prefix + string.Format("-{0}", string.Format("{0:D5}", pumpTagNum));
427
                            eqkeyValuePairs.Add(ItemTag, EGTAG);
427
                            if (!string.IsNullOrEmpty(Prefix))
428
                            {
429
                                pumpTagNum++;
430
                                EGTAG = Prefix + string.Format("-{0}", string.Format("{0:D5}", pumpTagNum));
431
                                eqkeyValuePairs.Add(SymbolName, EGTAG);
432
                            }
433
                            else
434
                            {
435
                                eqkeyValuePairs.Add(SymbolName, SymbolName);
436
                            }
428 437
                        }
429 438
                        else
430 439
                        {
431
                            EGTAG = eqkeyValuePairs[ItemTag];
440
                            EGTAG = eqkeyValuePairs[SymbolName];
432 441
                        }
433 442
                    }
434 443
                    else
435 444
                    {
436
                        EGTAG = Prefix + "-" + EGTAG;
445
                        if (!string.IsNullOrEmpty(Prefix))
446
                            EGTAG = Prefix + "-" + EGTAG;
437 447
                    }
438 448

  
449

  
439 450
                    foreach (DataRow dr in pathItemRows)
440 451
                    {
441 452
                        dr["EqpGroupTag"] = EGTAG;
......
458 469
                            EGFlowDirection = "O";
459 470
                        }
460 471
                    }
461
                    else if (PSNItem.Groups.Last().Items.Last().Equipment != null)
472
                    
473
                    if (string.IsNullOrEmpty(EGFlowDirection) && PSNItem.Groups.Last().Items.Last().Equipment != null)
462 474
                    {
463 475
                        if (EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Where(x => x.Type == "Pump" && PSNItem.Groups.Last().Items.Last().Equipment.Name.Contains(x.Name)).Count() > 0)
464 476
                        {
......
485 497
                                        viewEGFlowDirection = "O";
486 498
                                    }
487 499
                                }
488
                                else if (viewPSNItem.Groups.Last().Items.Last().Equipment != null)
500
                                
501
                                
502
                                if (string.IsNullOrEmpty(viewEGFlowDirection) && viewPSNItem.Groups.Last().Items.Last().Equipment != null)
489 503
                                {
490 504
                                    if (EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Where(x => x.Type == "Pump" && viewPSNItem.Groups.Last().Items.Last().Equipment.Name.Contains(x.Name)).Count() > 0)
491 505
                                    {
......
606 620
                    }
607 621
                    else
608 622
                    {
609
                        foreach (DataRow dr in pathItemRows)
610
                        {
611
                            dr["EqpGroupTag"] = string.Empty;
612
                            dr["EGFlowDirection"] = string.Empty;
613
                        }
623
                        //foreach (DataRow dr in pathItemRows)
624
                        //{
625
                        //    dr["EqpGroupTag"] = string.Empty;
626
                        //    dr["EGFlowDirection"] = string.Empty;
627
                        //    dr["EGTConnectedPoint"] = "0";
628
                        //    dr["MainLineTag"] = string.Empty;
629
                        //}
614 630
                    }
615 631
                }
616 632
                                
......
633 649
                            EGFlowDirection = "O";
634 650
                        }
635 651
                    }
636
                    else if (PSNItem.Groups.Last().Items.Last().Equipment != null)
652
                    
653
                    if (string.IsNullOrEmpty(EGFlowDirection) && PSNItem.Groups.Last().Items.Last().Equipment != null)
637 654
                    {
638 655
                        if (EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Where(x => x.Type == "Pump" && PSNItem.Groups.Last().Items.Last().Equipment.Name.Contains(x.Name)).Count() > 0)
639 656
                        {
......
709 726
                    string EGFlowDirection = string.Empty;
710 727
                    string EGTAG = "EGTAG";
711 728
                    string Prefix = string.Empty;
729
                    string SymbolName = string.Empty;
730

  
712 731
                    //item.Attributes.Find(x => x.Name == valveitem.AttributeName).Value;
713 732
                    PSNItem PSNItem = PSNItems.Find(x => x.PSN_OID() == dataRow["OID"].ToString());
714 733
                    if (PSNItem.Groups.First().Items.First().Equipment != null)
......
724 743
                            EGFlowDirection = "O";
725 744
                        }
726 745
                    }
727
                    else if (PSNItem.Groups.Last().Items.Last().Equipment != null)
746

  
747
                    if (string.IsNullOrEmpty(EGFlowDirection) && PSNItem.Groups.Last().Items.Last().Equipment != null)
728 748
                    {
729 749
                        if (EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Where(x => x.Type != "Pump" && PSNItem.Groups.Last().Items.Last().Equipment.Name.Contains(x.Name)).Count() > 0)
730 750
                        {
......
744 764

  
745 765
                        //Attribute가 세팅되어있지 않다면
746 766
                        if (EGTAG.Equals("EGTAG"))
747
                        {
767
                        {                          
748 768
                            if (!keyValuePairs.ContainsKey(afcTag[1]))
749 769
                            {
750
                                afcTagNum++;
751
                                EGTAG = Prefix + string.Format("-{0}", string.Format("{0:D5}", afcTagNum));
752
                                keyValuePairs.Add(afcTag[1], EGTAG);
770
                                if (!string.IsNullOrEmpty(Prefix))
771
                                {
772
                                    afcTagNum++;
773
                                    EGTAG = Prefix + string.Format("-{0}", string.Format("{0:D5}", afcTagNum));
774
                                    keyValuePairs.Add(afcTag[1], EGTAG);
775
                                }
776
                                else
777
                                {
778
                                    keyValuePairs.Add(afcTag[1], afcTag[1]);
779

  
780
                                }
753 781
                            }
754 782
                            else
755 783
                            {
756 784
                                EGTAG = keyValuePairs[afcTag[1]];
757 785
                            }
786
                            
758 787
                        }
759 788
                        else
760 789
                        {
761
                            EGTAG = Prefix + "-" + EGTAG;
790
                            if (!string.IsNullOrEmpty(Prefix))
791
                                EGTAG = Prefix + "-" + EGTAG;                          
762 792
                        }
763 793

  
764 794
                        DataRow[] pathItemRows = PathItems.Select(string.Format("PipeSystemNetwork_OID = '{0}'", dataRow["OID"].ToString()));
......
883 913

  
884 914
                                foreach (DataRow dr in pathItemRows)
885 915
                                {
886

  
887 916
                                    dr["EqpGroupTag"] = EqpGroupTag;
888 917

  
889 918
                                    //P1의 AGT와 같은 모든 AGT를 P3의 AGT로 변경하기위해 
......
897 926
                                        }
898 927
                                    }
899 928
                                }
900
                            }
901
                            
929
                            }                            
902 930
                        }
903 931

  
904 932
                        while (lstpsn.Count() != 0)
......
961 989
                                        EGFlowDirection = "O";
962 990
                                }
963 991
                            }
964
                            else if (PSNItem.Groups.Last().Items.Last().Equipment != null)
992
                            
993
                            if (string.IsNullOrEmpty(EGFlowDirection) && PSNItem.Groups.Last().Items.Last().Equipment != null)
965 994
                            {
966 995
                                if (EquipmentAirFinCooler.EquipmentAirFinCoolerItem.Where(x => x.Type != "Pump" && PSNItem.Groups.Last().Items.Last().Equipment.Name.Contains(x.Name)).Count() > 0)
967 996
                                {
......
1002 1031
                                        foreach (DataRow dataRow in pathItemRows)
1003 1032
                                        {
1004 1033
                                            if (bCheck)
1034
                                            {
1005 1035
                                                dataRow["EqpGroupTag"] = string.Empty;
1036
                                                dataRow["MainLineTag"] = string.Empty;
1037
                                                dataRow["EGTConnectedPoint"] = 0;
1038
                                                dataRow["EGFlowDirection"] = string.Empty;
1039
                                            }
1006 1040

  
1007 1041
                                            if (dataRow.Field<string>("ViewPipeSystemNetwork_OID").Equals(lastP1))
1008 1042
                                            {
......
1021 1055
                                                break;
1022 1056
                                            }
1023 1057
                                            
1024
                                            dataRow["EqpGroupTag"] = string.Empty;                                           
1058
                                            dataRow["EqpGroupTag"] = string.Empty;
1059
                                            dataRow["MainLineTag"] = string.Empty;
1060
                                            dataRow["EGTConnectedPoint"] = 0;
1061
                                            dataRow["EGFlowDirection"] = string.Empty;
1062

  
1025 1063
                                        }
1026 1064
                                    }
1027 1065
                                }
......
1098 1136
                    List<DataRow> lstitem = new List<DataRow>();
1099 1137
                    foreach (DataRow dr in pathItemRows)
1100 1138
                    {
1139
                        if (dr["GROUPTAG"].ToString() == "Scope Break")
1140
                        {
1141
                            dr["GROUPTAG"] = string.Empty;
1142
                            keyValuePairs.Add(bCnt, lstitem.ToList());
1143
                            bCnt++;
1144
                            lstitem.Clear();
1145
                            continue;
1146
                        }
1147

  
1101 1148
                        if (!string.IsNullOrEmpty(dr["BranchTopologySet_OID"].ToString()))
1102 1149
                        {
1103 1150
                            DataRow[] rows = TopologySet.Select(string.Format("OID = '{0}'", dr["BranchTopologySet_OID"].ToString()));
1104
                            if (dr["GROUPTAG"].ToString() == "Scope Break")
1105
                            {
1106
                                dr["GROUPTAG"] = string.Empty;
1107
                                keyValuePairs.Add(bCnt, lstitem.ToList());
1108
                                bCnt++;
1109
                                lstitem.Clear();
1110
                            }
1111
                            else
1112
                            {
1151
                          
1152
                           
1113 1153
                                if (rows.First()["SubType"].ToString() != "Bypass" && rows.First()["SubType"].ToString() != "Vent_Drain")
1114 1154
                                {
1115 1155
                                    if (lstitem.ToList().Where(x => !string.IsNullOrEmpty(x.Field<string>("GROUPTAG"))).Count() > 0)
......
1129 1169
                                }
1130 1170
                                else
1131 1171
                                    lstitem.Add(dr);
1132
                            }
1172
                            
1133 1173
                        }
1134 1174
                        else
1135 1175
                            lstitem.Add(dr);
......
1194 1234
                            row["Pocket"] = "Yes";
1195 1235
                    }                    
1196 1236
                }
1237

  
1238
                tagpathItemRows = PathItems.Select(string.Format("GROUPTAG = 'Scope Break'"));
1239
                foreach (DataRow drPathitem in tagpathItemRows)
1240
                {
1241
                    drPathitem["GROUPTAG"] = string.Empty;
1242
                }
1197 1243
            }
1198 1244
            catch (Exception ex)
1199 1245
            {
......
1218 1264
                            if (!prevLineNumber.IsCopy)
1219 1265
                            {
1220 1266
                                prevLineNumber = prevLineNumber.Copy();
1267
                                prevLineNumber.MissingLineNumber1 = true;
1221 1268
                                item.Document.LineNumbers.Add(prevLineNumber);
1222
                                item.Document.MissingLineNumber1 = true;
1269
                                //item.LineNumber.MissingLineNumber1 = true;
1223 1270
                            }
1224 1271
                            item.Owner = prevLineNumber.UID;
1225 1272
                        }
......
1240 1287
                            if (!prevLineNumber.IsCopy)
1241 1288
                            {
1242 1289
                                prevLineNumber = prevLineNumber.Copy();
1290
                                prevLineNumber.MissingLineNumber1 = true;
1243 1291
                                item.Document.LineNumbers.Add(prevLineNumber);
1244
                                item.Document.MissingLineNumber1 = true;
1292
                                //item.LineNumber.MissingLineNumber1 = true;                                
1245 1293
                            }
1246 1294

  
1247 1295
                            item.Owner = prevLineNumber.UID;
......
1282 1330
                        cLineNumber = lineNumbers[index].Copy();
1283 1331
                    }
1284 1332

  
1333
                    cLineNumber.MissingLineNumber2 = true;
1285 1334
                    group.Document.LineNumbers.Add(cLineNumber);
1286 1335

  
1287 1336
                    foreach (Item item in group.Items)
1288 1337
                    {
1289
                        item.Owner = cLineNumber.UID;
1290
                        item.MissingLineNumber2 = true;
1338
                        item.Owner = cLineNumber.UID;                        
1291 1339
                    }
1292 1340
                }
1293 1341

  
......
1335 1383
                                if (attribute != null && !string.IsNullOrEmpty(attribute.Value))
1336 1384
                                {
1337 1385
                                    pipeLineID.Add(attribute.Value);//item.TopologyData += attribute.Value;
1338
                                    if (uid.Equals("Tag Seq No") && attribute.Value.ToString().Substring(attribute.Value.ToString().Length - 1, 1).Equals("V"))
1386
                                                                    //if (uid.Equals("Tag Seq No") && attribute.Value.ToString().Substring(attribute.Value.ToString().Length - 1, 1).Equals("V"))
1387
                                                                    //{
1388
                                    if (item.LineNumber.MissingLineNumber1 && item.LineNumber.MissingLineNumber2)
1339 1389
                                    {
1340
                                        if (item.Document.MissingLineNumber1)
1341
                                            item.MissingLineNumber1 = true;
1342
                                        else if (item.Document.MissingLineNumber2)
1343
                                            item.MissingLineNumber2 = true;
1390

  
1344 1391
                                    }
1392

  
1393
                                 
1394
                                    //    //if (item.Document.MissingLineNumber1)
1395
                                    //    //    item.MissingLineNumber1 = true;
1396
                                    //    //else if (item.Document.MissingLineNumber2)
1397
                                    //    //    item.MissingLineNumber2 = true;
1398
                                    //}
1345 1399
                                }
1346 1400
                            }
1347 1401
                        }
......
2152 2206
                        string sPSNData = string.Empty;
2153 2207
                        bool bVentDrain = false;
2154 2208

  
2155
                        List<Group> Groups = PSNItem.Groups;
2209
                      List<Group> Groups = PSNItem.Groups;
2156 2210
                        Dictionary<string, List<Item>> keyValuePairs = new Dictionary<string, List<Item>>();
2157 2211
                        List<Item> valveGroupingItem = new List<Item>();
2158 2212

  
......
2163 2217
                            for (int g = 0; g < Groups.Count; g++)
2164 2218
                            {
2165 2219
                                Group group = Groups[g];
2166
                                for (int i = 0; i < group.Items.Count; i++)
2220

  
2221
                                foreach (VentDrainInfo ventDrainInfo in VentDrainInfos)
2167 2222
                                {
2168
                                    Item item = group.Items[i];
2169
                                    foreach (VentDrainInfo ventDrainInfo in VentDrainInfos)
2223
                                    if(!bVentDrain)
2170 2224
                                    {
2171
                                        if (endInfos.Contains(ventDrainInfo))
2172
                                            continue;
2173

  
2174
                                        if (!ventDrainInfo.VentDrainItems[i].Name.Equals(item.Name))
2225
                                        for (int i = 0; i < group.Items.Count; i++)
2175 2226
                                        {
2176
                                            endInfos.Add(ventDrainInfo);
2177
                                            continue;
2178
                                        }
2227
                                            Item item = group.Items[i];
2228
                                            if (ventDrainInfo.VentDrainItems[endInfos.Count()].Name.Equals(item.Name))
2229
                                                endInfos.Add(ventDrainInfo);
2230
                                            else
2231
                                            {
2232
                                                endInfos.Clear();
2233
                                                if (ventDrainInfo.VentDrainItems[endInfos.Count()].Name.Equals(item.Name))
2234
                                                    endInfos.Add(ventDrainInfo);
2235
                                            }
2179 2236

  
2180
                                        if (ventDrainInfo.VentDrainItems.Count.Equals(i + 1))
2181
                                        {
2182
                                            bVentDrain = true;
2183
                                            break;
2237
                                            if (ventDrainInfo.VentDrainItems.Count().Equals(endInfos.Count()))
2238
                                            {
2239
                                                bVentDrain = true;
2240
                                                break;
2241
                                            }
2184 2242
                                        }
2185
                                    }
2186

  
2187
                                    if (bVentDrain || endInfos.Count.Equals(VentDrainInfos.Count))
2188
                                        break;
2189
                                }
2243
                                    }                                   
2244
                                }                               
2190 2245

  
2191 2246
                                if (!bVentDrain)
2192 2247
                                {
2193 2248
                                    endInfos = new List<VentDrainInfo>();
2194
                                    for (int i = 0; i < group.Items.Count; i++)
2249

  
2250
                                    foreach (VentDrainInfo ventDrainInfo in VentDrainInfos)
2195 2251
                                    {
2196
                                        Item item = group.Items[group.Items.Count - i - 1];
2197
                                        foreach (VentDrainInfo ventDrainInfo in VentDrainInfos)
2252
                                        if (!bVentDrain)
2198 2253
                                        {
2199
                                            if (endInfos.Contains(ventDrainInfo))
2200
                                                continue;
2201

  
2202
                                            if (!ventDrainInfo.VentDrainItems[i].Name.Equals(item.Name))
2254
                                            for (int i = 0; i < group.Items.Count; i++)
2203 2255
                                            {
2204
                                                endInfos.Add(ventDrainInfo);
2205
                                                continue;
2206
                                            }
2256
                                                Item item = group.Items[group.Items.Count - i - 1];
2207 2257

  
2208
                                            if (ventDrainInfo.VentDrainItems.Count.Equals(i + 1))
2209
                                            {
2210
                                                bVentDrain = true;
2211
                                                break;
2258
                                                if (ventDrainInfo.VentDrainItems[endInfos.Count()].Name.Equals(item.Name))
2259
                                                    endInfos.Add(ventDrainInfo);
2260
                                                else
2261
                                                {
2262
                                                    endInfos.Clear();
2263
                                                    if (ventDrainInfo.VentDrainItems[endInfos.Count()].Name.Equals(item.Name))
2264
                                                        endInfos.Add(ventDrainInfo);
2265
                                                }
2266

  
2267
                                                if (ventDrainInfo.VentDrainItems.Count().Equals(endInfos.Count()))
2268
                                                {
2269
                                                    bVentDrain = true;
2270
                                                    break;
2271
                                                }
2212 2272
                                            }
2213 2273
                                        }
2214

  
2215
                                        if (bVentDrain || endInfos.Count.Equals(VentDrainInfos.Count))
2216
                                            break;
2217 2274
                                    }
2218 2275
                                }
2219 2276
                            }
......
2440 2497

  
2441 2498
                                        string FROM_DATA = PSNItem.GetFromData(ref FromType, ref From_item);
2442 2499
                                        string status = string.Empty;
2443
                                        if (psnOrder == 0)
2444
                                        {
2445
                                            status = PSNItem.Status;
2446
                                        }
2500
                                        status = PSNItem.Status;                                      
2447 2501

  
2448 2502
                                        if (PSNItem.IsKeyword)
2449 2503
                                        {
......
2456 2510
                                        {
2457 2511
                                            PSNItem.EndType = PSNType.Equipment;
2458 2512
                                        }
2459

  
2460
                                        //if (Groups.Count == psnOrder + 1 && !string.IsNullOrEmpty(PSNItem.Status))
2461
                                        //{
2462
                                        if (!string.IsNullOrEmpty(PSNItem.Status))
2463
                                            status += PSNItem.Status;
2464
                                        //}
2465

  
2513
                                                   
2466 2514
                                        newRow["FROM_DATA"] = FROM_DATA;
2467 2515
                                        newRow["TO_DATA"] = TO_DATA;
2468
                                        //if(TO_DATA.Contains("Free Vent W-Screen") || TO_DATA.Contains("Empty LineNumber") || FROM_DATA.Contains("Empty LineNumber"))
2469
                                        //{
2470

  
2471
                                        //}
2516
                                       
2472 2517
                                        newRow["Type"] = PSNItem.GetPSNType();
2473 2518

  
2474
                                        if (psnOrder > 0)
2519
                                       
2520
                                        if(psnOrder == 0) //order 0일땐 그냥 붙여줌
2521
                                        {
2522
                                            if (!string.IsNullOrEmpty(PSNItem.Status)) //to에 status가 있다면
2523
                                            {
2524
                                                status += PSNItem.Status;
2525
                                            }                                            
2526
                                        }
2527
                                        else if (psnOrder > 0) //0보다 크면 
2475 2528
                                        {
2476 2529
                                            DataRow dr = pipeSystemNetworkDT.Select(string.Format("OID = '{0}' AND OrderNumber = {1}", PSNItem.PSN_OID(), psnOrder - 1)).FirstOrDefault();
2477
                                            if (!string.IsNullOrEmpty(PSNItem.Status))
2478
                                            {//status = !string.IsNullOrEmpty(status) ? status.Remove(0, 2) : string.Empty;
2479
                                                if (dr["Status"].ToString().Contains(PSNItem.Status))
2480
                                                    dr["Status"] = dr["Status"].ToString().Replace(PSNItem.Status, string.Empty);
2481
                                                else if (dr["Status"].ToString().Contains(PSNItem.Status.Remove(0, 2)))
2482
                                                    dr["Status"] = dr["Status"].ToString().Replace(PSNItem.Status.Remove(0, 2), string.Empty);
2483

  
2530
                                            if (psnOrder == 1) //1이면 0번 Order에 From Status 값만 남김 
2531
                                            {
2532
                                                dr["Status"] = !string.IsNullOrEmpty(status) ? status.Remove(0, 2) : string.Empty; //status;
2484 2533
                                            }
2485

  
2486
                                            if (dr != null)
2534
                                            if (psnOrder > 1) // 2 -> 1 3->2 엔 status 값 삭제
2487 2535
                                            {
2488
                                                newRow["FROM_DATA"] = dr.Field<string>("FROM_DATA");
2489
                                                newRow["TO_DATA"] = dr.Field<string>("TO_DATA");
2490
                                                newRow["Type"] = dr.Field<string>("Type");
2536
                                                dr["Status"] = string.Empty;
2491 2537
                                            }
2538

  
2539
                                            status = PSNItem.Status;
2540
                                            //if (dr != null)
2541
                                            //{
2542
                                            //    newRow["FROM_DATA"] = dr.Field<string>("FROM_DATA");
2543
                                            //    newRow["TO_DATA"] = dr.Field<string>("TO_DATA");
2544
                                            //    newRow["Type"] = dr.Field<string>("Type");
2545
                                            //}
2492 2546
                                        }
2493 2547

  
2548
                                        
2549
                                    
2494 2550
                                        status = !string.IsNullOrEmpty(status) ? status.Remove(0, 2) : string.Empty;
2495
                                        if (group.Items.Count == 1 && !string.IsNullOrEmpty(status))
2551
                                        string[] st = status.Split(new string[] { ", " }, StringSplitOptions.None);
2552
                                        if (st.Count() > 1)
2496 2553
                                        {
2497
                                            MatchCollection matches = Regex.Matches(status, "Missing LineNumber_1");
2498
                                            int cnt = matches.Count;
2499
                                            if (cnt > 1)
2500
                                                status.Replace(", Missing LineNumber_1", string.Empty);
2554
                                            status = string.Join(", ", st.Distinct());                                                                                     
2501 2555
                                        }
2502 2556
                                        newRow["TopologySet_OID_Key"] = item.Topology.FullName;
2503 2557
                                        newRow["PSNRevisionNumber"] = string.Format("V{0:D4}", Revision);
......
2977 3031
                    {
2978 3032
                        ddr["IncludingVirtualData"] = "Yes";
2979 3033
                        ddr["PSNAccuracy"] = String.Format("{0:0.00}", Math.Round(totalDdr, 2));
3034
                        ddr["IsValid"] = "Error";
2980 3035
                    }
2981 3036
                }
2982 3037
                else
......
3169 3224
                        {
3170 3225
                            string TO_DATA = string.Format("TIEINPOINT_{0:D5}V", tieInPointIndex);
3171 3226

  
3172
                           
3227
                            
3173 3228
                            foreach (DataRow loopRow in PipeSystemNetwork.Select(string.Format("OID = '{0}'", PSNItem.PSN_OID())))
3174 3229
                            {
3175 3230
                                loopRow["TO_DATA"] = TO_DATA;
......
3187 3242
                                            loopRow["IsValid"] = "Error";
3188 3243
                                    }
3189 3244
                                }
3245

  
3190 3246
                            }                            
3191 3247

  
3192 3248
                            tieInPointIndex++;
......
3554 3610
                    if (item.Relations.First().Item.LineNumber != null && !string.IsNullOrEmpty(item.Relations.First().Item.LineNumber.Name))
3555 3611
                    {
3556 3612
                        result = item.Relations.First().Item.LineNumber.Name;
3557
                        if (item.MissingLineNumber2)
3613
                        if (item.Relations.First().Item.LineNumber.MissingLineNumber2)
3558 3614
                        {
3559 3615
                            Status += ", Missing LineNumber_2";
3560 3616
                            IsValid = "Error";
3561 3617
                        }
3562
                        if (item.MissingLineNumber1)
3618
                        if (item.Relations.First().Item.LineNumber.MissingLineNumber1)
3563 3619
                        {
3564 3620
                            Status += ", Missing LineNumber_1";
3565 3621
                            IsValid = "Error";
......
3608 3664
                    }
3609 3665
                    else if (item.ItemType == ItemType.Line)
3610 3666
                    {
3611

  
3612 3667
                        if (item.LineNumber != null && !string.IsNullOrEmpty(item.LineNumber.Name))
3613 3668
                        {
3614 3669
                            result = item.LineNumber.Name;
3615
                            if (item.MissingLineNumber2)
3670
                            if (item.LineNumber.MissingLineNumber2)
3616 3671
                            {
3617 3672
                                Status += ", Missing LineNumber_2";
3618 3673
                                IsValid = "Error";
3619 3674
                            }
3620
                            if (item.MissingLineNumber1)
3675
                            if (item.LineNumber.MissingLineNumber1)
3621 3676
                            {
3622 3677
                                Status += ", Missing LineNumber_1";
3623 3678
                                IsValid = "Error";
......
3691 3746
                if (item.Relations.Last().Item.LineNumber != null && !string.IsNullOrEmpty(item.Relations.Last().Item.LineNumber.Name))
3692 3747
                {
3693 3748
                    result = item.Relations.Last().Item.LineNumber.Name;
3694
                    if (item.MissingLineNumber2)
3749
                    if (item.Relations.Last().Item.LineNumber.MissingLineNumber2)
3695 3750
                    {
3696 3751
                        Status += ", Missing LineNumber_2";
3697 3752
                        IsValid = "Error";
3698 3753
                    }
3699
                    if (item.MissingLineNumber1)
3754
                    if (item.Relations.Last().Item.LineNumber.MissingLineNumber1)
3700 3755
                    {
3701 3756
                        Status += ", Missing LineNumber_1";
3702 3757
                        IsValid = "Error";
......
3749 3804
                    if (item.LineNumber != null && !string.IsNullOrEmpty(item.LineNumber.Name))
3750 3805
                    {
3751 3806
                        result = item.LineNumber.Name;
3752
                        if (item.MissingLineNumber2)
3807
                        if (item.LineNumber.MissingLineNumber2)
3753 3808
                        {
3754 3809
                            Status += ", Missing LineNumber_2";
3755 3810
                            IsValid = "Error";
3756 3811
                        }
3757
                        if (item.MissingLineNumber1)
3812
                        if (item.LineNumber.MissingLineNumber1)
3758 3813
                        {
3759 3814
                            Status += ", Missing LineNumber_1";
3760 3815
                            IsValid = "Error";

내보내기 Unified diff

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