프로젝트

일반

사용자정보

개정판 3bde451b

ID3bde451b422200cd73fd780e9fdbaa7768afaead
상위 7b095cc3
하위 504c5aa1, 2c634aed

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

FINALPDF와 CONVERT_DOC 저장 프로시저로 변경

Change-Id: I832b4103112d7b9968f573688378b779a9df2db8

차이점 보기:

ConvertService/ServiceBase/IServiceBase/ConvertItem.cs
38 38
            this._convertID = ID;
39 39
        }
40 40

  
41

  
41 42
        public ConvertItem(string key, string ProjectNo, string ID, string originfilePath)
42 43
        {
43 44
            this._uniqueKey = key;
......
101 102
            this._FileName = result;
102 103
        }
103 104

  
104
        //DataSearch 상단 그리드 Search 
105
        //DataSearch 상단 그리드 Search  DataConvert
105 106
        public ConvertItem(string serviceID, string convertId ,string projectNo, int Status, string documentID, string documentName, string documentNo, string document_URL, string revision, int currentPageNo, int totalPage, string exception, string groupNo,
106
            DateTime create_datetime, DateTime? start_datetime, DateTime? end_datetime , string originfilePath, string convertPath, string markusLink)
107
            DateTime create_datetime, DateTime? start_datetime, DateTime? end_datetime , string originfilePath, string convertPath, string markusLink, int? reconverter)//20
107 108
        {//세미
108 109
            ServiceID = serviceID;
109 110
            DocumentID = documentID;
......
125 126
            ConvertPath = convertPath;
126 127
            MarkusLink = markusLink;
127 128
            OriginfilePath = originfilePath;
129
            ReConverter = reconverter;
128 130

  
129 131
            string result = "";
130 132
            if (originfilePath.Contains("/"))
......
138 140
            this._FileName = result;
139 141
        }
140 142

  
143
        public ConvertItem(string convertId, string projectNo, int Status, string documentID, string markupInfoID, string docInfoID ,string documentName, string documentNo, string createUserID,//20
144
            string revision, int currentPageNo, int totalPage, string exception, string groupNo, DateTime create_datetime, DateTime? start_datetime, DateTime? end_datetime, string originfilePath,
145
            string convertPath, string markusLink, int Final)
146
        {//FinalPDF
147
            ConvertID = convertId;
148
            ProjectNumber = projectNo;
149
            DocumentID = documentID;
150
            ConvertID = convertId;
151
            ProjectNumber = projectNo;
152
            MarkupInfo_ID = markupInfoID;
153
            Create_User_ID = createUserID;
154
            ConvertState = (StatusCodeType)Status;
155
            DocInfo_ID = docInfoID;
156
            DocumnetName = documentName;
157
            DocumnetNo = documentNo;
158
            Revision = revision;
159
            CurrentPageNo = currentPageNo;
160
            TotalPage = totalPage;
161
            Exception = exception;
162
            GroupNo = groupNo;
163
            CreateTime = create_datetime;
164
            StartTime = start_datetime;
165
            EndTime = end_datetime;
166
            ConvertPath = convertPath;
167
            MarkusLink = markusLink;
168
            OriginfilePath = originfilePath;
169

  
170
            if (OriginfilePath != null)
171
            {
172
                string result = "";
173
                if (originfilePath.Contains("/"))
174
                {
175
                    result = originfilePath.Substring(originfilePath.LastIndexOf("/") + 1);
176
                }
177
                else
178
                {
179
                    result = originfilePath.Substring(originfilePath.LastIndexOf("%") + 1);
180
                }
181
                this._FileName = result;
182
            }
183
            else
184
            {
185
                this._FileName = "";
186
            }
187
        }
141 188

  
142 189
        string _uniqueKey;
143 190
        string _projectNumber;
144 191
        string _convertID;
145 192
        string _serviceID;
146
        int _reConverter;
193
        int? _reConverter;
147 194
        string _originfilePath;
148 195
        string _FileName;
149 196
        string _convertPath;
......
210 257
        }
211 258

  
212 259
        [DataMember]
213
        public int ReConverter
260
        public int? ReConverter
214 261
        {
215 262
            get
216 263
            {
......
595 642
            }
596 643
        }
597 644

  
645
        [DataMember]
646
        private string _DocInfo_ID;
647
        public string DocInfo_ID
648
        {
649
            get
650
            {
651
                return _DocInfo_ID;
652
            }
653
            set
654
            {
655
                if (_DocInfo_ID != value)
656
                {
657
                    _DocInfo_ID = value;
658
                    OnPropertyChanged("DocInfo_ID");
659

  
660
                }
661
            }
662
        }
598 663

  
664
        [DataMember]
665
        private string _MarkupInfo_ID;
666
        public string MarkupInfo_ID
667
        {
668
            get
669
            {
670
                return _MarkupInfo_ID;
671
            }
672
            set
673
            {
674
                if (_MarkupInfo_ID != value)
675
                {
676
                    _MarkupInfo_ID = value;
677
                    OnPropertyChanged("MarkupInfo_ID");
599 678

  
679
                }
680
            }
681
        }
682

  
683
        [DataMember]
684
        private string _Create_User_ID;
685
        public string Create_User_ID
686
        {
687
            get
688
            {
689
                return _Create_User_ID;
690
            }
691
            set
692
            {
693
                if (_Create_User_ID != value)
694
                {
695
                    _Create_User_ID = value;
696
                    OnPropertyChanged("Create_User_ID");
697

  
698
                }
699
            }
700
        }
600 701
    }
601 702
}
ConvertService/ServiceBase/Markus.Service.DataBase/ConvertDatabase.cs
77 77
        /// <summary>
78 78
        /// 상단 그리드 선택된 Status에 따라 DB에서 값 가져온다.
79 79
        /// </summary>
80
        public IEnumerable<Interface.ConvertItem> GetConvertProjects(int status,string ProjectNumberFilter, string UniqueKeyFilter, string Docuemnt_NameFilter, string Service_IDFilter, string Docuemnt_NOFilter, int? ReconverterFilter
80
        public IEnumerable<Interface.ConvertItem> GetConvertProjects(int status,string ProjectNumberFilter, string UniqueKeyFilter, string Document_NameFilter, string Service_IDFilter, string Docuemnt_NOFilter, int? ReconverterFilter
81 81
            , string RevisionFilter)
82 82
        {
83 83
            List<Interface.ConvertItem> convertItems = new List<Interface.ConvertItem>();
......
88 88
                        //
89 89
                        (
90 90
                         items.PROJECT_NO.Contains(ProjectNumberFilter)
91
                         || subpet.DOCUMENT_NAME.Contains(Docuemnt_NameFilter)
91
                         || subpet.DOCUMENT_NAME.Contains(Document_NameFilter)
92 92
                         || items.SERVICE_ID.Contains(Service_IDFilter)
93 93
                         || subpet.ID.Contains(UniqueKeyFilter)
94 94
                         || subpet.DOCUMENT_NO.Contains(Docuemnt_NOFilter)
......
167 167

  
168 168
        }
169 169

  
170
       
170
        /// <summary>Final PDF
171
        /// 상단 그리드 선택된 Status에 따라 DB에서 값 가져온다.
172
        /// </summary>
173
        public IEnumerable<Interface.ConvertItem> GetFinalPDFProjects(int status, string ProjectNumberFilter, string DocumentIDFIlter, string MarkupInfo_IDFilter, string DOCINFO_IDFilter, string Document_NameFilter,
174
            string Docuemnt_NOFilter, string CreateUser_IDFilter)
175
        {
176
            var MarkupInfo_IDFilter_Int = 0;
177
            if (MarkupInfo_IDFilter != null)
178
            {
179
                MarkupInfo_IDFilter_Int = int.Parse(MarkupInfo_IDFilter);
180
            }
181

  
182
            List<Interface.ConvertItem> convertItems = new List<Interface.ConvertItem>();
183
            var query = from items in entities.FINAL_PDF
184
                        join documents in entities.DOCUMENT_ITEM on items.DOCUMENT_ID equals documents.DOCUMENT_ID into GroupItems
185
                        from subpet in GroupItems.DefaultIfEmpty()
186
                        where items.STATUS == status &&
187
                        //
188
                        (
189
                         items.PROJECT_NO.Contains(ProjectNumberFilter)
190
                         || subpet.DOCUMENT_ID.Contains(DocumentIDFIlter)
191
                         || items.MARKUPINFO_ID == MarkupInfo_IDFilter_Int
192
                         || items.DOCINFO_ID.Contains(DOCINFO_IDFilter)
193
                         || subpet.DOCUMENT_NAME.Contains(Document_NameFilter)
194
                         || subpet.DOCUMENT_NO.Contains(Docuemnt_NOFilter)
195
                         || items.CREATE_USER_ID.Contains(CreateUser_IDFilter)
196
                         )
197
                        //
198
                        orderby items.CREATE_DATETIME descending
199
                        select new
200
                        {
201
                            ID = items.ID,
202
                            PROJECT_NO = items.PROJECT_NO,
203
                            DOCINFO_ID = items.DOCINFO_ID,
204
                            MARKUPINFO_ID = items.MARKUPINFO_ID,
205
                            CREATE_USER_ID = items.CREATE_USER_ID,
206
                            CREATE_DATETIME = items.CREATE_DATETIME,
207
                            STATUS = items.STATUS,
208
                            TOTAL_PAGE = items.TOTAL_PAGE,
209
                            CURRENT_PAGE = items.CURRENT_PAGE,
210
                            EXCEPTION = items.EXCEPTION,
211
                            END_DATETIME = items.END_DATETIME,
212
                            START_DATETIME = items.START_DATETIME,
213
                            DOCUMENT_ID = items.DOCUMENT_ID,
214
                            DOCUMENT_URL = subpet.ORIGINAL_FILE,
215

  
216
                            REVISION = subpet.REVISION,
217
                            GROUP_NO = subpet.GROUP_NO,
218
                            RESULT_FILE = subpet.RESULT_FILE,
219
                            RESULT = subpet.RESULT,
220

  
221

  
222
                            DOCUMENT_NO = subpet.DOCUMENT_NO,
223
                            DOCUMENT_NAME = subpet.DOCUMENT_NAME
224
                        };
225

  
226
            if (query.Count() > 0)//세미
227
            {
228
                foreach (var item in query)
229
                {
230
                    Interface.ConvertItem convertitem = new Interface.ConvertItem(item.DOCUMENT_ID, item.PROJECT_NO, item.ID, item.DOCUMENT_URL)
231
                    {
232
                        ConvertID = item.ID,
233
                        DocInfo_ID = item.DOCINFO_ID,
234
                        MarkupInfo_ID = item.MARKUPINFO_ID.ToString(),
235
                        Create_User_ID = item.CREATE_USER_ID,
236
                        CreateTime = item.CREATE_DATETIME,
237
                        ConvertState = (StatusCodeType)item.STATUS,
238
                        TotalPage = item.TOTAL_PAGE,
239
                        CurrentPageNo = item.CURRENT_PAGE,
240
                        Exception = item.EXCEPTION,
241
                        EndTime = (DateTime)item.END_DATETIME,
242
                        StartTime = (DateTime)item.START_DATETIME,
243
                        DocumnetNo = item.DOCUMENT_NO,
244
                        DocumnetName = item.DOCUMENT_NAME,
245
                        GroupNo = item.GROUP_NO,
246
                        Revision = item.REVISION,
247

  
248
                        ConvertPath = GetConvertPath(item.PROJECT_NO, item.DOCUMENT_ID),
249
                        MarkusLink = "kcom://" + Markus.Service.DataBase.Extensions.MarkusAPI.CreateMarkusParam(item.PROJECT_NO, item.DOCUMENT_ID, "doftech")
250
                    };
251
                   
252
                    convertItems.Add(convertitem);
253
                }
254
            }
255
            return convertItems;
256

  
257
        }
258

  
259

  
171 260
        public IEnumerable<Interface.ConvertItem> GetConvertProjects(int status)
172 261
        {
173 262
            List<Interface.ConvertItem> convertItems = new List<Interface.ConvertItem>();
......
194 283
                            REVISION = subpet.REVISION,
195 284
                            DOCUMENT_NO = subpet.DOCUMENT_NO,
196 285
                            DOCUMENT_NAME = subpet.DOCUMENT_NAME,
197
                            GROUP_NO = subpet.GROUP_NO,
286
                            GROUP_NO = subpet.GROUP_NO
198 287
                        };
199 288

  
200 289
            if (query.Count() > 0)//세미
......
221 310
                        GroupNo = item.GROUP_NO,
222 311
                        DocumentID = item.DOCUMENT_ID,
223 312

  
313

  
224 314
                        MarkusLink = "kcom://" + Markus.Service.DataBase.Extensions.MarkusAPI.CreateMarkusParam(item.PROJECT_NO, item.DOCUMENT_ID, "doftech")
225 315
                    };
226 316
                    convertItems.Add(convertitem);
......
247 337
        /// 상단 그리드에서 선택된 RealDataSelect
248 338
        /// 용도: 중앙그리드 Items Update
249 339
        /// </summary>
340

  
341

  
342
        public IEnumerable<Interface.ConvertItem> GetConvertFinalPDFProjects(System.Collections.ObjectModel.ObservableCollection<Interface.ConvertItem> selectedConvert)
343
        {
344
            List<Interface.ConvertItem> StatusKeep = new List<Interface.ConvertItem>();
345

  
346
            List<Interface.ConvertItem> convertItems = new List<Interface.ConvertItem>();
347

  
348
            foreach (var selectedConvertItem in selectedConvert)
349
            {
350
                var query = from items in entities.FINAL_PDF //세미
351
                            join documents in entities.DOCUMENT_ITEM on items.DOCUMENT_ID equals documents.DOCUMENT_ID into GroupItems
352
                            from subpet in GroupItems.DefaultIfEmpty()
353
                            where items.PROJECT_NO == selectedConvertItem.ProjectNumber && items.ID == selectedConvertItem.ConvertID
354
                            select new
355
                            {
356
                                ID = items.ID,
357
                                PROJECT_NO = items.PROJECT_NO,
358
                                DOCINFO_ID = items.DOCINFO_ID,
359
                                MARKUPINFO_ID = items.MARKUPINFO_ID,
360
                                CREATE_USER_ID = items.CREATE_USER_ID,
361
                                CREATE_DATETIME = items.CREATE_DATETIME,
362
                                STATUS = items.STATUS,
363
                                TOTAL_PAGE = items.TOTAL_PAGE,
364
                                CURRENT_PAGE = items.CURRENT_PAGE,
365
                                EXCEPTION = items.EXCEPTION,
366
                                END_DATETIME = items.END_DATETIME,
367
                                START_DATETIME = items.START_DATETIME,
368
                                DOCUMENT_ID = items.DOCUMENT_ID,
369

  
370
                                DOCUMENT_URL = subpet.ORIGINAL_FILE,
371
                                DOCUMENT_NO = subpet.DOCUMENT_NO,
372
                                DOCUMENT_NAME = subpet.DOCUMENT_NAME
373
                            };
374

  
375

  
376
                if (query.Count() > 0)//세미
377
                {
378
                    foreach (var item in query)
379
                    {
380
                        Interface.ConvertItem convertitem = new Interface.ConvertItem(item.DOCUMENT_ID, item.PROJECT_NO, item.ID, item.DOCUMENT_URL)
381
                        {
382

  
383
                            DocInfo_ID = item.DOCINFO_ID,
384
                            MarkupInfo_ID = item.MARKUPINFO_ID.ToString(),
385
                            Create_User_ID = item.CREATE_USER_ID,
386
                            CreateTime = item.CREATE_DATETIME,
387
                            ConvertState = (StatusCodeType)item.STATUS,
388
                            TotalPage = item.TOTAL_PAGE,
389
                            CurrentPageNo = item.CURRENT_PAGE,
390
                            Exception = item.EXCEPTION,
391
                            EndTime = (DateTime)item.END_DATETIME,
392
                            StartTime = (DateTime)item.START_DATETIME,
393
                            DocumnetNo = item.DOCUMENT_NO,
394
                            DocumnetName = item.DOCUMENT_NAME,
395

  
396
                            ConvertPath = GetConvertPath(item.PROJECT_NO, item.DOCUMENT_ID),
397
                            MarkusLink = "kcom://" + Markus.Service.DataBase.Extensions.MarkusAPI.CreateMarkusParam(item.PROJECT_NO, item.DOCUMENT_ID, "doftech")
398
                        };
399

  
400
                        StatusKeep.Add(convertitem);
401

  
402
                    }
403
                }
404
            }
405
            return StatusKeep;
406
        }
407

  
408

  
250 409
        public IEnumerable<Interface.ConvertItem> GetConvertProjects(System.Collections.ObjectModel.ObservableCollection<Interface.ConvertItem> selectedConvert)
251 410
        {
252 411
            List<Interface.ConvertItem> StatusKeep = new List<Interface.ConvertItem>();
......
323 482
        /// 상단 그리드에서 선택된 Convert 버튼 
324 483
        /// 용도: 중앙 그리드로 Convert된 row 값 저장 하기 위해서 입니다.
325 484
        /// </summary>
485

  
486
        public IEnumerable<Interface.ConvertItem> GetConvertFinalPDFProjects(Markus.Service.Interface.ConvertItem selectedConvert)
487
        {
488
            List<Interface.ConvertItem> StatusKeep = new List<Interface.ConvertItem>();
489

  
490

  
491
            System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch();
492

  
493
            stopwatch.Start();
494

  
495

  
496
            List<Interface.ConvertItem> convertItems = new List<Interface.ConvertItem>();//디비 다 조인 후 조건 비교 후 그리드 출력
497
            var query = from items in entities.FINAL_PDF //세미
498
                        join documents in entities.DOCUMENT_ITEM on items.DOCUMENT_ID equals documents.DOCUMENT_ID into GroupItems
499
                        from subpet in GroupItems.DefaultIfEmpty()
500
                        where items.PROJECT_NO == selectedConvert.ProjectNumber && items.DOCUMENT_ID == selectedConvert.DocumentID
501
                        orderby items.CREATE_DATETIME descending
502
                        select new
503
                        {
504
                            ID = items.ID,
505
                            PROJECT_NO = items.PROJECT_NO,
506
                            DOCINFO_ID = items.DOCINFO_ID,
507
                            MARKUPINFO_ID = items.MARKUPINFO_ID,
508
                            CREATE_USER_ID = items.CREATE_USER_ID,
509
                            CREATE_DATETIME = items.CREATE_DATETIME,
510
                            STATUS = items.STATUS,
511
                            TOTAL_PAGE = items.TOTAL_PAGE,
512
                            CURRENT_PAGE = items.CURRENT_PAGE,
513
                            EXCEPTION = items.EXCEPTION,
514
                            END_DATETIME = items.END_DATETIME,
515
                            START_DATETIME = items.START_DATETIME,
516
                            DOCUMENT_ID = items.DOCUMENT_ID,
517

  
518
                            DOCUMENT_URL = subpet.ORIGINAL_FILE,
519
                            DOCUMENT_NO = subpet.DOCUMENT_NO,
520
                            DOCUMENT_NAME = subpet.DOCUMENT_NAME
521
                        };
522

  
523
            if (query.Count() > 0)//세미
524
            {
525
                foreach (var item in query)
526
                {
527
                    Interface.ConvertItem convertitem = new Interface.ConvertItem(item.DOCUMENT_ID, item.PROJECT_NO, item.ID, item.DOCUMENT_URL)
528
                    {
529

  
530
                        DocInfo_ID = item.DOCINFO_ID,
531
                        MarkupInfo_ID = item.MARKUPINFO_ID.ToString(),
532
                        Create_User_ID = item.CREATE_USER_ID,
533
                        CreateTime = item.CREATE_DATETIME,
534
                        ConvertState = (StatusCodeType)item.STATUS,
535
                        TotalPage = item.TOTAL_PAGE,
536
                        CurrentPageNo = item.CURRENT_PAGE,
537
                        Exception = item.EXCEPTION,
538
                        EndTime = (DateTime)item.END_DATETIME,
539
                        StartTime = (DateTime)item.START_DATETIME,
540
                        DocumnetNo = item.DOCUMENT_NO,
541
                        DocumnetName = item.DOCUMENT_NAME,
542

  
543
                        ConvertPath = GetConvertPath(item.PROJECT_NO, item.DOCUMENT_ID),
544
                        MarkusLink = "kcom://" + Markus.Service.DataBase.Extensions.MarkusAPI.CreateMarkusParam(item.PROJECT_NO, item.DOCUMENT_ID, "doftech")
545
                    };
546
                    StatusKeep.Add(convertitem);
547
                }
548
            }
549
            System.Diagnostics.Debug.WriteLine(new TimeSpan(stopwatch.ElapsedTicks).ToString());
550
            return StatusKeep;
551

  
552
        }
553

  
326 554
        public IEnumerable<Interface.ConvertItem> GetConvertProjects(Markus.Service.Interface.ConvertItem selectedConvert)
327 555
        {
328 556
            List<Interface.ConvertItem> StatusKeep = new List<Interface.ConvertItem>();
......
392 620

  
393 621
        }
394 622

  
623

  
395 624
        #endregion
396 625

  
397 626
        #region SetCleanUpItem
......
402 631
        /// <param name="ReConvert">ReConvert가 2이면 다시 Convert를 시도 안하기 때문에 기존 값으로 유지 하고 계속 시도 할수 있도록 0을 주는 경우가 있다.</param>
403 632
        /// <returns></returns>
404 633
        /// 
405
        public int SetCleanUpItem(ConvertItem _ConvertItem)
634
        public int SetCleanUpFinalPDFItem(ConvertItem _ConvertItem)
406 635
        {
407 636
            int result = 0;
408 637

  
409
            var items = entities.CONVERTER_DOC.Where(x => x.ID == _ConvertItem.ConvertID);
638
            var items = entities.FINAL_PDF.Where(x => x.ID == _ConvertItem.ConvertID);
410 639

  
411 640
            result = items.Count();
412 641

  
......
414 643
            {
415 644
                var item = items.First();
416 645

  
417
                item.RECONVERTER = item.RECONVERTER - _ConvertItem.ReConverter;
646
                //item.RECONVERTER = item.RECONVERTER - _ConvertItem.ReConverter;
418 647

  
419 648
                item.CREATE_DATETIME = DateTime.Now;
420 649
                item.STATUS = (int)StatusCodeType.None;
......
426 655
            return result;
427 656
        }
428 657

  
658
        //public int SetCleanUpItem(ConvertItem _ConvertItem)
659
        //{
660
        //    int result = 0;
661

  
662
        //    var items = entities.CONVERTER_DOC.Where(x => x.ID == _ConvertItem.ConvertID);
663

  
664
        //    result = items.Count();
665

  
666
        //    if (items.Count() > 0)
667
        //    {
668
        //        var item = items.First();
669

  
670
        //        item.RECONVERTER = item.RECONVERTER - _ConvertItem.ReConverter;
671

  
672
        //        item.CREATE_DATETIME = DateTime.Now;
673
        //        item.STATUS = (int)StatusCodeType.None;
674
        //        item.END_DATETIME = null;
675

  
676
        //        result = entities.SaveChanges();
677
        //    }
678

  
679
        //    return result;
680
        //}
681

  
429 682
        public int SetCleanUpItem(string convertID, int ReConvert)
430 683
        {
431 684
            int result = 0;
......
492 745
        /// Item 삭제
493 746
        /// </summary>
494 747
        /// <returns></returns>
748
        /// 
749

  
750
        public int RemoveFinalPDFItem(string convertID)
751
        {
752
            int result = 0;
753

  
754
            var items = entities.FINAL_PDF.Where(x => x.ID == convertID);
755

  
756
            if (items.Count() > 0)
757
            {
758
                FINAL_PDF item = items.First();
759
                entities.FINAL_PDF.Remove(item);
760

  
761
                result = entities.SaveChanges();
762
            }
763

  
764
            return result;
765
        } 
766

  
495 767
        public int RemoveItem(string convertID)
496 768
        {
497 769
            int result = 0;
ConvertService/ServiceBase/Markus.Service.StationController/Controls/DatabaseFilter.xaml
63 63
         HorizontalContentAlignment="Stretch"
64 64
         VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="2,0"/>
65 65

  
66
            <!--<TextBlock Text="ConvertState : " Grid.Row="1" Grid.Column="0"/>-->
67
            <!--<telerik:RadMaskedTextInput IsClearButtonVisible="True"
68
         EmptyContent="ConvertState" Value="{Binding ConvertStateFilter, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
69
         TextMode="PlainText"  Grid.Row="1" Grid.Column="1"
70
         HorizontalAlignment="Center"
71
         VerticalAlignment="Center"/>-->
72

  
73

  
74 66
            <TextBlock Text="Docuemnt Name  " Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
75 67
            <telerik:RadMaskedTextInput IsClearButtonVisible="True" 
76
         EmptyContent="Docuemnt Name" Value="{Binding Docuemnt_NameFilter , UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
68
         EmptyContent="Docuemnt Name" Value="{Binding Document_NameFilter , UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
77 69
         TextMode="PlainText" Grid.Row="1" Grid.Column="1"
78 70
         HorizontalContentAlignment="Stretch"
79 71
         VerticalAlignment="Center" HorizontalAlignment="Stretch" Margin="2,0"/>
......
111 103
                                   HorizontalAlignment="Stretch"
112 104
                                   SelectedValue="{Binding SelectedCreateTimeBegin ,Mode=TwoWay,  UpdateSourceTrigger=PropertyChanged }" >
113 105
                </telerik:RadDateTimePicker>
114
                <!--<DatePicker Text="{Binding OpenStartTime, StringFormat='yy.mm.dd HH:mm:ss' ,RelativeSource={RelativeSource AncestorType={x:Type DatePicker}}}" SelectedDate="{Binding SelectedOpenTime}" Width="124" SelectedDateFormat="Long" Margin="0,-1,0,1"/>-->
106
                
115 107
                <TextBlock Text="  ~  " VerticalAlignment="Center"/>
116 108
                <telerik:RadDateTimePicker x:Name="datePicker2"  Width="200"
117 109
                                   InputMode="DateTimePicker"  HorizontalAlignment="Stretch"
......
121 113
                </telerik:RadDateTimePicker>
122 114
                <Button Content="Clear" Margin="5"  Width="50" Height="20" HorizontalAlignment="Left" Command="{Binding RemoveCreateTimeFilterCommand, Mode=OneWay}"/>
123 115

  
124
                <!--<telerik:RadToggleButton Content=" 검색" Command="{Binding DataFilterCommand, Mode=OneWay}" Width="100" Grid.Row="3"/>-->
125
                <!--<DatePicker Text="{Binding OpenStartTime, StringFormat='yy.mm.dd HH:mm:ss' ,RelativeSource={RelativeSource AncestorType={x:Type DatePicker}}}" SelectedDate="{Binding SelectedOpenTime}" Width="124" SelectedDateFormat="Long" Margin="0,-1,0,1"/>-->
126

  
127

  
128
                <!--<telerik:RadMaskedTextInput IsClearButtonVisible="True"
129
         EmptyContent="placeholder text"
130
         TextMode="PlainText" 
131
         HorizontalAlignment="Center"
132
         VerticalAlignment="Center"/>-->
133 116
            </StackPanel>
134 117
        </StackPanel>
135 118
    </Grid>
ConvertService/ServiceBase/Markus.Service.StationController/Controls/DatabaseFilter.xaml.cs
147 147
                this.SetValue(ProjectNoProperty, value);
148 148
            }
149 149
        }
150

  
151
        private void DatePicker1_SelectionChanged(object sender, SelectionChangedEventArgs e)
152
        {
153

  
154
        }
150 155
    }
151 156
}
ConvertService/ServiceBase/Markus.Service.StationController/Markus.Service.StationController.csproj
193 193
    <Compile Include="SELECT_CONVERT_ITEM_Result.cs">
194 194
      <DependentUpon>MarkusModel.tt</DependentUpon>
195 195
    </Compile>
196
    <Compile Include="SELECT_RERECONVERT_ITEM_Result.cs">
196
    <Compile Include="SELECT_FINAL_PDF_Result.cs">
197 197
      <DependentUpon>MarkusModel.tt</DependentUpon>
198 198
    </Compile>
199 199
    <Compile Include="ViewModel\AliveViewModel.cs" />
200
    <Compile Include="ViewModel\FinalPDFViewModel.cs" />
201
    <Compile Include="ViewModel\FinalPDFAddDialogViewModel.cs" />
200 202
    <Compile Include="ViewModel\ConvertAddDialogViewModel.cs" />
201 203
    <Compile Include="ViewModel\DataBaseByStatusViewModel.cs" />
202 204
    <Compile Include="ViewModel\DataBaseItemsModel.cs" />
......
222 224
    <Compile Include="Views\AliveView.xaml.cs">
223 225
      <DependentUpon>AliveView.xaml</DependentUpon>
224 226
    </Compile>
227
    <Compile Include="Views\FinalPDFAddDialog.xaml.cs">
228
      <DependentUpon>FinalPDFAddDialog.xaml</DependentUpon>
229
    </Compile>
225 230
    <Compile Include="Views\SettiingServiceLocation.xaml.cs">
226 231
      <DependentUpon>SettiingServiceLocation.xaml</DependentUpon>
227 232
    </Compile>
......
231 236
    <Compile Include="Views\TotalStatusView.xaml.cs">
232 237
      <DependentUpon>TotalStatusView.xaml</DependentUpon>
233 238
    </Compile>
239
    <Compile Include="Views\FinalPDFViewInfo.xaml.cs">
240
      <DependentUpon>FinalPDFViewInfo.xaml</DependentUpon>
241
    </Compile>
242
    <Compile Include="Views\FinalPDFView.xaml.cs">
243
      <DependentUpon>FinalPDFView.xaml</DependentUpon>
244
    </Compile>
234 245
    <Page Include="Controls\DatabaseFilter.xaml">
235 246
      <Generator>MSBuild:Compile</Generator>
236 247
      <SubType>Designer</SubType>
......
287 298
      <SubType>Designer</SubType>
288 299
      <Generator>MSBuild:Compile</Generator>
289 300
    </Page>
301
    <Page Include="Views\FinalPDFAddDialog.xaml">
302
      <Generator>MSBuild:Compile</Generator>
303
      <SubType>Designer</SubType>
304
    </Page>
290 305
    <Page Include="Views\SettiingServiceLocation.xaml">
291 306
      <SubType>Designer</SubType>
292 307
      <Generator>MSBuild:Compile</Generator>
......
299 314
      <SubType>Designer</SubType>
300 315
      <Generator>MSBuild:Compile</Generator>
301 316
    </Page>
317
    <Page Include="Views\FinalPDFViewInfo.xaml">
318
      <SubType>Designer</SubType>
319
      <Generator>MSBuild:Compile</Generator>
320
    </Page>
321
    <Page Include="Views\FinalPDFView.xaml">
322
      <SubType>Designer</SubType>
323
      <Generator>MSBuild:Compile</Generator>
324
    </Page>
302 325
  </ItemGroup>
303 326
  <ItemGroup>
304 327
    <Compile Include="Properties\AssemblyInfo.cs">
ConvertService/ServiceBase/Markus.Service.StationController/MarkusModel.Context.cs
28 28
        }
29 29
    
30 30
    
31
        public virtual ObjectResult<SELECT_CONVERT_ITEM_Result> SELECT_CONVERT_ITEM(string p_PROJECT_NO, string p_DOCUMENT_ID, Nullable<int> p_STATUS, Nullable<int> p_TAKE_COUNT, Nullable<System.DateTime> p_BEGIN_CREATE_DATETIME, Nullable<System.DateTime> p_FINISH_CREATE_DATETIME, Nullable<System.DateTime> p_BEGIN_START_DATETIE, Nullable<System.DateTime> p_FINISH_START_DATETIME, Nullable<System.DateTime> p_BEGIN_END_DATETIME, Nullable<System.DateTime> p_FINISH_END_DATETIME, string p_GROUP_NO, string p_DOCUMENT_NAME, string p_DOCUMENT_NO, string p_REVISION)
31
        public virtual ObjectResult<SELECT_CONVERT_ITEM_Result> SELECT_CONVERT_ITEM(string p_ID, string p_PROJECT_NO, string p_DOCUMENT_ID, Nullable<int> p_STATUS, Nullable<int> p_TAKE_COUNT, Nullable<System.DateTime> p_BEGIN_CREATE_DATETIME, Nullable<System.DateTime> p_FINISH_CREATE_DATETIME, Nullable<System.DateTime> p_BEGIN_START_DATETIE, Nullable<System.DateTime> p_FINISH_START_DATETIME, Nullable<System.DateTime> p_BEGIN_END_DATETIME, Nullable<System.DateTime> p_FINISH_END_DATETIME, string p_GROUP_NO, string p_DOCUMENT_NAME, string p_DOCUMENT_NO, string p_REVISION, string p_SERVICE_ID, Nullable<int> p_RECONVERTER)
32 32
        {
33
            var p_IDParameter = p_ID != null ?
34
                new ObjectParameter("P_ID", p_ID) :
35
                new ObjectParameter("P_ID", typeof(string));
36
    
33 37
            var p_PROJECT_NOParameter = p_PROJECT_NO != null ?
34 38
                new ObjectParameter("P_PROJECT_NO", p_PROJECT_NO) :
35 39
                new ObjectParameter("P_PROJECT_NO", typeof(string));
......
86 90
                new ObjectParameter("P_REVISION", p_REVISION) :
87 91
                new ObjectParameter("P_REVISION", typeof(string));
88 92
    
89
            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<SELECT_CONVERT_ITEM_Result>("markusEntities.SELECT_CONVERT_ITEM", p_PROJECT_NOParameter, p_DOCUMENT_IDParameter, p_STATUSParameter, p_TAKE_COUNTParameter, p_BEGIN_CREATE_DATETIMEParameter, p_FINISH_CREATE_DATETIMEParameter, p_BEGIN_START_DATETIEParameter, p_FINISH_START_DATETIMEParameter, p_BEGIN_END_DATETIMEParameter, p_FINISH_END_DATETIMEParameter, p_GROUP_NOParameter, p_DOCUMENT_NAMEParameter, p_DOCUMENT_NOParameter, p_REVISIONParameter);
93
            var p_SERVICE_IDParameter = p_SERVICE_ID != null ?
94
                new ObjectParameter("P_SERVICE_ID", p_SERVICE_ID) :
95
                new ObjectParameter("P_SERVICE_ID", typeof(string));
96
    
97
            var p_RECONVERTERParameter = p_RECONVERTER.HasValue ?
98
                new ObjectParameter("P_RECONVERTER", p_RECONVERTER) :
99
                new ObjectParameter("P_RECONVERTER", typeof(int));
100
    
101
            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<SELECT_CONVERT_ITEM_Result>("markusEntities.SELECT_CONVERT_ITEM", p_IDParameter, p_PROJECT_NOParameter, p_DOCUMENT_IDParameter, p_STATUSParameter, p_TAKE_COUNTParameter, p_BEGIN_CREATE_DATETIMEParameter, p_FINISH_CREATE_DATETIMEParameter, p_BEGIN_START_DATETIEParameter, p_FINISH_START_DATETIMEParameter, p_BEGIN_END_DATETIMEParameter, p_FINISH_END_DATETIMEParameter, p_GROUP_NOParameter, p_DOCUMENT_NAMEParameter, p_DOCUMENT_NOParameter, p_REVISIONParameter, p_SERVICE_IDParameter, p_RECONVERTERParameter);
90 102
        }
91 103
    
92
        public virtual ObjectResult<SELECT_RERECONVERT_ITEM_Result> SELECT_RERECONVERT_ITEM(string p_ID, Nullable<int> p_RECONVERTER, Nullable<int> p_STATUS)
104
        public virtual int SELECT_RERECONVERT_ITEM(string p_ID, Nullable<int> p_RECONVERTER, Nullable<System.DateTime> p_CREATE_DATETIME, Nullable<int> p_STATUS, Nullable<System.DateTime> p_END_DATETIME)
93 105
        {
94 106
            var p_IDParameter = p_ID != null ?
95 107
                new ObjectParameter("P_ID", p_ID) :
......
99 111
                new ObjectParameter("P_RECONVERTER", p_RECONVERTER) :
100 112
                new ObjectParameter("P_RECONVERTER", typeof(int));
101 113
    
114
            var p_CREATE_DATETIMEParameter = p_CREATE_DATETIME.HasValue ?
115
                new ObjectParameter("P_CREATE_DATETIME", p_CREATE_DATETIME) :
116
                new ObjectParameter("P_CREATE_DATETIME", typeof(System.DateTime));
117
    
102 118
            var p_STATUSParameter = p_STATUS.HasValue ?
103 119
                new ObjectParameter("P_STATUS", p_STATUS) :
104 120
                new ObjectParameter("P_STATUS", typeof(int));
105 121
    
106
            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<SELECT_RERECONVERT_ITEM_Result>("markusEntities.SELECT_RERECONVERT_ITEM", p_IDParameter, p_RECONVERTERParameter, p_STATUSParameter);
122
            var p_END_DATETIMEParameter = p_END_DATETIME.HasValue ?
123
                new ObjectParameter("P_END_DATETIME", p_END_DATETIME) :
124
                new ObjectParameter("P_END_DATETIME", typeof(System.DateTime));
125
    
126
            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("markusEntities.SELECT_RERECONVERT_ITEM", p_IDParameter, p_RECONVERTERParameter, p_CREATE_DATETIMEParameter, p_STATUSParameter, p_END_DATETIMEParameter);
107 127
        }
108 128
    
109 129
        public virtual int SELECT_CONVERT_INSERT(string p_ID, string p_PROJECT_NO, string p_DOCUMENT_URL, string p_DOCUMENT_ID)
......
126 146
    
127 147
            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("markusEntities.SELECT_CONVERT_INSERT", p_IDParameter, p_PROJECT_NOParameter, p_DOCUMENT_URLParameter, p_DOCUMENT_IDParameter);
128 148
        }
149
    
150
        public virtual int SELECT_CONVERT_DELETE(string p_ID)
151
        {
152
            var p_IDParameter = p_ID != null ?
153
                new ObjectParameter("P_ID", p_ID) :
154
                new ObjectParameter("P_ID", typeof(string));
155
    
156
            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("markusEntities.SELECT_CONVERT_DELETE", p_IDParameter);
157
        }
158
    
159
        public virtual int SELECT_FINAL_PDF_DELETE(string p_ID)
160
        {
161
            var p_IDParameter = p_ID != null ?
162
                new ObjectParameter("P_ID", p_ID) :
163
                new ObjectParameter("P_ID", typeof(string));
164
    
165
            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("markusEntities.SELECT_FINAL_PDF_DELETE", p_IDParameter);
166
        }
167
    
168
        public virtual int SELECT_FINAL_PDF_INSERT(string p_ID, string p_PROJECT_NO, string p_DOCINFO_ID, string p_DOCUMENT_ID)
169
        {
170
            var p_IDParameter = p_ID != null ?
171
                new ObjectParameter("P_ID", p_ID) :
172
                new ObjectParameter("P_ID", typeof(string));
173
    
174
            var p_PROJECT_NOParameter = p_PROJECT_NO != null ?
175
                new ObjectParameter("P_PROJECT_NO", p_PROJECT_NO) :
176
                new ObjectParameter("P_PROJECT_NO", typeof(string));
177
    
178
            var p_DOCINFO_IDParameter = p_DOCINFO_ID != null ?
179
                new ObjectParameter("P_DOCINFO_ID", p_DOCINFO_ID) :
180
                new ObjectParameter("P_DOCINFO_ID", typeof(string));
181
    
182
            var p_DOCUMENT_IDParameter = p_DOCUMENT_ID != null ?
183
                new ObjectParameter("P_DOCUMENT_ID", p_DOCUMENT_ID) :
184
                new ObjectParameter("P_DOCUMENT_ID", typeof(string));
185
    
186
            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("markusEntities.SELECT_FINAL_PDF_INSERT", p_IDParameter, p_PROJECT_NOParameter, p_DOCINFO_IDParameter, p_DOCUMENT_IDParameter);
187
        }
188
    
189
        public virtual ObjectResult<SELECT_FINAL_PDF_Result> SELECT_FINAL_PDF_ITEM(string p_ID, string p_PROJECT_NO, string p_DOCUMENT_ID, string p_MARKUPINFO_ID, string p_DOCINFO_ID, string p_DOCUMENT_NAME, string p_DOCUMENT_NO, string p_CREATE_USER_ID, Nullable<int> p_STATUS, Nullable<int> p_TAKE_COUNT, string p_GROUP_NO, string p_REVISION, Nullable<System.DateTime> p_BEGIN_CREATE_DATETIME, Nullable<System.DateTime> p_FINISH_CREATE_DATETIME, Nullable<System.DateTime> p_BEGIN_START_DATETIE, Nullable<System.DateTime> p_FINISH_START_DATETIME, Nullable<System.DateTime> p_BEGIN_END_DATETIME, Nullable<System.DateTime> p_FINISH_END_DATETIME)
190
        {
191
            var p_IDParameter = p_ID != null ?
192
                new ObjectParameter("P_ID", p_ID) :
193
                new ObjectParameter("P_ID", typeof(string));
194
    
195
            var p_PROJECT_NOParameter = p_PROJECT_NO != null ?
196
                new ObjectParameter("P_PROJECT_NO", p_PROJECT_NO) :
197
                new ObjectParameter("P_PROJECT_NO", typeof(string));
198
    
199
            var p_DOCUMENT_IDParameter = p_DOCUMENT_ID != null ?
200
                new ObjectParameter("P_DOCUMENT_ID", p_DOCUMENT_ID) :
201
                new ObjectParameter("P_DOCUMENT_ID", typeof(string));
202
    
203
            var p_MARKUPINFO_IDParameter = p_MARKUPINFO_ID != null ?
204
                new ObjectParameter("P_MARKUPINFO_ID", p_MARKUPINFO_ID) :
205
                new ObjectParameter("P_MARKUPINFO_ID", typeof(string));
206
    
207
            var p_DOCINFO_IDParameter = p_DOCINFO_ID != null ?
208
                new ObjectParameter("P_DOCINFO_ID", p_DOCINFO_ID) :
209
                new ObjectParameter("P_DOCINFO_ID", typeof(string));
210
    
211
            var p_DOCUMENT_NAMEParameter = p_DOCUMENT_NAME != null ?
212
                new ObjectParameter("P_DOCUMENT_NAME", p_DOCUMENT_NAME) :
213
                new ObjectParameter("P_DOCUMENT_NAME", typeof(string));
214
    
215
            var p_DOCUMENT_NOParameter = p_DOCUMENT_NO != null ?
216
                new ObjectParameter("P_DOCUMENT_NO", p_DOCUMENT_NO) :
217
                new ObjectParameter("P_DOCUMENT_NO", typeof(string));
218
    
219
            var p_CREATE_USER_IDParameter = p_CREATE_USER_ID != null ?
220
                new ObjectParameter("P_CREATE_USER_ID", p_CREATE_USER_ID) :
221
                new ObjectParameter("P_CREATE_USER_ID", typeof(string));
222
    
223
            var p_STATUSParameter = p_STATUS.HasValue ?
224
                new ObjectParameter("P_STATUS", p_STATUS) :
225
                new ObjectParameter("P_STATUS", typeof(int));
226
    
227
            var p_TAKE_COUNTParameter = p_TAKE_COUNT.HasValue ?
228
                new ObjectParameter("P_TAKE_COUNT", p_TAKE_COUNT) :
229
                new ObjectParameter("P_TAKE_COUNT", typeof(int));
230
    
231
            var p_GROUP_NOParameter = p_GROUP_NO != null ?
232
                new ObjectParameter("P_GROUP_NO", p_GROUP_NO) :
233
                new ObjectParameter("P_GROUP_NO", typeof(string));
234
    
235
            var p_REVISIONParameter = p_REVISION != null ?
236
                new ObjectParameter("P_REVISION", p_REVISION) :
237
                new ObjectParameter("P_REVISION", typeof(string));
238
    
239
            var p_BEGIN_CREATE_DATETIMEParameter = p_BEGIN_CREATE_DATETIME.HasValue ?
240
                new ObjectParameter("P_BEGIN_CREATE_DATETIME", p_BEGIN_CREATE_DATETIME) :
241
                new ObjectParameter("P_BEGIN_CREATE_DATETIME", typeof(System.DateTime));
242
    
243
            var p_FINISH_CREATE_DATETIMEParameter = p_FINISH_CREATE_DATETIME.HasValue ?
244
                new ObjectParameter("P_FINISH_CREATE_DATETIME", p_FINISH_CREATE_DATETIME) :
245
                new ObjectParameter("P_FINISH_CREATE_DATETIME", typeof(System.DateTime));
246
    
247
            var p_BEGIN_START_DATETIEParameter = p_BEGIN_START_DATETIE.HasValue ?
248
                new ObjectParameter("P_BEGIN_START_DATETIE", p_BEGIN_START_DATETIE) :
249
                new ObjectParameter("P_BEGIN_START_DATETIE", typeof(System.DateTime));
250
    
251
            var p_FINISH_START_DATETIMEParameter = p_FINISH_START_DATETIME.HasValue ?
252
                new ObjectParameter("P_FINISH_START_DATETIME", p_FINISH_START_DATETIME) :
253
                new ObjectParameter("P_FINISH_START_DATETIME", typeof(System.DateTime));
254
    
255
            var p_BEGIN_END_DATETIMEParameter = p_BEGIN_END_DATETIME.HasValue ?
256
                new ObjectParameter("P_BEGIN_END_DATETIME", p_BEGIN_END_DATETIME) :
257
                new ObjectParameter("P_BEGIN_END_DATETIME", typeof(System.DateTime));
258
    
259
            var p_FINISH_END_DATETIMEParameter = p_FINISH_END_DATETIME.HasValue ?
260
                new ObjectParameter("P_FINISH_END_DATETIME", p_FINISH_END_DATETIME) :
261
                new ObjectParameter("P_FINISH_END_DATETIME", typeof(System.DateTime));
262
    
263
            return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<SELECT_FINAL_PDF_Result>("markusEntities.SELECT_FINAL_PDF_ITEM", p_IDParameter, p_PROJECT_NOParameter, p_DOCUMENT_IDParameter, p_MARKUPINFO_IDParameter, p_DOCINFO_IDParameter, p_DOCUMENT_NAMEParameter, p_DOCUMENT_NOParameter, p_CREATE_USER_IDParameter, p_STATUSParameter, p_TAKE_COUNTParameter, p_GROUP_NOParameter, p_REVISIONParameter, p_BEGIN_CREATE_DATETIMEParameter, p_FINISH_CREATE_DATETIMEParameter, p_BEGIN_START_DATETIEParameter, p_FINISH_START_DATETIMEParameter, p_BEGIN_END_DATETIMEParameter, p_FINISH_END_DATETIMEParameter);
264
        }
129 265
    }
130 266
}
ConvertService/ServiceBase/Markus.Service.StationController/MarkusModel.edmx
5 5
    <!-- SSDL content -->
6 6
    <edmx:StorageModels>
7 7
    <Schema Namespace="markusModel.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
8
        <Function Name="SELECT_CONVERT_DELETE" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
9
          <Parameter Name="P_ID" Type="nvarchar" Mode="In" />
10
        </Function>
8 11
        <Function Name="SELECT_CONVERT_INSERT" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
9 12
          <Parameter Name="P_ID" Type="nvarchar" Mode="In" />
10 13
          <Parameter Name="P_PROJECT_NO" Type="nvarchar" Mode="In" />
......
12 15
          <Parameter Name="P_DOCUMENT_ID" Type="nvarchar" Mode="In" />
13 16
        </Function>
14 17
        <Function Name="SELECT_CONVERT_ITEM" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
18
          <Parameter Name="P_ID" Type="nvarchar" Mode="In" />
15 19
          <Parameter Name="P_PROJECT_NO" Type="nvarchar" Mode="In" />
16 20
          <Parameter Name="P_DOCUMENT_ID" Type="nvarchar" Mode="In" />
17 21
          <Parameter Name="P_STATUS" Type="int" Mode="In" />
......
26 30
          <Parameter Name="P_DOCUMENT_NAME" Type="nvarchar" Mode="In" />
27 31
          <Parameter Name="P_DOCUMENT_NO" Type="nvarchar" Mode="In" />
28 32
          <Parameter Name="P_REVISION" Type="nvarchar" Mode="In" />
33
          <Parameter Name="P_SERVICE_ID" Type="nvarchar" Mode="In" />
34
          <Parameter Name="P_RECONVERTER" Type="int" Mode="In" />
35
        </Function>
36
        <Function Name="SELECT_FINAL_PDF_DELETE" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
37
          <Parameter Name="P_ID" Type="nvarchar" Mode="In" />
38
        </Function>
39
        <Function Name="SELECT_FINAL_PDF_INSERT" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
40
          <Parameter Name="P_ID" Type="nvarchar" Mode="In" />
41
          <Parameter Name="P_PROJECT_NO" Type="nvarchar" Mode="In" />
42
          <Parameter Name="P_DOCINFO_ID" Type="nvarchar" Mode="In" />
43
          <Parameter Name="P_DOCUMENT_ID" Type="nvarchar" Mode="In" />
44
        </Function>
45
        <Function Name="SELECT_FINAL_PDF_ITEM" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
46
          <Parameter Name="P_ID" Type="nvarchar" Mode="In" />
47
          <Parameter Name="P_PROJECT_NO" Type="nvarchar" Mode="In" />
48
          <Parameter Name="P_DOCUMENT_ID" Type="nvarchar" Mode="In" />
49
          <Parameter Name="P_MARKUPINFO_ID" Type="nvarchar" Mode="In" />
50
          <Parameter Name="P_DOCINFO_ID" Type="nvarchar" Mode="In" />
51
          <Parameter Name="P_DOCUMENT_NAME" Type="nvarchar" Mode="In" />
52
          <Parameter Name="P_DOCUMENT_NO" Type="nvarchar" Mode="In" />
53
          <Parameter Name="P_CREATE_USER_ID" Type="nvarchar" Mode="In" />
54
          <Parameter Name="P_STATUS" Type="int" Mode="In" />
55
          <Parameter Name="P_TAKE_COUNT" Type="int" Mode="In" />
56
          <Parameter Name="P_GROUP_NO" Type="nvarchar" Mode="In" />
57
          <Parameter Name="P_REVISION" Type="nvarchar" Mode="In" />
58
          <Parameter Name="P_BEGIN_CREATE_DATETIME" Type="datetime" Mode="In" />
59
          <Parameter Name="P_FINISH_CREATE_DATETIME" Type="datetime" Mode="In" />
60
          <Parameter Name="P_BEGIN_START_DATETIE" Type="datetime" Mode="In" />
61
          <Parameter Name="P_FINISH_START_DATETIME" Type="datetime" Mode="In" />
62
          <Parameter Name="P_BEGIN_END_DATETIME" Type="datetime" Mode="In" />
63
          <Parameter Name="P_FINISH_END_DATETIME" Type="datetime" Mode="In" />
29 64
        </Function>
30 65
        <Function Name="SELECT_RERECONVERT_ITEM" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
31 66
          <Parameter Name="P_ID" Type="nvarchar" Mode="In" />
32 67
          <Parameter Name="P_RECONVERTER" Type="int" Mode="In" />
68
          <Parameter Name="P_CREATE_DATETIME" Type="datetime" Mode="In" />
33 69
          <Parameter Name="P_STATUS" Type="int" Mode="In" />
70
          <Parameter Name="P_END_DATETIME" Type="datetime" Mode="In" />
34 71
        </Function>
35 72
        <EntityContainer Name="markusModelStoreContainer" />
36 73
      </Schema></edmx:StorageModels>
......
39 76
      <Schema Namespace="markusModel" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
40 77
        <EntityContainer Name="markusEntities" annotation:LazyLoadingEnabled="true" >
41 78
          <FunctionImport Name="SELECT_CONVERT_ITEM" ReturnType="Collection(markusModel.SELECT_CONVERT_ITEM_Result)">
79
            <Parameter Name="P_ID" Mode="In" Type="String" />
42 80
            <Parameter Name="P_PROJECT_NO" Mode="In" Type="String" />
43 81
            <Parameter Name="P_DOCUMENT_ID" Mode="In" Type="String" />
44 82
            <Parameter Name="P_STATUS" Mode="In" Type="Int32" />
......
53 91
            <Parameter Name="P_DOCUMENT_NAME" Mode="In" Type="String" />
54 92
            <Parameter Name="P_DOCUMENT_NO" Mode="In" Type="String" />
55 93
            <Parameter Name="P_REVISION" Mode="In" Type="String" />
94
            <Parameter Name="P_SERVICE_ID" Mode="In" Type="String" />
95
            <Parameter Name="P_RECONVERTER" Mode="In" Type="Int32" />
56 96
          </FunctionImport>
57
          <FunctionImport Name="SELECT_RERECONVERT_ITEM" ReturnType="Collection(markusModel.SELECT_RERECONVERT_ITEM_Result)">
97
          <FunctionImport Name="SELECT_RERECONVERT_ITEM">
58 98
            <Parameter Name="P_ID" Mode="In" Type="String" />
59 99
            <Parameter Name="P_RECONVERTER" Mode="In" Type="Int32" />
100
            <Parameter Name="P_CREATE_DATETIME" Mode="In" Type="DateTime" />
60 101
            <Parameter Name="P_STATUS" Mode="In" Type="Int32" />
102
            <Parameter Name="P_END_DATETIME" Mode="In" Type="DateTime" />
61 103
          </FunctionImport>
62 104
          <FunctionImport Name="SELECT_CONVERT_INSERT">
63 105
            <Parameter Name="P_ID" Mode="In" Type="String" />
......
65 107
            <Parameter Name="P_DOCUMENT_URL" Mode="In" Type="String" />
66 108
            <Parameter Name="P_DOCUMENT_ID" Mode="In" Type="String" />
67 109
          </FunctionImport>
110
          <FunctionImport Name="SELECT_CONVERT_DELETE">
111
          <Parameter Name="P_ID" Mode="In" Type="String" />
112
          </FunctionImport>
113
          <FunctionImport Name="SELECT_FINAL_PDF_DELETE">
114
          <Parameter Name="P_ID" Mode="In" Type="String" />
115
          </FunctionImport>
116
          <FunctionImport Name="SELECT_FINAL_PDF_INSERT">
117
            <Parameter Name="P_ID" Mode="In" Type="String" />
118
            <Parameter Name="P_PROJECT_NO" Mode="In" Type="String" />
119
            <Parameter Name="P_DOCINFO_ID" Mode="In" Type="String" />
120
            <Parameter Name="P_DOCUMENT_ID" Mode="In" Type="String" />
121
          </FunctionImport>
122
          <FunctionImport Name="SELECT_FINAL_PDF_ITEM" ReturnType="Collection(markusModel.SELECT_FINAL_PDF_Result)">
123
            <Parameter Name="P_ID" Mode="In" Type="String" />
124
            <Parameter Name="P_PROJECT_NO" Mode="In" Type="String" />
125
            <Parameter Name="P_DOCUMENT_ID" Mode="In" Type="String" />
126
            <Parameter Name="P_MARKUPINFO_ID" Mode="In" Type="String" />
127
            <Parameter Name="P_DOCINFO_ID" Mode="In" Type="String" />
128
            <Parameter Name="P_DOCUMENT_NAME" Mode="In" Type="String" />
129
            <Parameter Name="P_DOCUMENT_NO" Mode="In" Type="String" />
130
            <Parameter Name="P_CREATE_USER_ID" Mode="In" Type="String" />
131
            <Parameter Name="P_STATUS" Mode="In" Type="Int32" />
132
            <Parameter Name="P_TAKE_COUNT" Mode="In" Type="Int32" />
133
            <Parameter Name="P_GROUP_NO" Mode="In" Type="String" />
134
            <Parameter Name="P_REVISION" Mode="In" Type="String" />
135
            <Parameter Name="P_BEGIN_CREATE_DATETIME" Mode="In" Type="DateTime" />
136
            <Parameter Name="P_FINISH_CREATE_DATETIME" Mode="In" Type="DateTime" />
137
            <Parameter Name="P_BEGIN_START_DATETIE" Mode="In" Type="DateTime" />
138
            <Parameter Name="P_FINISH_START_DATETIME" Mode="In" Type="DateTime" />
139
            <Parameter Name="P_BEGIN_END_DATETIME" Mode="In" Type="DateTime" />
140
            <Parameter Name="P_FINISH_END_DATETIME" Mode="In" Type="DateTime" />
141
          </FunctionImport>
68 142
        </EntityContainer>
69 143
        <ComplexType Name="SELECT_CONVERT_ITEM_Result">
70 144
          <Property Type="String" Name="ID" Nullable="false" MaxLength="50" />
......
86 160
          <Property Type="String" Name="GROUP_NO" Nullable="true" MaxLength="50" />
87 161
          <Property Type="String" Name="RESULT_FILE" Nullable="true" MaxLength="500" />
88 162
          <Property Type="String" Name="RESULT" Nullable="true" MaxLength="50" />
163
          <Property Type="String" Name="PROPERTIES_VALUE" Nullable="false" />
89 164
        </ComplexType>
90
        <ComplexType Name="SELECT_RERECONVERT_ITEM_Result">
91
          <Property Type="String" Name="EX" Nullable="true" MaxLength="50" />
92
          <Property Type="Int32" Name="RETURNVALUE" Nullable="true" />
165
        <ComplexType Name="SELECT_FINAL_PDF_Result" >
166
          <Property Type="String" Name="ID" Nullable="false" />
167
          <Property Type="String" Name="PROJECT_NO" Nullable="false" />
168
          <Property Type="String" Name="DOCUMENT_ID" Nullable="false" />
169
          <Property Type="String" Name="MARKUPINFO_ID" Nullable="false" />
170
          <Property Type="String" Name="DOCINFO_ID" Nullable="false" />
171
          <Property Type="String" Name="DOCUMENT_NAME" Nullable="false" />
172
          <Property Type="String" Name="DOCUMENT_NO" Nullable="false" />
173
          <Property Type="String" Name="CREATE_USER_ID" Nullable="false" />
174
          <Property Type="String" Name="GROUP_NO" Nullable="false" />
175
          <Property Type="Int32" Name="STATUS" Nullable="false" />
176
          <Property Type="String" Name="REVISION" Nullable="false" />
177
          <Property Type="DateTime" Name="CREATE_DATETIME" Nullable="false" />
178
          <Property Type="DateTime" Name="START_DATETIME" Nullable="true" />
179
          <Property Type="DateTime" Name="END_DATETIME" Nullable="true" />
180
          <Property Type="Int32" Name="CURRENT_PAGE" Nullable="false" />
181
          <Property Type="Int32" Name="TOTAL_PAGE" Nullable="false" />
182
          <Property Type="String" Name="ORIGINAL_FILE" Nullable="false" />
183
          <Property Type="String" Name="EXCEPTION" Nullable="false" />
184
          <Property Type="String" Name="RESULT_FILE" Nullable="false" />
185
          <Property Type="String" Name="RESULT" Nullable="false" />
186
          <Property Type="String" Name="LINK" Nullable="false" />
187
          <Property Type="String" Name="PROPERTIES_TYPE" Nullable="false" />
188
          <Property Type="String" Name="PROPERTIES_PROPERTY" Nullable="false" />
189
          <Property Type="String" Name="PROPERTIES_VALUE" Nullable="false" />
93 190
        </ComplexType>
94 191
      </Schema>
95 192
    </edmx:ConceptualModels>
......
123 220
            </ResultMapping>
124 221
          </FunctionImportMapping>
125 222
          <FunctionImportMapping FunctionImportName="SELECT_RERECONVERT_ITEM" FunctionName="markusModel.Store.SELECT_RERECONVERT_ITEM">
223
          </FunctionImportMapping>
224
          <FunctionImportMapping FunctionImportName="SELECT_CONVERT_INSERT" FunctionName="markusModel.Store.SELECT_CONVERT_INSERT" />
225
          <FunctionImportMapping FunctionImportName="SELECT_CONVERT_DELETE" FunctionName="markusModel.Store.SELECT_CONVERT_DELETE" />
226
          <FunctionImportMapping FunctionImportName="SELECT_FINAL_PDF_DELETE" FunctionName="markusModel.Store.SELECT_FINAL_PDF_DELETE" />
227
          <FunctionImportMapping FunctionImportName="SELECT_FINAL_PDF_INSERT" FunctionName="markusModel.Store.SELECT_FINAL_PDF_INSERT" />
228
          <FunctionImportMapping FunctionImportName="SELECT_FINAL_PDF_ITEM" FunctionName="markusModel.Store.SELECT_FINAL_PDF_ITEM" >
126 229
            <ResultMapping>
127
              <ComplexTypeMapping TypeName="markusModel.SELECT_RERECONVERT_ITEM_Result">
128
                <ScalarProperty Name="EX" ColumnName="EX" />
129
                <ScalarProperty Name="RETURNVALUE" ColumnName="RETURNVALUE" />
130
              </ComplexTypeMapping>
230
              <ComplexTypeMapping TypeName="markusModel.SELECT_FINAL_PDF_Result" />
131 231
            </ResultMapping>
132 232
          </FunctionImportMapping>
133
          <FunctionImportMapping FunctionImportName="SELECT_CONVERT_INSERT" FunctionName="markusModel.Store.SELECT_CONVERT_INSERT" />
134 233
        </EntityContainerMapping>
135 234
      </Mapping>
136 235
    </edmx:Mappings>
ConvertService/ServiceBase/Markus.Service.StationController/SELECT_CONVERT_ITEM_Result.cs
32 32
        public string GROUP_NO { get; set; }
33 33
        public string RESULT_FILE { get; set; }
34 34
        public string RESULT { get; set; }
35
        public string PROPERTIES_VALUE { get; set; }
35 36
    }
36 37
}
ConvertService/ServiceBase/Markus.Service.StationController/SELECT_FINAL_PDF_Result.cs
1
//------------------------------------------------------------------------------
2
// <auto-generated>
3
//     이 코드는 템플릿에서 생성되었습니다.
4
//
5
//     이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
6
//     이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
7
// </auto-generated>
8
//------------------------------------------------------------------------------
9

  
10
namespace Markus.Service.StationController
11
{
12
    using System;
13
    
14
    public partial class SELECT_FINAL_PDF_Result
15
    {
16
        public string ID { get; set; }
17
        public string PROJECT_NO { get; set; }
18
        public string DOCUMENT_ID { get; set; }
19
        public string MARKUPINFO_ID { get; set; }
20
        public string DOCINFO_ID { get; set; }
21
        public string DOCUMENT_NAME { get; set; }
22
        public string DOCUMENT_NO { get; set; }
23
        public string CREATE_USER_ID { get; set; }
24
        public string GROUP_NO { get; set; }
25
        public int STATUS { get; set; }
26
        public string REVISION { get; set; }
27
        public System.DateTime CREATE_DATETIME { get; set; }
28
        public Nullable<System.DateTime> START_DATETIME { get; set; }
29
        public Nullable<System.DateTime> END_DATETIME { get; set; }
30
        public int CURRENT_PAGE { get; set; }
31
        public int TOTAL_PAGE { get; set; }
32
        public string ORIGINAL_FILE { get; set; }
33
        public string EXCEPTION { get; set; }
34
        public string RESULT_FILE { get; set; }
35
        public string RESULT { get; set; }
36
        public string LINK { get; set; }
37
        public string PROPERTIES_TYPE { get; set; }
38
        public string PROPERTIES_PROPERTY { get; set; }
39
        public string PROPERTIES_VALUE { get; set; }
40
    }
41
}
ConvertService/ServiceBase/Markus.Service.StationController/SELECT_RERECONVERT_ITEM_Result.cs
1
//------------------------------------------------------------------------------
2
// <auto-generated>
3
//     이 코드는 템플릿에서 생성되었습니다.
4
//
5
//     이 파일을 수동으로 변경하면 응용 프로그램에서 예기치 않은 동작이 발생할 수 있습니다.
6
//     이 파일을 수동으로 변경하면 코드가 다시 생성될 때 변경 내용을 덮어씁니다.
7
// </auto-generated>
8
//------------------------------------------------------------------------------
9

  
10
namespace Markus.Service.StationController
11
{
12
    using System;
13
    
14
    public partial class SELECT_RERECONVERT_ITEM_Result
15
    {
16
        public string EX { get; set; }
17
        public Nullable<int> RETURNVALUE { get; set; }
18
    }
19
}
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/DataBaseItemsModel.cs
23 23
using Markus.Mvvm.ToolKit;
24 24
using System.Windows.Data;
25 25
using System.Windows.Controls;
26
using System.IO;
26 27

  
27 28
namespace Markus.Service.StationController.ViewModel
28 29
{
......
322 323
            }
323 324
        }
324 325

  
325
        public string _Docuemnt_NameFilter;
326
        public string Docuemnt_NameFilter
326
        public string _Document_NameFilter;
327
        public string Document_NameFilter
327 328
        {
328
            get { return _Docuemnt_NameFilter; }
329
            get { return _Document_NameFilter; }
329 330
            set
330 331
            {
331
                if (_Docuemnt_NameFilter == "")
332
                if (_Document_NameFilter == "")
332 333
                {
333
                    _Docuemnt_NameFilter = null;
334
                    _Document_NameFilter = null;
334 335
                }
335
                else if (_Docuemnt_NameFilter != value)
336
                else if (_Document_NameFilter != value)
336 337
                {
337
                    _Docuemnt_NameFilter = value;
338
                    OnPropertyChanged(() => Docuemnt_NameFilter);
338
                    _Document_NameFilter = value;
339
                    OnPropertyChanged(() => Document_NameFilter);
339 340
                }
340 341
            }
341 342
        }
......
598 599
        {
599 600
            try
600 601
            {
601
                using (Markus.Service.DataBase.ConvertDatabase database = new Markus.Service.DataBase.ConvertDatabase(App.MarkusDataBaseConnecitonString))
602
                using (markusEntities entities = new markusEntities())
602 603
                {
603
                    var items = database.GetConvertProjects(collection)//x:database객체 y:statusCodeTypeList의값  Count()안에 predicator 조건 만족하면 count개수안에 넣음
604
                                          .Take(SelectedCount.ValueMember).ToList();//
604
                    List<ConvertItem> Listitems = new List<ConvertItem>();
605 605

  
606
                    items.ForEach(newitem =>
606
                    foreach (var coll in collection)
607
                    {
608
                        var items = entities.SELECT_CONVERT_ITEM(coll.ConvertID, coll.ProjectNumber, null, null, 1, null, null, null, null, null, null, null, null, null, null, null, null).ToList();
609

  
610
                        foreach (var x in items)
611
                        {
612
                            var convertpath = GetSearchConvertPathAndMarkus(x.PROJECT_NO, x.DOCUMENT_ID);
613

  
614
                            ConvertItem AddItem = new ConvertItem(x.SERVICE_ID, x.ID, x.PROJECT_NO, x.STATUS, x.DOCUMENT_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.DOCUMENT_URL, x.REVISION, x.CURRENT_PAGE,
615
                                x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME, x.DOCUMENT_URL, convertpath[0], convertpath[1], x.RECONVERTER);
616
                            Listitems.Add(AddItem);
617
 
618
                        }
619
                    }
620

  
621
                    Listitems.ForEach(newitem =>
607 622
                    {
608 623
                        collection.UpdateWhere(changeitem =>
609 624
                        ConvertItemEx.ChangeValues(changeitem, newitem), x => x.ConvertID == newitem.ConvertID && x.ProjectNumber == newitem.ProjectNumber);
......
612 627
                    RealConvert_Height = 80 + (10 * collection.Count());
613 628
                    DataBase_ItemsHeight = 800 - (RealConvert_Height + Alive_Height);
614 629
                }
630
                //using (Markus.Service.DataBase.ConvertDatabase database = new Markus.Service.DataBase.ConvertDatabase(App.MarkusDataBaseConnecitonString))
631
                //{
632
                //    var items = database.GetConvertProjects(collection)//x:database객체 y:statusCodeTypeList의값  Count()안에 predicator 조건 만족하면 count개수안에 넣음
633
                //                          .Take(SelectedCount.ValueMember).ToList();//
634

  
635
                //    items.ForEach(newitem =>
636
                //    {
637
                //        collection.UpdateWhere(changeitem =>
638
                //        ConvertItemEx.ChangeValues(changeitem, newitem), x => x.ConvertID == newitem.ConvertID && x.ProjectNumber == newitem.ProjectNumber);
639
                //    });
640

  
641
                //    RealConvert_Height = 80 + (10 * collection.Count());
642
                //    DataBase_ItemsHeight = 800 - (RealConvert_Height + Alive_Height);
643
                //}
615 644
            }
616 645
            catch (Exception ex)
617 646
            {
......
623 652
        {
624 653
            try
625 654
            {
626
                using (Markus.Service.DataBase.ConvertDatabase database = new Markus.Service.DataBase.ConvertDatabase(App.MarkusDataBaseConnecitonString))
655
                using (markusEntities entities = new markusEntities())
627 656
                {
628 657

  
629 658
                    int _status = 0;
......
632 661
                        _status = (int)SelectedStatus.Value;
633 662
                    }
634 663

  
664
                    var items = entities.SELECT_CONVERT_ITEM(null, null, null, _status, SelectedCount.ValueMember, null, null, null,
665
                        null, null, null, null, null, null, null, null, null).ToList();
666
                    //var items = database.GetConvertProjects(_status, ProjectNumberFilter, UniqueKeyFilter, Document_NameFilter, Service_IDFilter, Docuemnt_NOFilter
667
                    //    , ReconverterFilter, RevisionFilter)//x:database객체 y:statusCodeTypeList의값  Count()안에 predicator 조건 만족하면 count개수안에 넣음
668
                    //                      .Take(SelectedCount.ValueMember).ToList();
635 669

  
636
                    var items = database.GetConvertProjects(_status, ProjectNumberFilter, UniqueKeyFilter, Docuemnt_NameFilter, Service_IDFilter, Docuemnt_NOFilter
637
                        , ReconverterFilter, RevisionFilter)//x:database객체 y:statusCodeTypeList의값  Count()안에 predicator 조건 만족하면 count개수안에 넣음
638
                                          .Take(SelectedCount.ValueMember).ToList();
670
                    List<ConvertItem> Listitems = new List<ConvertItem>();
671

  
672
                    foreach (var x in items)
673
                    {
674
                        var convertpath = GetSearchConvertPathAndMarkus(x.PROJECT_NO, x.DOCUMENT_ID);
675

  
676
                        ConvertItem AddItem = new ConvertItem(x.SERVICE_ID, x.ID, x.PROJECT_NO, x.STATUS, x.DOCUMENT_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.DOCUMENT_URL, x.REVISION, x.CURRENT_PAGE,
677
                            x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME, x.DOCUMENT_URL, convertpath[0], convertpath[1], x.RECONVERTER);
678
                        Listitems.Add(AddItem);
679

  
680
                    }
639 681

  
640 682
                    if (collection.Count() == 0)
641 683
                    {
642 684
                        if (statusCodeTypeList.Count() == 1)
643 685
                        {
644
                            items.ForEach(x => collection.Add(x));
686
                            Listitems.ForEach(x => collection.Add(x));
645 687
                        }
646 688
                    }
647 689
                    else
648 690
                    {
649 691

  
650 692
                        ////세미 업데이트
651
                        items.ForEach(newitem =>
693
                        Listitems.ForEach(newitem =>
652 694
                        {
653 695
                            collection.UpdateWhere(changeitem =>
654 696
                            ConvertItemEx.ChangeValues(changeitem, newitem), x => x.ProjectNumber == newitem.ProjectNumber && x.ConvertID == newitem.ConvertID);
......
661 703
                            {
662 704
                                var item = collection[i];
663 705

  
664
                                if (items.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0)//디비에서 가져온 값과 마지막값부터 차례대로 비교
706
                                if (Listitems.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0)//디비에서 가져온 값과 마지막값부터 차례대로 비교
665 707
                                {//참=> 0제외한 모든 수
666 708
                                    collection.RemoveAt(i);
667 709
                                }
......
671 713
                        if (statusCodeTypeList.Count() == 1)
672 714
                        {
673 715
                            //추가 convert 후 추가됨
674
                            foreach (var item in items)
716
                            foreach (var item in Listitems)
675 717
                            {
676 718
                                if (collection.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0)//그리드와 디비 변동 없으면 안들어감
677 719
                                {
......
713 755
        {
714 756
            try
715 757
            {
716
                using (Markus.Service.DataBase.ConvertDatabase database = new Markus.Service.DataBase.ConvertDatabase(App.MarkusDataBaseConnecitonString))
758
                using (markusEntities entities = new markusEntities())
717 759
                {
718
                    using (markusEntities entities = new markusEntities())
760
                    int _status = 0;
761
                    if (SelectedStatus != null)
719 762
                    {
763
                        _status = (int)SelectedStatus.Value;
764
                    }
720 765

  
766
                    //DocumentID = unikey
767
                    DateTime? Start_CreateTime = null;
768
                    DateTime? Finish_CreateTime = null;
769
                    if(SelectedCreateTimeBegin != DefaultCreateTime)
770
                    {
771
                        Start_CreateTime = SelectedCreateTimeBegin;
772
                    }
773
                    if(SelectedCreateTimeEnd != DefaultCreateTime)
774
                    {
775
                        Finish_CreateTime = SelectedCreateTimeEnd;
776
                    }
721 777

  
722
                        int _status = 0;
723
                        if (SelectedStatus != null)
724
                        {
725
                            _status = (int)SelectedStatus.Value;
726
                        }
727

  
728
                        //DocumentID = unikey
729

  
730
                        var items = entities.SELECT_CONVERT_ITEM(ProjectNumberFilter, UniqueKeyFilter, _status, SelectedCount.ValueMember, SelectedCreateTimeBegin, SelectedCreateTimeEnd, null, null, null, null, GroupNOFilter,
731
                            Docuemnt_NameFilter, Docuemnt_NOFilter, RevisionFilter).ToList();
778
                    var items = entities.SELECT_CONVERT_ITEM(null, ProjectNumberFilter, UniqueKeyFilter, _status, SelectedCount.ValueMember, Start_CreateTime, Finish_CreateTime, null,
779
                        null, null, null, GroupNOFilter, Document_NameFilter, Docuemnt_NOFilter, RevisionFilter, Service_IDFilter, ReconverterFilter).ToList();
732 780

  
733
                        //SEARCH 할때 최소한 프로젝트 넘버랑 유니크키(다큐먼트 넘버) 크레이트타임 시작 줘야함
781
                    List<ConvertItem> Listitems = new List<ConvertItem>();
734 782

  
735
                        List<ConvertItem> Listitems = new List<ConvertItem>();
783
                    foreach (var x in items)
784
                    {
785
                        var convertpath = GetSearchConvertPathAndMarkus(x.PROJECT_NO, x.DOCUMENT_ID);
736 786

  
737
                        foreach (var x in items)
738
                        {
739
                            var convertpath = database.GetSearchConvertPathAndMarkus(x.PROJECT_NO, x.DOCUMENT_ID);
787
                        ConvertItem AddItem = new ConvertItem(x.SERVICE_ID, x.ID, x.PROJECT_NO, x.STATUS, x.DOCUMENT_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.DOCUMENT_URL, x.REVISION, x.CURRENT_PAGE,
788
                            x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME, x.DOCUMENT_URL, convertpath[0], convertpath[1], x.RECONVERTER);
789
                        Listitems.Add(AddItem);
740 790

  
741
                            ConvertItem AddItem = new ConvertItem(x.SERVICE_ID, x.ID, x.PROJECT_NO, x.STATUS, x.DOCUMENT_ID, x.DOCUMENT_NAME, x.DOCUMENT_NO, x.DOCUMENT_URL, x.REVISION, x.CURRENT_PAGE, x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME
742
                             , x.DOCUMENT_URL, convertpath[0], convertpath[1]);
743
                            Listitems.Add(AddItem);
744
                            //이거 없으면 collection.Insert(i, item); 할때 문제 생김
745
                        }
791
                    }
746 792

  
747
                        if (collection.Count() == 0)
793
                    if (collection.Count() == 0)
794
                    {
795
                        if (statusCodeTypeList.Count() == 1)
748 796
                        {
749
                            if (statusCodeTypeList.Count() == 1)
797
                            foreach (var x in Listitems)
750 798
                            {
751
                                foreach (var x in Listitems)
752
                                {
753
                                    collection.Add(x);
754
                                }
799
                                collection.Add(x);
755 800
                            }
756 801
                        }
757
                        else
802
                    }
803
                    else
804
                    {
805

  
806
                        ////세미 업데이트
807
                        foreach (var newitem in Listitems)
758 808
                        {
809
                            collection.UpdateWhere(changeitem =>
810
                            ConvertItemEx.ChangeValues(changeitem, newitem), x => x.ProjectNumber == newitem.ProjectNumber && x.ConvertID == newitem.ConvertID);
811
                        }
759 812

  
760
                            ////세미 업데이트
761
                            foreach (var newitem in Listitems)
762
                            {
763
                                collection.UpdateWhere(changeitem =>
764
                                ConvertItemEx.ChangeValues(changeitem, newitem), x => x.ProjectNumber == newitem.ProjectNumber && x.ConvertID == newitem.ConvertID);
765
                            }
766 813

  
814
                        if (statusCodeTypeList.Count() == 1)
815
                        {
767 816

  
768
                            if (statusCodeTypeList.Count() == 1)
817
                            //삭제
818
                            for (int i = collection.Count() - 1; i >= 0; --i)
769 819
                            {
820
                                var item = collection[i];
770 821

  
771
                                //삭제
772
                                for (int i = collection.Count() - 1; i >= 0; --i)
822
                                if (Listitems.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0)
773 823
                                {
774
                                    var item = collection[i];
775

  
776
                                    if (Listitems.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0)
777
                                    {
778
                                        collection.RemoveAt(i);
779
                                    }
824
                                    collection.RemoveAt(i);
780 825
                                }
781 826
                            }
827
                        }
782 828

  
783
                            if (statusCodeTypeList.Count() == 1)
829
                        if (statusCodeTypeList.Count() == 1)
830
                        {
831
                            //추가 convert 후 추가됨
832
                            foreach (var item in Listitems)
784 833
                            {
785
                                //추가 convert 후 추가됨
786
                                foreach (var item in Listitems)
834
                                if (collection.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0)
787 835
                                {
788
                                    if (collection.Count(x => x.ConvertID == item.ConvertID && x.ProjectNumber == item.ProjectNumber) == 0)
836
                                    for (int i = 0; i < 200; i++)
789 837
                                    {
790
                                        for (int i = 0; i < 200; i++)
838
                                        if (i < collection.Count() - 1)
791 839
                                        {
792
                                            if (i < collection.Count() - 1)
793
                                            {
794
                                                if (DateTime.Compare(collection[i].CreateTime, item.CreateTime) < 0)
795
                                                {
796
                                                    collection.Insert(i, item);
797
                                                    break;
798
                                                }
799
                                            }
800
                                            else
840
                                            if (DateTime.Compare(collection[i].CreateTime, item.CreateTime) < 0)
801 841
                                            {
802
                                                collection.Add(item);
842
                                                collection.Insert(i, item);
803 843
                                                break;
804 844
                                            }
805 845
                                        }
806

  
846
                                        else
847
                                        {
848
                                            collection.Add(item);
849
                                            break;
850
                                        }
807 851
                                    }
808 852

  
809 853
                                }
810
                            }
811 854

  
855
                            }
812 856
                        }
857

  
813 858
                    }
859

  
814 860
                }
815 861

  
816 862
            }
......
828 874
            try
829 875
            {
830 876
                List<ConvertItem> newitems = new List<ConvertItem>();
831
                using (Markus.Service.DataBase.ConvertDatabase database = new Markus.Service.DataBase.ConvertDatabase(App.MarkusDataBaseConnecitonString))
877
                foreach (var client in App.StationClientList)
832 878
                {
833
                    foreach (var client in App.StationClientList)
879
                    if (await SimplePingAsync(client.Endpoint.Address.ToString()))
834 880
                    {
835
                        if (await SimplePingAsync(client.Endpoint.Address.ToString()))
881
                        try
836 882
                        {
837
                            try
838
                            {
839
                                List<ConvertItem> itemsToList = new List<ConvertItem>();
840
                                var items = await client.AliveConvertListAsync();
841
                                string result = "";
842

  
843
                                foreach (var item in items)
844
                                {
845
                                    ConvertItem itemsToEach = new ConvertItem();
846
                                    itemsToEach.ServiceID = item.ServiceID;
847
                                    itemsToEach.ConvertID = item.ConvertID;
848
                                    itemsToEach.ProjectNumber = item.ProjectNumber;
883
                            List<ConvertItem> itemsToList = new List<ConvertItem>();
884
                            var items = await client.AliveConvertListAsync();
885
                            string result = "";
849 886

  
850
                                    var convertpath = database.GetSearchConvertPathAndMarkus(item.ProjectNumber, item.UniqueKey);
887
                            foreach (var item in items)
888
                            {
889
                                ConvertItem itemsToEach = new ConvertItem();
890
                                itemsToEach.ServiceID = item.ServiceID;
891
                                itemsToEach.ConvertID = item.ConvertID;
892
                                itemsToEach.ProjectNumber = item.ProjectNumber;
851 893

  
... 이 차이점은 표시할 수 있는 최대 줄수를 초과해서 이 차이점은 잘렸습니다.

내보내기 Unified diff

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