프로젝트

일반

사용자정보

개정판 6a19b48d

ID6a19b48d4d65f0132542748dacd26fb0b1c9c89a
상위 c1946e9c
하위 d2050059, f5f788c2

김태성이(가) 약 2년 전에 추가함

issue #00000 페이지 이미지 download 로직 수정

Change-Id: I4da03c36b5a135eea80b57b20ada38239afd1082

차이점 보기:

KCOM_API/ServiceDeepView.svc.cs
17 17
using System.Windows;
18 18
using System.Xml;
19 19
using ColorSelector;
20
using Newtonsoft.Json.Linq;
20 21

  
21 22
namespace KCOM_API
22 23
{
......
430 431
                        _entity.SaveChanges(System.Data.Objects.SaveOptions.AcceptAllChangesAfterSave);
431 432
                    };
432 433

  
433
                    System.Runtime.Remoting.Channels.IChannel _ch = System.Runtime.Remoting.Channels.ChannelServices.GetChannel("tcp");
434
                    if (_ch == null)
434
                    if(KCOM_API.Properties.Settings.Default.FinalService.StartsWith("tcp"))
435 435
                    {
436
                        chan = new TcpChannel();
437
                        _ChanID = chan.ChannelName;
438
                        System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(chan, false);
439
                        // Create an instance of the remote object
440

  
441
                        using (KCOMEntities ec = new KCOMEntities(sConnString))
436
                        System.Runtime.Remoting.Channels.IChannel _ch = System.Runtime.Remoting.Channels.ChannelServices.GetChannel("tcp");
437
                        if (_ch == null)
442 438
                        {
439
                            chan = new TcpChannel();
440
                            _ChanID = chan.ChannelName;
441
                            System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(chan, false);
442
                            // Create an instance of the remote object
443 443

  
444
                            //remObj = (RemFinalPDFObject)Activator.GetObject(typeof(RemFinalPDFObject),
445
                            //                          "tcp://localhost:9092/remFinalPDF");
446
                            remObj = (RemFinalPDFObject)Activator.GetObject(typeof(RemFinalPDFObject),
447
                                                      //"tcp://192.168.0.67:9092/remFinalPDF");
448
                                                      KCOM_API.Properties.Settings.Default.FinalService);
449
                        }
444
                            using (KCOMEntities ec = new KCOMEntities(sConnString))
445
                            {
450 446

  
451
                        //"tcp://localhost:8080/remFinalPDF");
447
                                //remObj = (RemFinalPDFObject)Activator.GetObject(typeof(RemFinalPDFObject),
448
                                //                          "tcp://localhost:9092/remFinalPDF");
449
                                remObj = (RemFinalPDFObject)Activator.GetObject(typeof(RemFinalPDFObject),
450
                                                          //"tcp://192.168.0.67:9092/remFinalPDF");
451
                                                          KCOM_API.Properties.Settings.Default.FinalService);
452
                            }
452 453

  
453
                        _result = remObj.SetFinalPDF(ProjectNo, _finalID);
454
                        _result.FinalID = _finalID;
455
                        _result.Status = FinalStatus.Success;
454
                            //"tcp://localhost:8080/remFinalPDF");
455

  
456
                            _result = remObj.SetFinalPDF(ProjectNo, _finalID);
457
                            _result.FinalID = _finalID;
458
                            _result.Status = FinalStatus.Success;
456 459

  
457
                        //MarkupToPDF.MarkupToPDF fa = new MarkupToPDF.MarkupToPDF();
458
                        //fa.MakeFinalPDF(fm);
460
                            //MarkupToPDF.MarkupToPDF fa = new MarkupToPDF.MarkupToPDF();
461
                            //fa.MakeFinalPDF(fm);
462
                        }
463
                        else
464
                        {
465
                            _ChanID = _ch.ChannelName;
466
                        }
459 467
                    }
460 468
                    else
461 469
                    {
462
                        _ChanID = _ch.ChannelName;
470
                        System.Net.WebClient client = new System.Net.WebClient();
471
                        var convertResult = client.DownloadString($"{KCOM_API.Properties.Settings.Default.FinalService}/Rest/FinalAdd?ProjectNo={ProjectNo}&FinalID={_finalID}");
472

  
473
                        JObject jObject = JObject.Parse(convertResult, new JsonLoadSettings());
474
                        
475
                        if(jObject["FinalAddResult"].ToString() == true.ToString())
476
                        {
477
                            _result.FinalID = _finalID;
478
                            _result.Status = FinalStatus.Success;
479
                        }
463 480
                    }
481

  
464 482
                }
465 483
            }
466 484
            catch (Exception ex)
......
1999 2017
                    info.AVOID_CONSOLIDATE = 0;
2000 2018

  
2001 2019
                    Entity.MARKUP_INFO.AddObject(info);
2002
                    Entity.SaveChanges();
2003

  
2020
         
2004 2021

  
2005 2022
                    KCOMDataModel.DataModel.MARKUP_INFO_VERSION info2 = new KCOMDataModel.DataModel.MARKUP_INFO_VERSION
2006 2023
                    {
......
2008 2025
                        CREATE_DATE = DateTime.Now,
2009 2026
                        MARKUP_INFO = info,
2010 2027
                    };
2011
                    Entity.SaveChanges();
2012 2028

  
2013 2029
                    foreach (var item in instanceDataSet)
2014 2030
                    {
......
2023 2039
                            //GROUP_ID = item.GROUP_ID
2024 2040
                        });
2025 2041
                    }
2026
                    Entity.SaveChanges();
2027

  
2028 2042

  
2043
                    Entity.SaveChanges();
2029 2044
                }
2030 2045
            }
2031 2046
            catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex);

내보내기 Unified diff

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