프로젝트

일반

사용자정보

개정판 902f397c

ID902f397cb47fb62e1c3e8d6a39ef33cda1d8aa60
상위 a9e86f7a
하위 5a954acc

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

DatabaseFilter 수정

Change-Id: I44d6697b18f74f21cd98d46243a56e1d3b50cc26

차이점 보기:

ConvertService/ServiceBase/Markus.Service.DataBase/ConvertDatabase.cs
84 84
                        join documents in entities.DOCUMENT_ITEM on items.DOCUMENT_ID equals documents.DOCUMENT_ID into GroupItems
85 85
                        from subpet in GroupItems.DefaultIfEmpty()
86 86
                        where items.STATUS == status
87
                        orderby items.CREATE_DATETIME descending
88
                        select new
89
                        {
90
                            ID = items.ID,
91
                            DOCUMENT_URL = items.DOCUMENT_URL,
92
                            RECONVERTER = items.RECONVERTER,
93
                            SERVICE_ID = items.SERVICE_ID,
94
                            STATUS = items.STATUS,
95
                            CREATE_DATETIME = items.CREATE_DATETIME,
96
                            START_DATETIME = items.START_DATETIME,
97
                            END_DATETIME = items.END_DATETIME,
98
                            TOTAL_PAGE = items.TOTAL_PAGE,
99
                            CURRENT_PAGE = items.CURRENT_PAGE,
100
                            EXCEPTION = items.EXCEPTION,
101
                            PROJECT_NO = items.PROJECT_NO,
102
                            DOCUMENT_ID = items.DOCUMENT_ID,
103
                            REVISION = subpet.REVISION,
104
                            DOCUMENT_NO = subpet.DOCUMENT_NO,
105
                            DOCUMENT_NAME = subpet.DOCUMENT_NAME,
106
                            GROUP_NO = subpet.GROUP_NO,  
107
                            //REVISION = documents.REVISION,
108
                            //DOCUMENT_NO = documents.DOCUMENT_NO,
109
                            //DOCUMENT_NAME = documents.DOCUMENT_NAME,
110
                            //GROUP_NO = documents.GROUP_NO
111
                        };
87
                        select items;
88

  
89

  
90
                        //orderby items.CREATE_DATETIME descending
91
                        //select new
92
                        //{
93
                        //    ID = items.ID,
94
                        //    DOCUMENT_URL = items.DOCUMENT_URL,
95
                        //    RECONVERTER = items.RECONVERTER,
96
                        //    SERVICE_ID = items.SERVICE_ID,
97
                        //    STATUS = items.STATUS,
98
                        //    CREATE_DATETIME = items.CREATE_DATETIME,
99
                        //    START_DATETIME = items.START_DATETIME,
100
                        //    END_DATETIME = items.END_DATETIME,
101
                        //    TOTAL_PAGE = items.TOTAL_PAGE,
102
                        //    CURRENT_PAGE = items.CURRENT_PAGE,
103
                        //    EXCEPTION = items.EXCEPTION,
104
                        //    PROJECT_NO = items.PROJECT_NO,
105
                        //    DOCUMENT_ID = items.DOCUMENT_ID,
106
                        //    REVISION = subpet.REVISION,
107
                        //    DOCUMENT_NO = subpet.DOCUMENT_NO,
108
                        //    DOCUMENT_NAME = subpet.DOCUMENT_NAME,
109
                        //    GROUP_NO = subpet.GROUP_NO,  
110
                        //    //REVISION = documents.REVISION,
111
                        //    //DOCUMENT_NO = documents.DOCUMENT_NO,
112
                        //    //DOCUMENT_NAME = documents.DOCUMENT_NAME,
113
                        //    //GROUP_NO = documents.GROUP_NO
114
                        //};
112 115

  
113 116
            if (query.Count() > 0)//세미
114 117
            {
ConvertService/ServiceBase/Markus.Service.StationController/Markus.Service.StationController.csproj
87 87
    <Reference Include="MaterialDesignThemes.Wpf, Version=2.6.0.325, Culture=neutral, processorArchitecture=MSIL">
88 88
      <HintPath>..\packages\MaterialDesignThemes.2.6.0\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
89 89
    </Reference>
90
    <Reference Include="Microsoft.EntityFrameworkCore">
91
      <HintPath>C:\Program Files\dotnet\sdk\NuGetFallbackFolder\microsoft.entityframeworkcore\2.2.0\lib\netstandard2.0\Microsoft.EntityFrameworkCore.dll</HintPath>
92
    </Reference>
93 90
    <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
94 91
      <HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
95 92
    </Reference>
......
133 130
      <SpecificVersion>False</SpecificVersion>
134 131
      <HintPath>..\Telerik\Telerik.Windows.Data.dll</HintPath>
135 132
    </Reference>
136
    <Reference Include="Telerik.Windows.Themes.VisualStudio2013, Version=2019.3.917.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
137
      <SpecificVersion>False</SpecificVersion>
138
      <HintPath>..\lib\Telerik.Windows.Themes.VisualStudio2013.dll</HintPath>
133
    <Reference Include="Telerik.Windows.Themes.VisualStudio2013">
134
      <HintPath>C:\Program Files (x86)\Progress\Telerik UI for WPF R1 2020\Binaries.NoXaml\WPF45\Telerik.Windows.Themes.VisualStudio2013.dll</HintPath>
139 135
    </Reference>
140 136
    <Reference Include="Telerik.Windows.Zip, Version=2019.3.903.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
141 137
      <SpecificVersion>False</SpecificVersion>
......
177 173
    <Compile Include="ViewModel\MergeDataViewModel.cs" />
178 174
    <Compile Include="ViewModel\MainViewModel.cs" />
179 175
    <Compile Include="ViewModel\TotalStatusViewModel.cs" />
176
    <Compile Include="Views\DatabaseFilter.xaml.cs">
177
      <DependentUpon>DatabaseFilter.xaml</DependentUpon>
178
    </Compile>
180 179
    <Compile Include="Views\DataBaseView.xaml.cs">
181 180
      <DependentUpon>DataBaseView.xaml</DependentUpon>
182 181
    </Compile>
......
230 229
      <SubType>Designer</SubType>
231 230
      <Generator>MSBuild:Compile</Generator>
232 231
    </Page>
232
    <Page Include="Views\DatabaseFilter.xaml">
233
      <Generator>MSBuild:Compile</Generator>
234
      <SubType>Designer</SubType>
235
    </Page>
233 236
    <Page Include="Views\DataBaseView.xaml">
234 237
      <Generator>MSBuild:Compile</Generator>
235 238
      <SubType>Designer</SubType>
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/DataBaseItemsModel.cs
20 20
using System.Diagnostics;
21 21
using System.Windows.Input;
22 22
using Markus.Mvvm.ToolKit;
23
using System.Windows.Data;
23 24

  
24 25
namespace Markus.Service.StationController.ViewModel
25 26
{
......
58 59
        private System.Collections.ObjectModel.ObservableCollection<ConvertItem> _FilterConvertSource;
59 60
        public System.Collections.ObjectModel.ObservableCollection<ConvertItem> FilterConvertSource
60 61
        {
61
            get => _FilterConvertSource;
62
            //get => _FilterConvertSource;
63
            get
64
            {
65
                //if (_FilterConvertSource == null)
66
                //{
67
                //    _FilterConvertSource = new System.Collections.ObjectModel.ObservableCollection<ConvertItem>();
68
                //}
69
                //var view = CollectionViewSource.GetDefaultView(FilterConvertSource);
70
                //if (view.CanFilter)
71
                //{
72
                //    view.Filter = TestFilter;
73
                //}
74
                return _FilterConvertSource;
75
            }
62 76
            set
63 77
            {
64 78
                _FilterConvertSource = value;
......
213 227
                OnPropertyChanged(() => ConvertShow);
214 228
            }
215 229
        }
230

  
231
        public string _ProjectNumberFilter;
232
        public string ProjectNumberFilter
233
        {
234
            get { return _ProjectNumberFilter; }
235
            set
236
            {
237
                if (_ProjectNumberFilter != value)
238
                {
239
                    _ProjectNumberFilter = value;
240
                    OnPropertyChanged(() => ProjectNumberFilter); 
241
                    CollectionViewSource.GetDefaultView(FilterConvertSource).Refresh();
242
                }
243
            }
244
        }
245

  
246
        public string _UniqueKeyFilter;
247
        public string UniqueKeyFilter
248
        {
249
            get { return _UniqueKeyFilter; }
250
            set
251
            {
252
                if (_UniqueKeyFilter != value)
253
                {
254
                    _UniqueKeyFilter = value;
255
                    OnPropertyChanged(() => UniqueKeyFilter);
256
                    CollectionViewSource.GetDefaultView(FilterConvertSource).Refresh();
257
                }
258
            }
259
        }
260

  
261
        public string _ConvertStateFilter;
262
        public string ConvertStateFilter
263
        {
264
            get { return _ConvertStateFilter; }
265
            set
266
            {
267
                if (_ConvertStateFilter != value)
268
                {
269
                    _ConvertStateFilter = value;
270
                    OnPropertyChanged(() => ConvertStateFilter);
271
                    CollectionViewSource.GetDefaultView(FilterConvertSource).Refresh();
272
                }
273
            }
274
        }
275

  
276
        public string _Docuemnt_NOFilter;
277
        public string Docuemnt_NOFilter
278
        {
279
            get { return _Docuemnt_NOFilter; }
280
            set
281
            {
282
                if (_Docuemnt_NOFilter != value)
283
                {
284
                    _Docuemnt_NOFilter = value;
285
                    OnPropertyChanged(() => Docuemnt_NOFilter);
286
                    CollectionViewSource.GetDefaultView(FilterConvertSource).Refresh();
287
                }
288
            }
289
        }
290

  
291
        public string _Docuemnt_NameFilter;
292
        public string Docuemnt_NameFilter
293
        {
294
            get { return _Docuemnt_NameFilter; }
295
            set
296
            {
297
                if (_Docuemnt_NameFilter != value)
298
                {
299
                    _Docuemnt_NameFilter = value;
300
                    OnPropertyChanged(() => Docuemnt_NameFilter);
301
                    CollectionViewSource.GetDefaultView(FilterConvertSource).Refresh();
302
                }
303
            }
304
        }
305

  
306
        public string _ReconverterFilter;
307
        public string ReconverterFilter
308
        {
309
            get { return _ReconverterFilter; }
310
            set
311
            {
312
                if (_ReconverterFilter != value)
313
                {
314
                    _ReconverterFilter = value;
315
                    OnPropertyChanged(() => ReconverterFilter);
316
                    CollectionViewSource.GetDefaultView(FilterConvertSource).Refresh();
317
                }
318
            }
319
        }
320

  
321
        public string _Service_IDFilter;
322
        public string Service_IDFilter
323
        {
324
            get { return _Service_IDFilter; }
325
            set
326
            {
327
                if (_Service_IDFilter != value)
328
                {
329
                    _Service_IDFilter = value;
330
                    OnPropertyChanged(() => Service_IDFilter);
331
                    CollectionViewSource.GetDefaultView(FilterConvertSource).Refresh();
332
                }
333
            }
334
        }
335

  
336
        public string _RevisionFilter;
337
        public string RevisionFilter
338
        {
339
            get { return _RevisionFilter; }
340
            set
341
            {
342
                if (_RevisionFilter != value)
343
                {
344
                    _RevisionFilter = value;
345
                    OnPropertyChanged(() => RevisionFilter);
346
                    CollectionViewSource.GetDefaultView(FilterConvertSource).Refresh();
347
                }
348
            }
349
        }
216 350
        #endregion
217 351

  
218 352
        #region Command
......
344 478
                        _status = (int)SelectedStatus.Value;
345 479
                    }
346 480

  
481
                    //if (ProjectNumberFilter != null)
482
                    //{
483
                    //    from item in FilterConvertSource
484
                    //    where like % item.ProjectNumber
485
                    //}
486

  
347 487
                    var items = database.GetConvertProjects(_status)//x:database객체 y:statusCodeTypeList의값  Count()안에 predicator 조건 만족하면 count개수안에 넣음
348 488
                                          .Take(SelectedCount.ValueMember).ToList();
349 489

  
......
777 917

  
778 918
        #endregion
779 919

  
920
        #region TestFilter
921

  
922

  
923
        /// <summary>
924
        /// Grid Filter
925
        /// </summary>
926

  
927
        private bool TestFilter(object item)
928
        {
929
            var Item = item as ConvertItem;
930
            if (ProjectNumberFilter == null) return true;
931
            if (ProjectNumberFilter == Item.ProjectNumber) return true;
932
            return false;
933
        }
934

  
935
        #endregion
936

  
780 937
        #endregion
781 938
    }
782 939
}
ConvertService/ServiceBase/Markus.Service.StationController/Views/DataBaseView.xaml
32 32
        <DataTemplate x:Key="RowDetailsTemplate">
33 33
            <local:DataBaseViewInfo />
34 34
        </DataTemplate>
35
        <DataTemplate x:Key="DatabaseFilter">
36
            <local:DatabaseFilter />
37
        </DataTemplate>
35 38
    </UserControl.Resources>
36 39
    <!--<UserControl.DataContext>
37 40
        <VM:DataBaseItemsModel/>
......
60 63
        </StackPanel>
61 64
        <Grid HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" >
62 65
            <Grid.RowDefinitions>
66
                <RowDefinition Height="*"/>
63 67
                <RowDefinition Height="*" />
64 68
                <RowDefinition Height="Auto"/>
65 69
                <RowDefinition Height="Auto"/>
66 70
            </Grid.RowDefinitions>
67
            <telerik:RadExpander ExpandDirection="Down"  BorderThickness="0" MaxHeight="700"
71
            <telerik:RadExpander ExpandDirection="Down"  BorderThickness="0" MaxHeight="700" Grid.Row="0"
72
                  ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" IsExpanded="True"
73
                             telerik:AnimationManager.IsAnimationEnabled="False">
74
                <telerik:RadGridView  GroupRenderMode="Flat" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
75
                             RowDetailsTemplate="{StaticResource RowDetailsTemplate}"
76
							 AutoGenerateColumns="False" CanUserFreezeColumns="True"
77
                             ColumnWidth="*"  RowDetailsVisibilityMode="VisibleWhenSelected"
78
                             Grid.Row="1"  ScrollViewer.CanContentScroll="True" IsFilteringAllowed="True"
79
                             LeftFrozenColumnCount="6" 
80
                             RightFrozenColumnCount="0">
81
                    <telerik:RadGridView.Columns>
82
                        <telerik:GridViewDataColumn Header="필터 검색원하시면 클릭하세요! "/>
83
                    </telerik:RadGridView.Columns>
84
                </telerik:RadGridView>
85
            </telerik:RadExpander>
86
            
87
            <telerik:RadExpander ExpandDirection="Down"  BorderThickness="0" MaxHeight="700" Grid.Row="1"
68 88
                  ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" IsExpanded="True"
69 89
                             telerik:AnimationManager.IsAnimationEnabled="False">
70 90
                <telerik:RadExpander.Header>
......
137 157
                    </telerik:RadGridView.Columns>
138 158
                </telerik:RadGridView>
139 159
            </telerik:RadExpander>
140
            <telerik:RadExpander Grid.Row="1" ExpandDirection="Down" BorderThickness="0" 
160
            <telerik:RadExpander Grid.Row="2" ExpandDirection="Down" BorderThickness="0" 
141 161
                  ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"
142 162
                             telerik:AnimationManager.IsAnimationEnabled="False" IsExpanded ="{Binding ConvertShow, Mode=TwoWay}">
143 163
                <telerik:RadExpander.Header>
......
211 231
                    </telerik:RadGridView.Columns>
212 232
                </telerik:RadGridView>
213 233
            </telerik:RadExpander>
214
            <telerik:RadExpander Grid.Row="2" ExpandDirection="Down" Margin="3" BorderThickness="0"  VerticalAlignment="Stretch"
234
            <telerik:RadExpander Grid.Row="3" ExpandDirection="Down" Margin="3" BorderThickness="0"  VerticalAlignment="Stretch"
215 235
                  ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto"
216 236
                             telerik:AnimationManager.IsAnimationEnabled="False">
217 237
                <telerik:RadExpander.Header>
218 238
                    <Grid>
239
                        <Grid.RowDefinitions>
240
                            <RowDefinition Height="11*"/>
241
                            <RowDefinition Height="5*"/>
242
                        </Grid.RowDefinitions>
219 243
                        <Grid.ColumnDefinitions>
220 244
                            <ColumnDefinition Width="Auto"/>
221 245
                            <ColumnDefinition Width="Auto"/>
222 246
                        </Grid.ColumnDefinitions>
223
                        <TextBlock Text="Alive Items : "/>
224
                        <TextBlock Text="{Binding AliveItems.Count, StringFormat=\{0:d\}}" Grid.Column="1"/>
247
                        <TextBlock Text="Alive Items : " Grid.RowSpan="2"/>
248
                        <TextBlock Text="{Binding AliveItems.Count, StringFormat=\{0:d\}}" Grid.Column="1" Grid.RowSpan="2"/>
225 249
                    </Grid>
226 250
                </telerik:RadExpander.Header>
227 251
                <telerik:RadGridView GroupRenderMode="Flat" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
ConvertService/ServiceBase/Markus.Service.StationController/Views/DatabaseFilter.xaml
38 38
        
39 39
        <TextBlock Text="ConvertState : " Grid.Row="1" Grid.Column="0"/>
40 40
        <telerik:RadMaskedTextInput IsClearButtonVisible="True"
41
         EmptyContent="placeholder text"
41
         EmptyContent="placeholder text" Text="{Binding ConvertStateFilter, UpdateSourceTrigger=PropertyChanged}"
42 42
         TextMode="PlainText"  Grid.Row="1" Grid.Column="1"
43 43
         HorizontalAlignment="Center"
44 44
         VerticalAlignment="Center"/>
45 45
        
46 46
        <TextBlock Text="Docuemnt NO : " Grid.Row="1" Grid.Column="2"/>
47 47
        <telerik:RadMaskedTextInput IsClearButtonVisible="True"
48
         EmptyContent="placeholder text"
48
         EmptyContent="placeholder text" Text="{Binding Docuemnt_NOFilter, UpdateSourceTrigger=PropertyChanged}"
49 49
         TextMode="PlainText" Grid.Row="1" Grid.Column="3"
50 50
         HorizontalAlignment="Center"
51 51
         VerticalAlignment="Center"/>
52 52
        
53 53
        <TextBlock Text="Docuemnt Name : " Grid.Row="2" Grid.Column="0"/>
54 54
        <telerik:RadMaskedTextInput IsClearButtonVisible="True"
55
         EmptyContent="placeholder text"
55
         EmptyContent="placeholder text" Text="{Binding Docuemnt_NameFilter, UpdateSourceTrigger=PropertyChanged}"
56 56
         TextMode="PlainText" Grid.Row="2" Grid.Column="1"
57 57
         HorizontalAlignment="Center"
58 58
         VerticalAlignment="Center"/>
59 59
        
60 60
        <TextBlock Text="Reconverter : " Grid.Row="2" Grid.Column="2"/>
61 61
        <telerik:RadMaskedTextInput IsClearButtonVisible="True"
62
         EmptyContent="placeholder text "
62
         EmptyContent="placeholder text "  Text="{Binding ReconverterFilter, UpdateSourceTrigger=PropertyChanged}"
63 63
         TextMode="PlainText" Grid.Row="2" Grid.Column="3"
64 64
         HorizontalAlignment="Center"
65 65
         VerticalAlignment="Center"/>
66 66
        
67 67
        <TextBlock Text="Service ID : " Grid.Row="3" Grid.Column="0"/>
68 68
        <telerik:RadMaskedTextInput IsClearButtonVisible="True"
69
         EmptyContent="placeholder text"
69
         EmptyContent="placeholder text" Text="{Binding Service_IDFilter, UpdateSourceTrigger=PropertyChanged}"
70 70
         TextMode="PlainText" Grid.Row="3" Grid.Column="1"
71 71
         HorizontalAlignment="Center"
72 72
         VerticalAlignment="Center"/>
73 73
        
74 74
        <TextBlock Text="Revision : " Grid.Row="3" Grid.Column="2"/>
75 75
        <telerik:RadMaskedTextInput IsClearButtonVisible="True"
76
         EmptyContent="placeholder text"
76
         EmptyContent="placeholder text" Text="{Binding RevisionFilter, UpdateSourceTrigger=PropertyChanged}"
77 77
         TextMode="PlainText" Grid.Row="3" Grid.Column="3"
78 78
         HorizontalAlignment="Center"
79 79
         VerticalAlignment="Center"/>
......
99 99
                <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"/>
100 100

  
101 101

  
102
                <telerik:RadMaskedTextInput IsClearButtonVisible="True"
102
                <!--<telerik:RadMaskedTextInput IsClearButtonVisible="True"
103 103
         EmptyContent="placeholder text"
104 104
         TextMode="PlainText" 
105 105
         HorizontalAlignment="Center"
106
         VerticalAlignment="Center"/>
106
         VerticalAlignment="Center"/>-->
107 107
            </StackPanel>
108 108
        </StackPanel>
109 109
    </Grid>

내보내기 Unified diff

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