프로젝트

일반

사용자정보

개정판 dfc86b71

IDdfc86b714abcbb52baa6b87fd35ec24abc241b27
상위 2decfbdf
하위 0cb12397

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

DataBaseItemsModel Alive Grid 수정

Change-Id: Iee3df7b70ce99c71e1aca094e632ab7253866727

차이점 보기:

ConvertService/ServiceBase/Markus.Service.StationController/Controls/RowIndexColumn.cs
19 19
                textBlock = new TextBlock();
20 20
            }
21 21

  
22
            textBlock.Text = string.Format("{0}", this.DataControl.Items.IndexOf(dataItem) + 1);
22
            textBlock.Dispatcher.Invoke(() => {
23
                textBlock.Text = string.Format("{0}", this.DataControl.Items.IndexOf(dataItem) + 1);
24
            });
23 25

  
24 26
            return textBlock;
25 27
        }
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/DataBaseItemsModel.cs
27 27
namespace Markus.Service.StationController.ViewModel
28 28
{
29 29
    //세미
30
    public class DataBaseItemsModel : Mvvm.ToolKit.ViewModelBase, INotifyPropertyChanged
30
    public class DataBaseItemsModel : Mvvm.ToolKit.ViewModelBase
31 31
    {
32 32
        //alive
33 33
        private BackgroundWorker AlivebackgroundWorker;
34 34
        
35
        private bool isLoading;
36 35
        private System.Windows.Documents.FlowDocument connectionLog;
37 36

  
38 37
        private System.Collections.ObjectModel.ObservableCollection<ConvertItem> _AliveItems;
......
46 45
            }
47 46
        }
48 47

  
48
        private System.Collections.ObjectModel.ObservableCollection<ConvertItem> _FilterConvertSource;
49

  
50
        public System.Collections.ObjectModel.ObservableCollection<ConvertItem> FilterConvertSource
51
        {
52
            get => _FilterConvertSource;
53
            set
54
            {
55
                _FilterConvertSource = value;
56
                OnPropertyChanged(() => FilterConvertSource);
57
            }
58
        }
59

  
60

  
61
        private System.Collections.ObjectModel.ObservableCollection<ConvertItem> _RealConvertSource;
62
        public System.Collections.ObjectModel.ObservableCollection<ConvertItem> RealConvertSource
63
        {
64
            get => _RealConvertSource;
65
            set
66
            {
67
                _RealConvertSource = value;
68
                OnPropertyChanged(() => RealConvertSource);
69
            }
70
        }
71

  
72
        private bool isLoading;
73

  
49 74
        public bool AliveIsLoading
50 75
        {
51 76
            get => isLoading; set
......
369 394
        //}
370 395
        //alive
371 396

  
372
        public event PropertyChangedEventHandler PropertyChanged;
373

  
374
        private void NotifyPropertyChanged(String info)
375
        {
376
            if (PropertyChanged != null)
377
            {
378
                PropertyChanged(this, new PropertyChangedEventArgs(info));
379
            }
380
        }
381

  
382 397
        BackgroundWorker backgroundWorker;
383 398

  
384 399
        Random rnd = new Random();
385 400

  
386
        private System.Collections.ObjectModel.ObservableCollection<ConvertItem> _FilterConvertSource;
387 401
        private ConvertItem _SelectRealConvert;
388 402
        private ConvertItem _SelectFilterConvert;
389 403

  
......
398 412
            set
399 413
            {
400 414
                _SelectedStatus = value;
401
                NotifyPropertyChanged("SelectedStatus");
415
                OnPropertyChanged(()=> SelectedStatus);
402 416
            }
403 417
        }
404 418

  
......
411 425
            set
412 426
            {
413 427
                _SelectedCount = value;
414
                NotifyPropertyChanged("SelectedCount");
428
                OnPropertyChanged(() => SelectedCount);
415 429
            }
416 430
        }
417 431

  
......
481 495
        }
482 496

  
483 497

  
484
        public System.Collections.ObjectModel.ObservableCollection<ConvertItem> FilterConvertSource
485
        {
486
            get => _FilterConvertSource;
487
            set
488
            {
489
                _FilterConvertSource = value;
490
                NotifyPropertyChanged("FilterConvertSource");
491
            }
492
        }
493

  
494

  
495
        private System.Collections.ObjectModel.ObservableCollection<ConvertItem> _RealConvertSource;
496
        public System.Collections.ObjectModel.ObservableCollection<ConvertItem> RealConvertSource
497
        {
498
            get => _RealConvertSource;
499
            set
500
            {
501
                _RealConvertSource = value;
502
                NotifyPropertyChanged("RealConvertSource");
503
            }
504
        }
505

  
506

  
507 498

  
508 499
        public ConvertItem SelectFilterConvert
509 500
        {
......
511 502
            set
512 503
            {
513 504
                _SelectFilterConvert = value;
514
                NotifyPropertyChanged("SelectFilterConvert");
505
                OnPropertyChanged(() => SelectFilterConvert);
515 506
            }
516 507
        }
517 508
        public ConvertItem SelectRealConvert
......
520 511
            set
521 512
            {
522 513
                _SelectRealConvert = value;
523
                NotifyPropertyChanged("SelectRealConvert");
514
                OnPropertyChanged(() => SelectRealConvert);
524 515
            }
525 516
        }
526 517

  
......
530 521
            set
531 522
            {
532 523
                _StatusType = value;
533
                NotifyPropertyChanged("StatusType");
524
                OnPropertyChanged(() => StatusType);
534 525
            }
535 526
        }
536 527

  
......
542 533
                if (_IsLoading != value)
543 534
                {
544 535
                    _IsLoading = value;
545
                    NotifyPropertyChanged("IsLoading");
536
                    OnPropertyChanged(() => IsLoading);
546 537
                }
547 538
            }
548 539
        }
......
1132 1123
            set
1133 1124
            {
1134 1125
                _DisplayMember = value;
1126

  
1135 1127
                NotifyPropertyChanged("DisplayMember");
1136 1128
            }
1137 1129
        }
ConvertService/ServiceBase/Markus.Service.StationController/Views/DataBaseView.xaml
200 200
                  Header="Alive Items" Margin="3" BorderThickness="0" 
201 201
                  ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" >
202 202
            <telerik:RadGridView GroupRenderMode="Flat" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
203
							 ItemsSource="{Binding AliveItems,Mode=OneWay}" 
203
							 ItemsSource="{Binding AliveItems}" 
204 204
							 AutoGenerateColumns="False" CanUserFreezeColumns="False"
205 205
                             ColumnWidth="*"  ScrollViewer.CanContentScroll="False" IsFilteringAllowed="True" Grid.Row="1" >
206 206
                <!--<telerik:RadGridView ItemsSource="{Binding Source={StaticResource AliveViewModel}}" AutoGenerateColumns="False" 
ConvertService/ServiceBase/ServiceBase.sln
109 109
EndProject
110 110
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTest.Markus.Service", "UnitTest.Markus.Service\UnitTest.Markus.Service.csproj", "{8555777D-922B-473F-9997-EBC63CA944C4}"
111 111
EndProject
112
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestDocumentInfo", "TestDocumentInfo\TestDocumentInfo.csproj", "{8E4A5DBD-1A40-4D43-A03B-E780ED098E9D}"
113
EndProject
112 114
Global
113 115
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
114 116
		Debug|Any CPU = Debug|Any CPU
......
373 375
		{8555777D-922B-473F-9997-EBC63CA944C4}.Release|x64.Build.0 = Release|Any CPU
374 376
		{8555777D-922B-473F-9997-EBC63CA944C4}.Release|x86.ActiveCfg = Release|Any CPU
375 377
		{8555777D-922B-473F-9997-EBC63CA944C4}.Release|x86.Build.0 = Release|Any CPU
378
		{8E4A5DBD-1A40-4D43-A03B-E780ED098E9D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
379
		{8E4A5DBD-1A40-4D43-A03B-E780ED098E9D}.Debug|Any CPU.Build.0 = Debug|Any CPU
380
		{8E4A5DBD-1A40-4D43-A03B-E780ED098E9D}.Debug|x64.ActiveCfg = Debug|Any CPU
381
		{8E4A5DBD-1A40-4D43-A03B-E780ED098E9D}.Debug|x64.Build.0 = Debug|Any CPU
382
		{8E4A5DBD-1A40-4D43-A03B-E780ED098E9D}.Debug|x86.ActiveCfg = Debug|Any CPU
383
		{8E4A5DBD-1A40-4D43-A03B-E780ED098E9D}.Debug|x86.Build.0 = Debug|Any CPU
384
		{8E4A5DBD-1A40-4D43-A03B-E780ED098E9D}.Release|Any CPU.ActiveCfg = Release|Any CPU
385
		{8E4A5DBD-1A40-4D43-A03B-E780ED098E9D}.Release|Any CPU.Build.0 = Release|Any CPU
386
		{8E4A5DBD-1A40-4D43-A03B-E780ED098E9D}.Release|x64.ActiveCfg = Release|Any CPU
387
		{8E4A5DBD-1A40-4D43-A03B-E780ED098E9D}.Release|x64.Build.0 = Release|Any CPU
388
		{8E4A5DBD-1A40-4D43-A03B-E780ED098E9D}.Release|x86.ActiveCfg = Release|Any CPU
389
		{8E4A5DBD-1A40-4D43-A03B-E780ED098E9D}.Release|x86.Build.0 = Release|Any CPU
376 390
	EndGlobalSection
377 391
	GlobalSection(SolutionProperties) = preSolution
378 392
		HideSolutionNode = FALSE
......
380 394
	GlobalSection(NestedProjects) = preSolution
381 395
		{A317C1F6-E72E-4A5C-87EC-601622B0CF09} = {38FB29F2-1B34-49E6-873C-9E04F77F7B08}
382 396
		{535AA98D-063A-46A4-86D8-371F6C16C099} = {38FB29F2-1B34-49E6-873C-9E04F77F7B08}
397
		{8E4A5DBD-1A40-4D43-A03B-E780ED098E9D} = {38FB29F2-1B34-49E6-873C-9E04F77F7B08}
383 398
	EndGlobalSection
384 399
	GlobalSection(ExtensibilityGlobals) = postSolution
385 400
		SolutionGuid = {CA1BB1E8-1969-4435-A889-37F359B6EAAE}
ConvertService/ServiceBase/TestDocumentInfo/App.config
1
<?xml version="1.0" encoding="utf-8"?>
2
<configuration>
3
  <configSections>
4
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
5
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
6
  </configSections>
7
  <entityFramework>
8
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
9
    <providers>
10
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
11
    </providers>
12
  </entityFramework>
13
</configuration>
ConvertService/ServiceBase/TestDocumentInfo/DocumentInfoProcess.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6
using Markus.Service.Convert.Plugin;
7
using Markus.Service.Extensions;
8

  
9
namespace TestDocumentInfo
10
{
11
    public class DocumentInfoProcess : Markus.Service.Convert.Plugin.IPlugin
12
    {
13
        public string Name => "TestDocumentInfo";
14

  
15
        public string Exception { get; set; }
16
        public string gConvertID;
17

  
18
        private const string MARKUS_ConnectionString_KEY = "MARKUS_ConnectionString";
19

  
20
        bool IPlugin.Do(string ConvertID, Dictionary<string, object> Parameters)
21
        {
22
            bool result = false;
23

  
24
            gConvertID = ConvertID;
25

  
26
            try
27
            {
28

  
29
                if (Parameters.Keys.Count(x => x == MARKUS_ConnectionString_KEY) > 0)
30
                {
31
                    string connectionString = Parameters[MARKUS_ConnectionString_KEY].ToString();
32

  
33
                    using (var entities = new Markus.EntityModel.MarkusModel(Markus.Service.Extensions.Encrypt.AESEncrypter.Decrypt(connectionString)))
34
                    {
35
                        var convertItems = entities.CONVERTER_DOC.Where(x => x.ID == ConvertID);
36

  
37
                        if (convertItems.Count() > 0)
38
                        {
39
                            var convertItem = convertItems.First();
40

  
41
                            string projectNo = convertItem.PROJECT_NO;
42
                            string documentId = convertItem.DOCUMENT_ID;
43

  
44
                            var docItems = entities.DOCUMENT_ITEM.Where(x => x.PROJECT_NO == projectNo && x.DOCUMENT_ID == documentId);
45

  
46
                            if (docItems.Count() > 0)
47
                            {
48
                                var docitem = docItems.First();
49

  
50
                                docitem.DOCUMENT_NAME = docitem.DOCUMENT_NAME;
51
                                docitem.REVISION = docitem.REVISION;
52
                                docitem.DOCUMENT_NO = docitem.DOCUMENT_NO;
53
                                docitem.ORIGINAL_FILE = convertItem.DOCUMENT_URL;
54
                            }
55
                            else
56
                            {
57

  
58
                                string docNo = "";
59

  
60
                                var filename = convertItem.DOCUMENT_URL.Split('/').LastOrDefault();
61

  
62
                                if (filename.Contains('.'))
63
                                {
64
                                    docNo = filename.Split('.').First();
65
                                }
66

  
67
                                entities.DOCUMENT_ITEM.Add(new Markus.EntityModel.DOCUMENT_ITEM
68
                                {
69
                                    ID = new Guid().CreateUniqueGuid().ToString(),
70
                                    DOCUMENT_NO = docNo,
71
                                    REVISION = "A",
72
                                    DOCUMENT_NAME = docNo,
73
                                    GROUP_NO = "11",
74
                                    ORIGINAL_FILE = convertItem.DOCUMENT_URL,
75
                                    DOCUMENT_ID = documentId,
76
                                    PROJECT_NO = projectNo
77
                                });
78
                            }
79

  
80
                            entities.SaveChanges();
81
                            result = true;
82
                        }
83
                        else
84
                        {
85
                            this.Exception = "Convert_Doc Not Found";
86
                        }
87
                    }
88

  
89
                }
90
                else
91
                {
92
                    this.Exception = "MARKUS_ConnectionString SECTION Not Found";
93
                }
94
            }
95

  
96
            catch (Exception ex)
97
            {
98
                this.Exception = ex.ToString();
99
                result = false;
100
            }
101

  
102
            return result;
103
        }
104
    }
105
}
ConvertService/ServiceBase/TestDocumentInfo/Properties/AssemblyInfo.cs
1
using System.Reflection;
2
using System.Runtime.CompilerServices;
3
using System.Runtime.InteropServices;
4

  
5
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 
6
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
7
// 이러한 특성 값을 변경하세요.
8
[assembly: AssemblyTitle("TestDocumentInfo")]
9
[assembly: AssemblyDescription("")]
10
[assembly: AssemblyConfiguration("")]
11
[assembly: AssemblyCompany("")]
12
[assembly: AssemblyProduct("TestDocumentInfo")]
13
[assembly: AssemblyCopyright("Copyright ©  2020")]
14
[assembly: AssemblyTrademark("")]
15
[assembly: AssemblyCulture("")]
16

  
17
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 
18
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
19
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요.
20
[assembly: ComVisible(false)]
21

  
22
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
23
[assembly: Guid("8e4a5dbd-1a40-4d43-a03b-e780ed098e9d")]
24

  
25
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
26
//
27
//      주 버전
28
//      부 버전 
29
//      빌드 번호
30
//      수정 버전
31
//
32
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
33
// 기본값으로 할 수 있습니다.
34
// [assembly: AssemblyVersion("1.0.*")]
35
[assembly: AssemblyVersion("1.0.0.0")]
36
[assembly: AssemblyFileVersion("1.0.0.0")]
ConvertService/ServiceBase/TestDocumentInfo/TestDocumentInfo.csproj
1
<?xml version="1.0" encoding="utf-8"?>
2
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4
  <PropertyGroup>
5
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7
    <ProjectGuid>{8E4A5DBD-1A40-4D43-A03B-E780ED098E9D}</ProjectGuid>
8
    <OutputType>Library</OutputType>
9
    <AppDesignerFolder>Properties</AppDesignerFolder>
10
    <RootNamespace>TestDocumentInfo</RootNamespace>
11
    <AssemblyName>TestDocumentInfo</AssemblyName>
12
    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13
    <FileAlignment>512</FileAlignment>
14
    <Deterministic>true</Deterministic>
15
  </PropertyGroup>
16
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17
    <DebugSymbols>true</DebugSymbols>
18
    <DebugType>full</DebugType>
19
    <Optimize>false</Optimize>
20
    <OutputPath>bin\Debug\</OutputPath>
21
    <DefineConstants>DEBUG;TRACE</DefineConstants>
22
    <ErrorReport>prompt</ErrorReport>
23
    <WarningLevel>4</WarningLevel>
24
  </PropertyGroup>
25
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26
    <DebugType>pdbonly</DebugType>
27
    <Optimize>true</Optimize>
28
    <OutputPath>bin\Release\</OutputPath>
29
    <DefineConstants>TRACE</DefineConstants>
30
    <ErrorReport>prompt</ErrorReport>
31
    <WarningLevel>4</WarningLevel>
32
  </PropertyGroup>
33
  <ItemGroup>
34
    <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
35
      <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
36
    </Reference>
37
    <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
38
      <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath>
39
    </Reference>
40
    <Reference Include="Markus.EntityModel, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
41
      <HintPath>..\packages\MarkusDatabase.1.8.0\lib\net45\Markus.EntityModel.dll</HintPath>
42
    </Reference>
43
    <Reference Include="System" />
44
    <Reference Include="System.ComponentModel.DataAnnotations" />
45
    <Reference Include="System.Core" />
46
    <Reference Include="System.Xml.Linq" />
47
    <Reference Include="System.Data.DataSetExtensions" />
48
    <Reference Include="Microsoft.CSharp" />
49
    <Reference Include="System.Data" />
50
    <Reference Include="System.Net.Http" />
51
    <Reference Include="System.Xml" />
52
  </ItemGroup>
53
  <ItemGroup>
54
    <Compile Include="DocumentInfoProcess.cs" />
55
    <Compile Include="Properties\AssemblyInfo.cs" />
56
  </ItemGroup>
57
  <ItemGroup>
58
    <None Include="App.config" />
59
    <None Include="packages.config" />
60
  </ItemGroup>
61
  <ItemGroup>
62
    <ProjectReference Include="..\Markus.Service.Convert.IPlugin\Markus.Service.Convert.IPlugin.csproj">
63
      <Project>{a5ba7325-379c-4ccb-b156-1704fc2175e3}</Project>
64
      <Name>Markus.Service.Convert.IPlugin</Name>
65
    </ProjectReference>
66
    <ProjectReference Include="..\Markus.Service.Extensions\Markus.Service.Extensions.csproj">
67
      <Project>{5f983789-3e8f-4f9a-a601-138c3a83ca5f}</Project>
68
      <Name>Markus.Service.Extensions</Name>
69
    </ProjectReference>
70
  </ItemGroup>
71
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
72
</Project>
ConvertService/ServiceBase/TestDocumentInfo/packages.config
1
<?xml version="1.0" encoding="utf-8"?>
2
<packages>
3
  <package id="EntityFramework" version="6.2.0" targetFramework="net45" />
4
  <package id="MarkusDatabase" version="1.8.0" targetFramework="net45" developmentDependency="true" />
5
</packages>

내보내기 Unified diff

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