프로젝트

일반

사용자정보

개정판 82ab5276

ID82ab52768c4a1463512f9886ddf57ca1d0b96ef4
상위 19d25294
하위 fc25ae44, 1b2e6664, c891ebf3

gaqhf 이(가) 약 5년 전에 추가함

dev issue #507 : fix attribute

Change-Id: I9418a37e46570f2cb4f122f0d63e8b42c56be02c

차이점 보기:

DTI_PID/SPPIDConverter/AutoModeling.cs
150 150
            finally
151 151
            {
152 152
                Project_DB.InsertDrawingInfoAndOPCInfo(document.PATH, drawingNumber, drawingName, document);
153
                Project_DB.InsertLineNumberInfo(document.PATH, drawingNumber, drawingName, document);
153
                //Project_DB.InsertLineNumberInfo(document.PATH, drawingNumber, drawingName, document);
154 154

  
155 155
                if (SplashScreenManager.Default != null && SplashScreenManager.Default.IsSplashFormVisible)
156 156
                {
......
186 186
                _placement = null;
187 187

  
188 188
                Thread.Sleep(1000);
189

  
190

  
191

  
192 189
            }
193 190
        }
194 191

  
DTI_PID/SPPIDConverter/ConverterDocking.cs
113 113
                            {
114 114
                                modeling.DocumentLabelText = string.Format("Drawing Name : {0} ({1}/{2})", document.DrawingName, i + 1, converterForm.Documents.Count);
115 115
                                modeling.Run();
116

  
117
                                List<string> endLine = new List<string>();
118
                                Placement placement = new Placement();
119
                                LMADataSource dataSource = placement.PIDDataSource;
120
                                
121
                                foreach (var lineNumber in document.LINENUMBERS)
122
                                {
123
                                    foreach (LineRun run in lineNumber.RUNS)
124
                                    {
125
                                        foreach (var item in run.RUNITEMS)
126
                                        {
127
                                            if (item.GetType() == typeof(Line))
128
                                            {
129
                                                Line line = item as Line;
130
                                                if (line != null && !endLine.Contains(line.SPPID.ModelItemId))
131
                                                {
132
                                                    LMModelItem _LMModelItem = dataSource.GetModelItem(line.SPPID.ModelItemId);
133
                                                    if (_LMModelItem != null && _LMModelItem.get_ItemStatus() == "Active")
134
                                                    {
135
                                                        foreach (var attribute in lineNumber.ATTRIBUTES)
136
                                                        {
137
                                                            LineNumberMapping mapping = document.LineNumberMappings.Find(x => x.UID == attribute.UID);
138
                                                            if (mapping != null && !string.IsNullOrEmpty(attribute.VALUE) && attribute.VALUE != "None" && mapping.SPPIDATTRIBUTENAME == "PlantGroup.Name")
139
                                                            {
140
                                                                LMAAttribute _LMAAttribute = _LMModelItem.Attributes[mapping.SPPIDATTRIBUTENAME];
141
                                                                if (_LMAAttribute != null)
142
                                                                {
143
                                                                    if (DBNull.Value.Equals(_LMAAttribute.get_Value()))
144
                                                                        _LMAAttribute.set_Value(attribute.VALUE);
145
                                                                    else if (_LMAAttribute.get_Value() != attribute.VALUE)
146
                                                                        _LMAAttribute.set_Value(attribute.VALUE);
147
                                                                }
148
                                                            }
149
                                                        }
150
                                                        _LMModelItem.Commit();
151
                                                    }
152
                                                    if (_LMModelItem != null)
153
                                                        ReleaseCOMObjects(_LMModelItem);
154
                                                    endLine.Add(line.SPPID.ModelItemId);
155
                                                }
156
                                            }
157
                                        }
158
                                    }
159
                                }
160

  
161
                                ReleaseCOMObjects(dataSource);
162
                                ReleaseCOMObjects(placement);
116 163
                            }
117 164
                        }
118 165
                    }
DTI_PID/SPPIDConverter/ConverterForm.Designer.cs
133 133
            this.ribbonControl.ShowDisplayOptionsMenuButton = DevExpress.Utils.DefaultBoolean.False;
134 134
            this.ribbonControl.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.ShowOnMultiplePages;
135 135
            this.ribbonControl.ShowToolbarCustomizeItem = false;
136
            this.ribbonControl.Size = new System.Drawing.Size(1242, 32);
136
            this.ribbonControl.Size = new System.Drawing.Size(1242, 27);
137 137
            this.ribbonControl.Toolbar.ShowCustomizeItem = false;
138 138
            // 
139 139
            // layoutControl1
......
149 149
            this.layoutControl1.Controls.Add(this.btnSPPIDDB);
150 150
            this.layoutControl1.Controls.Add(this.gridControlConverter);
151 151
            this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
152
            this.layoutControl1.Location = new System.Drawing.Point(0, 32);
152
            this.layoutControl1.Location = new System.Drawing.Point(0, 27);
153 153
            this.layoutControl1.Name = "layoutControl1";
154 154
            this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(982, 292, 650, 400);
155 155
            this.layoutControl1.Root = this.Root;
156
            this.layoutControl1.Size = new System.Drawing.Size(1242, 569);
156
            this.layoutControl1.Size = new System.Drawing.Size(1242, 574);
157 157
            this.layoutControl1.TabIndex = 1;
158 158
            this.layoutControl1.Text = "layoutControl1";
159 159
            // 
160 160
            // btnID2DB
161 161
            // 
162 162
            this.btnID2DB.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnID2DB.ImageOptions.SvgImage")));
163
            this.btnID2DB.Location = new System.Drawing.Point(973, 58);
163
            this.btnID2DB.Location = new System.Drawing.Point(968, 64);
164 164
            this.btnID2DB.Name = "btnID2DB";
165
            this.btnID2DB.Size = new System.Drawing.Size(245, 36);
165
            this.btnID2DB.Size = new System.Drawing.Size(250, 38);
166 166
            this.btnID2DB.StyleController = this.layoutControl1;
167 167
            this.btnID2DB.TabIndex = 15;
168 168
            this.btnID2DB.Text = "Setting";
......
170 170
            // 
171 171
            // checkEditCloseDocument
172 172
            // 
173
            this.checkEditCloseDocument.Location = new System.Drawing.Point(741, 76);
173
            this.checkEditCloseDocument.Location = new System.Drawing.Point(741, 82);
174 174
            this.checkEditCloseDocument.MenuManager = this.ribbonControl;
175 175
            this.checkEditCloseDocument.Name = "checkEditCloseDocument";
176 176
            this.checkEditCloseDocument.Properties.Caption = "Close Document";
177
            this.checkEditCloseDocument.Size = new System.Drawing.Size(111, 18);
177
            this.checkEditCloseDocument.Size = new System.Drawing.Size(111, 19);
178 178
            this.checkEditCloseDocument.StyleController = this.layoutControl1;
179 179
            this.checkEditCloseDocument.TabIndex = 14;
180 180
            // 
181 181
            // btnRefresh
182 182
            // 
183 183
            this.btnRefresh.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnRefresh.ImageOptions.SvgImage")));
184
            this.btnRefresh.Location = new System.Drawing.Point(155, 58);
184
            this.btnRefresh.Location = new System.Drawing.Point(155, 64);
185 185
            this.btnRefresh.Name = "btnRefresh";
186 186
            this.btnRefresh.Size = new System.Drawing.Size(101, 38);
187 187
            this.btnRefresh.StyleController = this.layoutControl1;
......
191 191
            // 
192 192
            // comboBoxEditDefaultTemplate
193 193
            // 
194
            this.comboBoxEditDefaultTemplate.Location = new System.Drawing.Point(612, 76);
194
            this.comboBoxEditDefaultTemplate.Location = new System.Drawing.Point(612, 82);
195 195
            this.comboBoxEditDefaultTemplate.MenuManager = this.ribbonControl;
196 196
            this.comboBoxEditDefaultTemplate.Name = "comboBoxEditDefaultTemplate";
197 197
            this.comboBoxEditDefaultTemplate.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
......
204 204
            // 
205 205
            // buttonEditDefaultUnit
206 206
            // 
207
            this.buttonEditDefaultUnit.Location = new System.Drawing.Point(393, 76);
207
            this.buttonEditDefaultUnit.Location = new System.Drawing.Point(393, 82);
208 208
            this.buttonEditDefaultUnit.MenuManager = this.ribbonControl;
209 209
            this.buttonEditDefaultUnit.Name = "buttonEditDefaultUnit";
210 210
            this.buttonEditDefaultUnit.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
......
219 219
            // btnRun
220 220
            // 
221 221
            this.btnRun.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnRun.ImageOptions.SvgImage")));
222
            this.btnRun.Location = new System.Drawing.Point(856, 58);
222
            this.btnRun.Location = new System.Drawing.Point(856, 64);
223 223
            this.btnRun.Name = "btnRun";
224 224
            this.btnRun.Size = new System.Drawing.Size(79, 36);
225 225
            this.btnRun.StyleController = this.layoutControl1;
......
230 230
            // btnLoadFile
231 231
            // 
232 232
            this.btnLoadFile.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnLoadFile.ImageOptions.SvgImage")));
233
            this.btnLoadFile.Location = new System.Drawing.Point(24, 58);
233
            this.btnLoadFile.Location = new System.Drawing.Point(24, 64);
234 234
            this.btnLoadFile.Name = "btnLoadFile";
235 235
            this.btnLoadFile.Size = new System.Drawing.Size(110, 36);
236 236
            this.btnLoadFile.StyleController = this.layoutControl1;
......
241 241
            // btnItemMapping
242 242
            // 
243 243
            this.btnItemMapping.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnItemMapping.ImageOptions.SvgImage")));
244
            this.btnItemMapping.Location = new System.Drawing.Point(973, 344);
244
            this.btnItemMapping.Location = new System.Drawing.Point(968, 366);
245 245
            this.btnItemMapping.Name = "btnItemMapping";
246
            this.btnItemMapping.Size = new System.Drawing.Size(245, 36);
246
            this.btnItemMapping.Size = new System.Drawing.Size(250, 38);
247 247
            this.btnItemMapping.StyleController = this.layoutControl1;
248 248
            this.btnItemMapping.TabIndex = 7;
249 249
            this.btnItemMapping.Text = "Item Mapping Setting";
......
252 252
            // btnSPPIDDB
253 253
            // 
254 254
            this.btnSPPIDDB.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnSPPIDDB.ImageOptions.SvgImage")));
255
            this.btnSPPIDDB.Location = new System.Drawing.Point(973, 210);
255
            this.btnSPPIDDB.Location = new System.Drawing.Point(968, 224);
256 256
            this.btnSPPIDDB.Name = "btnSPPIDDB";
257
            this.btnSPPIDDB.Size = new System.Drawing.Size(245, 36);
257
            this.btnSPPIDDB.Size = new System.Drawing.Size(250, 38);
258 258
            this.btnSPPIDDB.StyleController = this.layoutControl1;
259 259
            this.btnSPPIDDB.TabIndex = 5;
260 260
            this.btnSPPIDDB.Text = "Setting";
......
262 262
            // 
263 263
            // gridControlConverter
264 264
            // 
265
            this.gridControlConverter.Location = new System.Drawing.Point(24, 100);
265
            this.gridControlConverter.Location = new System.Drawing.Point(24, 106);
266 266
            this.gridControlConverter.MainView = this.gridViewConverter;
267 267
            this.gridControlConverter.MenuManager = this.ribbonControl;
268 268
            this.gridControlConverter.Name = "gridControlConverter";
269
            this.gridControlConverter.Size = new System.Drawing.Size(911, 445);
269
            this.gridControlConverter.Size = new System.Drawing.Size(911, 444);
270 270
            this.gridControlConverter.TabIndex = 4;
271 271
            this.gridControlConverter.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
272 272
            this.gridViewConverter});
......
291 291
            this.layoutControlGroupID2Project,
292 292
            this.splitterItem1});
293 293
            this.Root.Name = "Root";
294
            this.Root.Size = new System.Drawing.Size(1242, 569);
294
            this.Root.Size = new System.Drawing.Size(1242, 574);
295 295
            this.Root.TextVisible = false;
296 296
            // 
297 297
            // layoutControlGroupSPPIDDB
......
304 304
            this.layoutControlItem2,
305 305
            this.simpleLabelItem2,
306 306
            this.simpleLabelItem1});
307
            this.layoutControlGroupSPPIDDB.Location = new System.Drawing.Point(949, 152);
307
            this.layoutControlGroupSPPIDDB.Location = new System.Drawing.Point(944, 160);
308 308
            this.layoutControlGroupSPPIDDB.Name = "layoutControlGroupSPPIDDB";
309
            this.layoutControlGroupSPPIDDB.Size = new System.Drawing.Size(273, 134);
309
            this.layoutControlGroupSPPIDDB.Size = new System.Drawing.Size(278, 142);
310 310
            this.layoutControlGroupSPPIDDB.Text = "SPPID DB";
311 311
            // 
312 312
            // labelSPPIDPlantName
313 313
            // 
314 314
            this.labelSPPIDPlantName.AllowHotTrack = false;
315 315
            this.labelSPPIDPlantName.AppearanceItemCaption.Options.UseForeColor = true;
316
            this.labelSPPIDPlantName.Location = new System.Drawing.Point(78, 40);
316
            this.labelSPPIDPlantName.Location = new System.Drawing.Point(78, 42);
317 317
            this.labelSPPIDPlantName.Name = "labelSPPIDPlantName";
318
            this.labelSPPIDPlantName.Size = new System.Drawing.Size(171, 18);
318
            this.labelSPPIDPlantName.Size = new System.Drawing.Size(176, 18);
319 319
            this.labelSPPIDPlantName.Text = "SPPIDPlantName";
320 320
            this.labelSPPIDPlantName.TextSize = new System.Drawing.Size(93, 14);
321 321
            // 
......
323 323
            // 
324 324
            this.labelSPPIDDBStatus.AllowHotTrack = false;
325 325
            this.labelSPPIDDBStatus.AppearanceItemCaption.Options.UseForeColor = true;
326
            this.labelSPPIDDBStatus.Location = new System.Drawing.Point(51, 58);
326
            this.labelSPPIDDBStatus.Location = new System.Drawing.Point(51, 60);
327 327
            this.labelSPPIDDBStatus.Name = "labelSPPIDDBStatus";
328
            this.labelSPPIDDBStatus.Size = new System.Drawing.Size(198, 18);
328
            this.labelSPPIDDBStatus.Size = new System.Drawing.Size(203, 18);
329 329
            this.labelSPPIDDBStatus.Text = "SPPIDDBStatus";
330 330
            this.labelSPPIDDBStatus.TextSize = new System.Drawing.Size(93, 14);
331 331
            // 
......
334 334
            this.layoutControlItem2.Control = this.btnSPPIDDB;
335 335
            this.layoutControlItem2.Location = new System.Drawing.Point(0, 0);
336 336
            this.layoutControlItem2.Name = "layoutControlItem2";
337
            this.layoutControlItem2.Size = new System.Drawing.Size(249, 40);
337
            this.layoutControlItem2.Size = new System.Drawing.Size(254, 42);
338 338
            this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
339 339
            this.layoutControlItem2.TextVisible = false;
340 340
            // 
......
342 342
            // 
343 343
            this.simpleLabelItem2.AllowHotTrack = false;
344 344
            this.simpleLabelItem2.AppearanceItemCaption.Options.UseForeColor = true;
345
            this.simpleLabelItem2.Location = new System.Drawing.Point(0, 58);
345
            this.simpleLabelItem2.Location = new System.Drawing.Point(0, 60);
346 346
            this.simpleLabelItem2.MaxSize = new System.Drawing.Size(51, 18);
347 347
            this.simpleLabelItem2.MinSize = new System.Drawing.Size(51, 18);
348 348
            this.simpleLabelItem2.Name = "simpleLabelItem2";
......
356 356
            // 
357 357
            this.simpleLabelItem1.AllowHotTrack = false;
358 358
            this.simpleLabelItem1.AppearanceItemCaption.Options.UseForeColor = true;
359
            this.simpleLabelItem1.Location = new System.Drawing.Point(0, 40);
359
            this.simpleLabelItem1.Location = new System.Drawing.Point(0, 42);
360 360
            this.simpleLabelItem1.MaxSize = new System.Drawing.Size(78, 18);
361 361
            this.simpleLabelItem1.MinSize = new System.Drawing.Size(78, 18);
362 362
            this.simpleLabelItem1.Name = "simpleLabelItem1";
......
374 374
            this.layoutControlItem4,
375 375
            this.labelItemMappingStatus,
376 376
            this.simpleLabelItem5});
377
            this.layoutControlGroupItemMapping.Location = new System.Drawing.Point(949, 286);
377
            this.layoutControlGroupItemMapping.Location = new System.Drawing.Point(944, 302);
378 378
            this.layoutControlGroupItemMapping.Name = "layoutControlGroupItemMapping";
379
            this.layoutControlGroupItemMapping.Size = new System.Drawing.Size(273, 116);
379
            this.layoutControlGroupItemMapping.Size = new System.Drawing.Size(278, 124);
380 380
            this.layoutControlGroupItemMapping.Text = "Item Mapping";
381 381
            // 
382 382
            // layoutControlItem4
......
384 384
            this.layoutControlItem4.Control = this.btnItemMapping;
385 385
            this.layoutControlItem4.Location = new System.Drawing.Point(0, 0);
386 386
            this.layoutControlItem4.Name = "layoutControlItem4";
387
            this.layoutControlItem4.Size = new System.Drawing.Size(249, 40);
387
            this.layoutControlItem4.Size = new System.Drawing.Size(254, 42);
388 388
            this.layoutControlItem4.TextSize = new System.Drawing.Size(0, 0);
389 389
            this.layoutControlItem4.TextVisible = false;
390 390
            // 
......
392 392
            // 
393 393
            this.labelItemMappingStatus.AllowHotTrack = false;
394 394
            this.labelItemMappingStatus.AppearanceItemCaption.Options.UseForeColor = true;
395
            this.labelItemMappingStatus.Location = new System.Drawing.Point(51, 40);
395
            this.labelItemMappingStatus.Location = new System.Drawing.Point(51, 42);
396 396
            this.labelItemMappingStatus.Name = "labelItemMappingStatus";
397
            this.labelItemMappingStatus.Size = new System.Drawing.Size(198, 18);
397
            this.labelItemMappingStatus.Size = new System.Drawing.Size(203, 18);
398 398
            this.labelItemMappingStatus.Text = "MappingStatus";
399 399
            this.labelItemMappingStatus.TextSize = new System.Drawing.Size(93, 14);
400 400
            // 
......
402 402
            // 
403 403
            this.simpleLabelItem5.AllowHotTrack = false;
404 404
            this.simpleLabelItem5.AppearanceItemCaption.Options.UseForeColor = true;
405
            this.simpleLabelItem5.Location = new System.Drawing.Point(0, 40);
405
            this.simpleLabelItem5.Location = new System.Drawing.Point(0, 42);
406 406
            this.simpleLabelItem5.MaxSize = new System.Drawing.Size(51, 18);
407 407
            this.simpleLabelItem5.MinSize = new System.Drawing.Size(51, 18);
408 408
            this.simpleLabelItem5.Name = "simpleLabelItem5";
......
430 430
            this.emptySpaceItem5});
431 431
            this.layoutControlGroupAutoConverter.Location = new System.Drawing.Point(0, 0);
432 432
            this.layoutControlGroupAutoConverter.Name = "layoutControlGroupAutoConverter";
433
            this.layoutControlGroupAutoConverter.Size = new System.Drawing.Size(939, 549);
433
            this.layoutControlGroupAutoConverter.Size = new System.Drawing.Size(939, 554);
434 434
            this.layoutControlGroupAutoConverter.Text = "Auto Converter";
435 435
            // 
436 436
            // layoutControlItem1
......
438 438
            this.layoutControlItem1.Control = this.gridControlConverter;
439 439
            this.layoutControlItem1.Location = new System.Drawing.Point(0, 42);
440 440
            this.layoutControlItem1.Name = "layoutControlItem1";
441
            this.layoutControlItem1.Size = new System.Drawing.Size(915, 449);
441
            this.layoutControlItem1.Size = new System.Drawing.Size(915, 448);
442 442
            this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
443 443
            this.layoutControlItem1.TextVisible = false;
444 444
            // 
......
547 547
            // emptySpaceItem1
548 548
            // 
549 549
            this.emptySpaceItem1.AllowHotTrack = false;
550
            this.emptySpaceItem1.Location = new System.Drawing.Point(949, 402);
550
            this.emptySpaceItem1.Location = new System.Drawing.Point(944, 426);
551 551
            this.emptySpaceItem1.Name = "emptySpaceItem1";
552
            this.emptySpaceItem1.Size = new System.Drawing.Size(273, 147);
552
            this.emptySpaceItem1.Size = new System.Drawing.Size(278, 128);
553 553
            this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
554 554
            // 
555 555
            // layoutControlGroupID2Project
......
564 564
            this.layoutControlItem7,
565 565
            this.labelDBType,
566 566
            this.simpleLabelItem7});
567
            this.layoutControlGroupID2Project.Location = new System.Drawing.Point(949, 0);
567
            this.layoutControlGroupID2Project.Location = new System.Drawing.Point(944, 0);
568 568
            this.layoutControlGroupID2Project.Name = "layoutControlGroupID2Project";
569
            this.layoutControlGroupID2Project.Size = new System.Drawing.Size(273, 152);
569
            this.layoutControlGroupID2Project.Size = new System.Drawing.Size(278, 160);
570 570
            this.layoutControlGroupID2Project.Text = "ID2 Project";
571 571
            // 
572 572
            // labelID2ProjectName
573 573
            // 
574 574
            this.labelID2ProjectName.AllowHotTrack = false;
575 575
            this.labelID2ProjectName.AppearanceItemCaption.Options.UseForeColor = true;
576
            this.labelID2ProjectName.Location = new System.Drawing.Point(90, 40);
576
            this.labelID2ProjectName.Location = new System.Drawing.Point(90, 42);
577 577
            this.labelID2ProjectName.Name = "labelID2ProjectName";
578
            this.labelID2ProjectName.Size = new System.Drawing.Size(159, 18);
578
            this.labelID2ProjectName.Size = new System.Drawing.Size(164, 18);
579 579
            this.labelID2ProjectName.Text = "ID2ProjectName";
580 580
            this.labelID2ProjectName.TextSize = new System.Drawing.Size(93, 14);
581 581
            // 
......
583 583
            // 
584 584
            this.labelID2ProjectStatus.AllowHotTrack = false;
585 585
            this.labelID2ProjectStatus.AppearanceItemCaption.Options.UseForeColor = true;
586
            this.labelID2ProjectStatus.Location = new System.Drawing.Point(51, 76);
586
            this.labelID2ProjectStatus.Location = new System.Drawing.Point(51, 78);
587 587
            this.labelID2ProjectStatus.Name = "labelID2ProjectStatus";
588
            this.labelID2ProjectStatus.Size = new System.Drawing.Size(198, 18);
588
            this.labelID2ProjectStatus.Size = new System.Drawing.Size(203, 18);
589 589
            this.labelID2ProjectStatus.Text = "ID2ProjectStatus";
590 590
            this.labelID2ProjectStatus.TextSize = new System.Drawing.Size(93, 14);
591 591
            // 
......
593 593
            // 
594 594
            this.simpleLabelItem3.AllowHotTrack = false;
595 595
            this.simpleLabelItem3.AppearanceItemCaption.Options.UseForeColor = true;
596
            this.simpleLabelItem3.Location = new System.Drawing.Point(0, 40);
596
            this.simpleLabelItem3.Location = new System.Drawing.Point(0, 42);
597 597
            this.simpleLabelItem3.MaxSize = new System.Drawing.Size(90, 18);
598 598
            this.simpleLabelItem3.MinSize = new System.Drawing.Size(90, 18);
599 599
            this.simpleLabelItem3.Name = "simpleLabelItem3";
......
607 607
            // 
608 608
            this.simpleLabelItem4.AllowHotTrack = false;
609 609
            this.simpleLabelItem4.AppearanceItemCaption.Options.UseForeColor = true;
610
            this.simpleLabelItem4.Location = new System.Drawing.Point(0, 76);
610
            this.simpleLabelItem4.Location = new System.Drawing.Point(0, 78);
611 611
            this.simpleLabelItem4.MaxSize = new System.Drawing.Size(51, 18);
612 612
            this.simpleLabelItem4.MinSize = new System.Drawing.Size(51, 18);
613 613
            this.simpleLabelItem4.Name = "simpleLabelItem4";
......
622 622
            this.layoutControlItem7.Control = this.btnID2DB;
623 623
            this.layoutControlItem7.Location = new System.Drawing.Point(0, 0);
624 624
            this.layoutControlItem7.Name = "layoutControlItem7";
625
            this.layoutControlItem7.Size = new System.Drawing.Size(249, 40);
625
            this.layoutControlItem7.Size = new System.Drawing.Size(254, 42);
626 626
            this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
627 627
            this.layoutControlItem7.TextVisible = false;
628 628
            // 
......
630 630
            // 
631 631
            this.labelDBType.AllowHotTrack = false;
632 632
            this.labelDBType.AppearanceItemCaption.Options.UseForeColor = true;
633
            this.labelDBType.Location = new System.Drawing.Point(63, 58);
633
            this.labelDBType.Location = new System.Drawing.Point(63, 60);
634 634
            this.labelDBType.MinSize = new System.Drawing.Size(97, 18);
635 635
            this.labelDBType.Name = "labelDBType";
636
            this.labelDBType.Size = new System.Drawing.Size(186, 18);
636
            this.labelDBType.Size = new System.Drawing.Size(191, 18);
637 637
            this.labelDBType.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
638 638
            this.labelDBType.Text = "DB Type";
639 639
            this.labelDBType.TextSize = new System.Drawing.Size(93, 14);
......
642 642
            // 
643 643
            this.simpleLabelItem7.AllowHotTrack = false;
644 644
            this.simpleLabelItem7.AppearanceItemCaption.Options.UseForeColor = true;
645
            this.simpleLabelItem7.Location = new System.Drawing.Point(0, 58);
645
            this.simpleLabelItem7.Location = new System.Drawing.Point(0, 60);
646 646
            this.simpleLabelItem7.MaxSize = new System.Drawing.Size(63, 18);
647 647
            this.simpleLabelItem7.MinSize = new System.Drawing.Size(63, 18);
648 648
            this.simpleLabelItem7.Name = "simpleLabelItem7";
......
657 657
            this.splitterItem1.AllowHotTrack = true;
658 658
            this.splitterItem1.Location = new System.Drawing.Point(939, 0);
659 659
            this.splitterItem1.Name = "splitterItem1";
660
            this.splitterItem1.Size = new System.Drawing.Size(10, 549);
660
            this.splitterItem1.Size = new System.Drawing.Size(5, 554);
661 661
            // 
662 662
            // xtraFolderBrowserDialog
663 663
            // 
DTI_PID/SPPIDConverter/DB/Project_DB.cs
10 10
using Converter.SPPID;
11 11
using System.IO;
12 12
using Newtonsoft.Json;
13
using Converter.SPPID.Model;
13 14

  
14 15
namespace Converter.BaseModel
15 16
{
......
1947 1948
            return true;
1948 1949
        }
1949 1950

  
1950
        public static bool InsertLineNumberInfo(string path, string drawingNumber, string drawingName, SPPID.Model.SPPID_Document document)
1951
        public static bool InsertLineNumberInfo(string path, string drawingNumber, string drawingName, SPPID_Document document)
1951 1952
        {
1952
            bool result = false;
1953
            
1954
            return result;
1953
            Project_Info projectInfo = Project_Info.GetInstance();
1954
            if (projectInfo.DBType == ID2DB_Type.SQLite)
1955
            {
1956
                using (SQLiteConnection connection = new SQLiteConnection(string.Format(CultureInfo.CurrentCulture, "Data Source = {0}", projectInfo.DBFilePath)))
1957
                {
1958
                    try
1959
                    {
1960
                        connection.Open();
1961
                        using (SQLiteTransaction transaction = connection.BeginTransaction())
1962
                        {
1963
                            try
1964
                            {
1965
                                using (SQLiteCommand cmd = connection.CreateCommand())
1966
                                {
1967
                                    foreach (var lineNumber in document.LINENUMBERS)
1968
                                    {
1969
                                        foreach (var attribute in lineNumber.ATTRIBUTES)
1970
                                        {
1971
                                            LineNumberMapping mapping = document.LineNumberMappings.Find(x => x.UID == attribute.UID);
1972
                                            if (mapping != null && !string.IsNullOrEmpty(attribute.VALUE) && attribute.VALUE != "None")
1973
                                            {
1974
                                                if (mapping.SPPIDATTRIBUTENAME == "PlantGroup.Name")
1975
                                                {
1976
                                                    cmd.Parameters.Clear();
1977

  
1978

  
1979

  
1980
                                                    cmd.ExecuteNonQuery();
1981
                                                }
1982
                                            }
1983
                                        }
1984
                                    }
1985
                                }
1986

  
1987
                                transaction.Commit();
1988
                                connection.Close();
1989
                            }
1990
                            catch (Exception ex)
1991
                            {
1992
                                Log.Write(ex.Message + "\r\n" + ex.StackTrace);
1993
                                transaction.Rollback();
1994
                                return false;
1995
                            }
1996
                            finally
1997
                            {
1998
                                transaction.Dispose();
1999
                            }
2000
                        }
2001
                    }
2002
                    catch (Exception ex)
2003
                    {
2004
                        Log.Write(ex.Message + "\r\n" + ex.StackTrace);
2005
                        return false;
2006
                    }
2007
                    finally
2008
                    {
2009
                        connection.Dispose();
2010
                    }
2011
                }
2012
            }
2013
            else if (projectInfo.DBType == ID2DB_Type.MSSQL)
2014
            {
2015
                using (SqlConnection connection = GetSqlConnection())
2016
                {
2017
                    try
2018
                    {
2019
                        if (connection != null && connection.State == ConnectionState.Open)
2020
                        {
2021
                            using (SqlCommand cmd = connection.CreateCommand())
2022
                            {
2023
                                foreach (var lineNumber in document.LINENUMBERS)
2024
                                {
2025
                                    foreach (var attribute in lineNumber.ATTRIBUTES)
2026
                                    {
2027
                                        LineNumberMapping mapping = document.LineNumberMappings.Find(x => x.UID == attribute.UID);
2028
                                        if (mapping != null && !string.IsNullOrEmpty(attribute.VALUE) && attribute.VALUE != "None")
2029
                                        {
2030
                                            if (mapping.SPPIDATTRIBUTENAME == "PlantGroup.Name")
2031
                                            {
2032
                                                cmd.Parameters.Clear();
2033

  
2034
                                                cmd.ExecuteNonQuery();
2035
                                            }
2036
                                        }
2037
                                    }
2038
                                }
2039
                            }
2040
                            connection.Close();
2041
                        }
2042
                    }
2043
                    catch (Exception ex)
2044
                    {
2045
                        Log.Write(ex.Message + "\r\n" + ex.StackTrace);
2046
                        return false;
2047
                    }
2048
                    finally
2049
                    {
2050
                        if (connection != null)
2051
                            connection.Dispose();
2052
                    }
2053
                }
2054
            }
2055
            return true;
1955 2056
        }
1956 2057
        public static bool InsertOPCInfo(string UID, string ModelItemID, string drawingUID, bool Paired)
1957 2058
        {

내보내기 Unified diff

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