프로젝트

일반

사용자정보

개정판 e139272d

IDe139272d64cf7c5fa830020a0fe9867123019f76
상위 c7955b40
하위 ab3ac9b2

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

ProjectNoFilter Combobox변경

Change-Id: Ib63ffc94500267620556a1695cf85e3f65ddd15f

차이점 보기:

ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/DataBaseItemsModel.cs
54 54

  
55 55
        #region Properties
56 56

  
57
        public ObservableCollection<ProjectName> _ProjectNames;
58
        public ObservableCollection<ProjectName> ProjectNames
59
        {
60
            get
61
            {
62
                if (_ProjectNames == null)
63
                {
64
                    _ProjectNames = new System.Collections.ObjectModel.ObservableCollection<ProjectName>();
65
                }
66

  
67
                return _ProjectNames;
68
            }
69
            set
70
            {
71
                _ProjectNames = value;
72
                OnPropertyChanged(() => ProjectNames);
73
            }
74
        }
75

  
57 76
        private System.Collections.ObjectModel.ObservableCollection<ConvertPDF> _FilterSearch;
58 77
        public System.Collections.ObjectModel.ObservableCollection<ConvertPDF> FilterSearch
59 78
        {
......
278 297
            }
279 298
        }
280 299

  
281
        public string _ProjectNumberFilter;
282
        public string ProjectNumberFilter
300
        public ProjectName _ProjectNumberFilter;
301
        public ProjectName ProjectNumberFilter
283 302
        {
284
            get { return _ProjectNumberFilter; }
285
            set
303
            get
286 304
            {
287
                if (_ProjectNumberFilter == "")
288
                {
289
                    _ProjectNumberFilter = null;
290
                }
291
                else if (_ProjectNumberFilter != value)
305
                if (_ProjectNumberFilter == null)
292 306
                {
293
                    _ProjectNumberFilter = value;
294
                    OnPropertyChanged(() => ProjectNumberFilter);
307
                    _ProjectNumberFilter = new ProjectName();
295 308
                }
309
                return _ProjectNumberFilter;
310
            }
311
            set
312
            {
313
                _ProjectNumberFilter = value;
314
                OnPropertyChanged(() => ProjectNumberFilter);
296 315
            }
297 316
        }
298 317

  
......
555 574
                });
556 575
            }
557 576

  
558
            //await Task.Delay(5000);
559
            await Task.Delay(10000);
577
            await Task.Delay(5000);
578
            //await Task.Delay(10000);
560 579

  
561 580
            //System.Threading.Thread.Sleep(new TimeSpan(0,0,0,0,100));
562 581

  
......
579 598
                });
580 599
            }
581 600

  
582
            //await Task.Delay(5000);
583
            await Task.Delay(10000);
601
            await Task.Delay(5000);
602
            //await Task.Delay(10000);
584 603

  
585 604
            //System.Threading.Thread.Sleep(new TimeSpan(0,0,0,0,100));
586 605

  
......
626 645
                DataSelect(new[] { (StatusCodeType)(SelectedStatus.Value) }, FilterConvertSource);
627 646
            }
628 647

  
648

  
629 649
            /// 컨버터중인 items
630 650
            RealDataSelect(new[] { StatusCodeType.None, StatusCodeType.Wait, StatusCodeType.PageLoading, StatusCodeType.Saving }, RealConvertSource);
631 651

  
......
641 661

  
642 662
                    foreach (var coll in collection)
643 663
                    {
644
                        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,null).ToList();
664
                        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, null).ToList();
645 665

  
646 666
                        foreach (var x in items)
647 667
                        {
......
650 670
                            ConvertPDF AddItem = new ConvertPDF(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,
651 671
                                x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME, x.DOCUMENT_URL, x.CONVERT_PATH, MarkusLink, x.RECONVERTER);
652 672
                            Listitems.Add(AddItem);
653
 
673

  
654 674
                        }
655 675
                    }
656 676

  
......
681 701
                        _status = (int)SelectedStatus.Value;
682 702
                    }
683 703

  
684
                    var items = entities.SELECT_CONVERT_ITEM(null, null, null, _status, SelectedCount.ValueMember, null, null, null,
685
                        null, null, null, null, null, null, null, null, null, null).ToList();
686

  
687
                    List<ConvertPDF> Listitems = new List<ConvertPDF>();
688

  
689
                    foreach (var x in items)
704
                    if (ProjectNames.Count() == 0)
690 705
                    {
691
                        var MarkusLink = "kcom://" + CreateMarkusParam(x.PROJECT_NO, x.DOCUMENT_ID, "doftech");
692

  
693
                        ConvertPDF AddItem = new ConvertPDF(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,
694
                            x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME, x.DOCUMENT_URL, x.CONVERT_PATH, MarkusLink, x.RECONVERTER);
695
                        Listitems.Add(AddItem);
696

  
706
                        foreach (var x in entities.SELECT_RUN_PROJECTS(0))
707
                        {
708
                            ProjectName projectName = new ProjectName(x.PROJECT_NO, x.PROJECT_NAME);
709
                            ProjectNames.Add(projectName);
710
                        }
697 711
                    }
698 712

  
713
                    var Listitems = from num in entities.SELECT_CONVERT_ITEM(null, null, null, _status, SelectedCount.ValueMember, null, null, null, null, null, null, null, null, null, null, null, null, null).ToList()
714
                                                 let MarkusLink = "kcom://" + CreateMarkusParam(num.PROJECT_NO, num.DOCUMENT_ID, "doftech")
715
                                                 select new ConvertPDF(num.SERVICE_ID, num.ID, num.PROJECT_NO, num.STATUS, num.DOCUMENT_ID, num.DOCUMENT_NAME, num.DOCUMENT_NO, num.DOCUMENT_URL, num.REVISION, num.CURRENT_PAGE,
716
                            num.TOTAL_PAGE, num.EXCEPTION, num.GROUP_NO, num.CREATE_DATETIME, num.START_DATETIME, num.END_DATETIME, num.DOCUMENT_URL, num.CONVERT_PATH, MarkusLink, num.RECONVERTER);
717

  
699 718
                    if (collection.Count() == 0)
700 719
                    {
701 720
                        if (statusCodeTypeList.Count() == 1)
702 721
                        {
703
                            Listitems.ForEach(x => collection.Add(x));
722
                            //Listitems.ForEach(x => collection.Add(x));
723
                            foreach(var Listitem in Listitems.ToList())
724
                            {
725
                                collection.Add(Listitem);
726
                            }
704 727
                        }
705 728
                    }
706 729
                    else
707 730
                    {
708 731

  
709 732
                        ////세미 업데이트
710
                        Listitems.ForEach(newitem =>
733
                        //Listitems.ForEach(newitem =>
734
                        //{
735
                        //    collection.UpdateWhere(changeitem =>
736
                        //    ConvertItemEx.ChangeValues(changeitem, newitem), x => x.ProjectNumber == newitem.ProjectNumber && x.ConvertID == newitem.ConvertID);
737
                        //});
738
                        foreach (var Listitem in Listitems)
711 739
                        {
712 740
                            collection.UpdateWhere(changeitem =>
713
                            ConvertItemEx.ChangeValues(changeitem, newitem), x => x.ProjectNumber == newitem.ProjectNumber && x.ConvertID == newitem.ConvertID);
714
                        });
715

  
741
                            ConvertItemEx.ChangeValues(changeitem, Listitem), x => x.ProjectNumber == Listitem.ProjectNumber && x.ConvertID == Listitem.ConvertID);
742
                        }
716 743
                        if (statusCodeTypeList.Count() == 1)
717 744
                        {
718 745
                            //삭제
......
783 810
                    //DocumentID = unikey
784 811
                    DateTime? Start_CreateTime = null;
785 812
                    DateTime? Finish_CreateTime = null;
786
                    if(SelectedCreateTimeBegin != DefaultCreateTime)
813
                    if (SelectedCreateTimeBegin != DefaultCreateTime)
787 814
                    {
788 815
                        Start_CreateTime = SelectedCreateTimeBegin;
789 816
                    }
790
                    if(SelectedCreateTimeEnd != DefaultCreateTime)
817
                    if (SelectedCreateTimeEnd != DefaultCreateTime)
791 818
                    {
792 819
                        Finish_CreateTime = SelectedCreateTimeEnd;
793 820
                    }
794 821

  
795
                    var items = entities.SELECT_CONVERT_ITEM(null, ProjectNumberFilter, UniqueKeyFilter, _status, SelectedCount.ValueMember, Start_CreateTime, Finish_CreateTime, null,
796
                        null, null, null, GroupNOFilter, Document_NameFilter, Docuemnt_NOFilter, RevisionFilter, Service_IDFilter, ReconverterFilter, DOCUMENT_URLFilter).ToList();
797

  
798
                    List<ConvertPDF> Listitems = new List<ConvertPDF>();
799

  
800
                    foreach (var x in items)
822
                    if (ProjectNames.Count() == 0)
801 823
                    {
802
                        var MarkusLink = "kcom://" + CreateMarkusParam(x.PROJECT_NO, x.DOCUMENT_ID, "doftech");
803

  
804
                        ConvertPDF AddItem = new ConvertPDF(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,
805
                            x.TOTAL_PAGE, x.EXCEPTION, x.GROUP_NO, x.CREATE_DATETIME, x.START_DATETIME, x.END_DATETIME, x.DOCUMENT_URL, x.CONVERT_PATH, MarkusLink, x.RECONVERTER);
806
                        Listitems.Add(AddItem);
807

  
824
                        foreach (var x in entities.SELECT_RUN_PROJECTS(0))
825
                        {
826
                            ProjectName projectName = new ProjectName(x.PROJECT_NO, x.PROJECT_NAME);
827
                            ProjectNames.Add(projectName);
828
                        }
808 829
                    }
809 830

  
831
                    var Listitems = from num in entities.SELECT_CONVERT_ITEM(null, ProjectNumberFilter.Project_NO, UniqueKeyFilter, _status, SelectedCount.ValueMember, Start_CreateTime, Finish_CreateTime, null,
832
                null, null, null, GroupNOFilter, Document_NameFilter, Docuemnt_NOFilter, RevisionFilter, Service_IDFilter, ReconverterFilter, DOCUMENT_URLFilter).ToList()
833
                                    let MarkusLink = "kcom://" + CreateMarkusParam(num.PROJECT_NO, num.DOCUMENT_ID, "doftech")
834
                                    select new ConvertPDF(num.SERVICE_ID, num.ID, num.PROJECT_NO, num.STATUS, num.DOCUMENT_ID, num.DOCUMENT_NAME, num.DOCUMENT_NO, num.DOCUMENT_URL, num.REVISION, num.CURRENT_PAGE,
835
               num.TOTAL_PAGE, num.EXCEPTION, num.GROUP_NO, num.CREATE_DATETIME, num.START_DATETIME, num.END_DATETIME, num.DOCUMENT_URL, num.CONVERT_PATH, MarkusLink, num.RECONVERTER);
836

  
810 837
                    if (collection.Count() == 0)
811 838
                    {
812 839
                        if (statusCodeTypeList.Count() == 1)
......
1138 1165
                    var _CREATE_DATETIME = DateTime.Now;
1139 1166
                    var _STATUS = (int)StatusCodeType.None;
1140 1167

  
1141
                  entities.SELECT_RERECONVERT_ITEM(_ConvertItem.ConvertID, _RECONVERTER, _CREATE_DATETIME, _STATUS, null);//_END_DATETIME = null 에러
1168
                    entities.SELECT_RERECONVERT_ITEM(_ConvertItem.ConvertID, _RECONVERTER, _CREATE_DATETIME, _STATUS, null);//_END_DATETIME = null 에러
1142 1169

  
1143 1170
                }
1144 1171

  
......
1364 1391

  
1365 1392
        public void Reset(object obj)
1366 1393
        {
1367
            ProjectNumberFilter = null;
1394
            ProjectNumberFilter= null;
1368 1395
            UniqueKeyFilter = null;
1369 1396
            Service_IDFilter = null;
1370 1397
            Document_NameFilter = null;
......
1378 1405
            SelectedCreateTimeEnd = DefaultCreateTime;
1379 1406
            dispatcherTimer.Tick -= new EventHandler(SearchTimer_Tick);
1380 1407
            dispatcherTimer.Tick += new EventHandler(Timer_Tick);
1408
            ProjectNames.Clear();
1409
            using (markusEntities entities = new markusEntities(App.MarkusDataBaseConnecitonString))
1410
            {
1411
                foreach (var x in entities.SELECT_RUN_PROJECTS(0))
1412
                {
1413
                    ProjectName projectName = new ProjectName(x.PROJECT_NO, x.PROJECT_NAME);
1414
                    ProjectNames.Add(projectName);
1415
                }
1416
            }
1381 1417
        }
1382 1418

  
1383 1419
        #endregion

내보내기 Unified diff