개정판 85f68fef
GridViewToggleRowDetailsColumn 변경
Change-Id: I10b9c3cc95e812ad3a93e4ff84123aebe005209d
ConvertService/ServiceBase/Markus.Service.StationController/ViewModel/DataBaseItemsModel.cs | ||
---|---|---|
22 | 22 |
using System.Windows.Input; |
23 | 23 |
using Markus.Mvvm.ToolKit; |
24 | 24 |
using System.Windows.Data; |
25 |
using System.Windows.Controls; |
|
25 | 26 |
|
26 | 27 |
namespace Markus.Service.StationController.ViewModel |
27 | 28 |
{ |
... | ... | |
42 | 43 |
ValidateCommand = new DelegateCommand(DataValidate); |
43 | 44 |
MarkusLinkCommand = new DelegateCommand(MarkusLink); |
44 | 45 |
RemoveCreateTimeFilterCommand = new DelegateCommand(RemoveCreateTimeFilter); |
45 |
FilterConvertSourceView.Filter = new Predicate<object>(o => DetailFilter(o as ConvertItem)); |
|
46 | 46 |
ResetCommand = new DelegateCommand(Reset); |
47 | 47 |
ConverAddCommand = new DelegateCommand(ConverAdd); |
48 | 48 |
} |
... | ... | |
84 | 84 |
get |
85 | 85 |
{ |
86 | 86 |
var view = CollectionViewSource.GetDefaultView(FilterConvertSource); |
87 |
//if (view.CanFilter) |
|
88 |
//{ |
|
89 |
// view.Filter = DetailFilter; |
|
90 |
// view.Filter = o => String.IsNullOrEmpty(ProjectNumberFilter) ? true : ((string)o).Contains(ProjectNumberFilter); |
|
91 |
// view.Filter = o => String.IsNullOrEmpty(UniqueKeyFilter) ? true : ((string)o).Contains(UniqueKeyFilter); |
|
92 |
//} |
|
93 | 87 |
return view; |
94 | 88 |
} |
95 | 89 |
} |
... | ... | |
97 | 91 |
private System.Collections.ObjectModel.ObservableCollection<ConvertItem> _FilterConvertSource; |
98 | 92 |
public System.Collections.ObjectModel.ObservableCollection<ConvertItem> FilterConvertSource |
99 | 93 |
{ |
100 |
//get => _FilterConvertSource; |
|
101 | 94 |
get |
102 | 95 |
{ |
103 | 96 |
if (_FilterConvertSource == null) |
104 | 97 |
{ |
105 | 98 |
_FilterConvertSource = new System.Collections.ObjectModel.ObservableCollection<ConvertItem>(); |
106 | 99 |
} |
107 |
//if (_FilterConvertSource != null) |
|
108 |
//{ |
|
109 |
// var view = CollectionViewSource.GetDefaultView(FilterConvertSource); |
|
110 |
// if (view.CanFilter) |
|
111 |
// { |
|
112 |
// view.Filter = DetailFilter; |
|
113 |
// } |
|
114 |
//} |
|
115 | 100 |
return _FilterConvertSource; |
116 | 101 |
} |
117 | 102 |
set |
... | ... | |
272 | 257 |
get { return _ProjectNumberFilter; } |
273 | 258 |
set |
274 | 259 |
{ |
275 |
if(_ProjectNumberFilter == "") |
|
260 |
if (_ProjectNumberFilter == "")
|
|
276 | 261 |
{ |
277 | 262 |
_ProjectNumberFilter = null; |
278 | 263 |
} |
... | ... | |
280 | 265 |
{ |
281 | 266 |
_ProjectNumberFilter = value; |
282 | 267 |
OnPropertyChanged(() => ProjectNumberFilter); |
283 |
//CollectionViewSource.GetDefaultView(FilterConvertSource).Refresh(); |
|
284 |
//FilterConvertSourceView.Refresh(); |
|
285 | 268 |
} |
286 | 269 |
} |
287 | 270 |
} |
... | ... | |
303 | 286 |
{ |
304 | 287 |
_UniqueKeyFilter = value; |
305 | 288 |
OnPropertyChanged(() => UniqueKeyFilter); |
306 |
//CollectionViewSource.GetDefaultView(FilterConvertSource).Refresh(); |
|
307 |
//FilterConvertSourceView.Refresh(); |
|
308 | 289 |
} |
309 | 290 |
} |
310 | 291 |
} |
... | ... | |
319 | 300 |
{ |
320 | 301 |
_ConvertStateFilter = value; |
321 | 302 |
OnPropertyChanged(() => ConvertStateFilter); |
322 |
//CollectionViewSource.GetDefaultView(FilterConvertSource).Refresh(); |
|
323 |
//FilterConvertSourceView.Refresh(); |
|
324 | 303 |
} |
325 | 304 |
} |
326 | 305 |
} |
... | ... | |
339 | 318 |
{ |
340 | 319 |
_Docuemnt_NOFilter = value; |
341 | 320 |
OnPropertyChanged(() => Docuemnt_NOFilter); |
342 |
//CollectionViewSource.GetDefaultView(FilterConvertSource).Refresh(); |
|
343 |
//FilterConvertSourceView.Refresh(); |
|
344 | 321 |
} |
345 | 322 |
} |
346 | 323 |
} |
... | ... | |
359 | 336 |
{ |
360 | 337 |
_Docuemnt_NameFilter = value; |
361 | 338 |
OnPropertyChanged(() => Docuemnt_NameFilter); |
362 |
//CollectionViewSource.GetDefaultView(FilterConvertSource).Refresh(); |
|
363 |
//FilterConvertSourceView.Refresh(); |
|
364 | 339 |
} |
365 | 340 |
} |
366 | 341 |
} |
... | ... | |
371 | 346 |
get { return _ReconverterFilter; } |
372 | 347 |
set |
373 | 348 |
{ |
374 |
if (_ReconverterFilter == null)
|
|
349 |
if (_ReconverterFilter == null) |
|
375 | 350 |
{ |
376 | 351 |
_ReconverterFilter = 0; |
377 | 352 |
} |
... | ... | |
379 | 354 |
{ |
380 | 355 |
_ReconverterFilter = value; |
381 | 356 |
OnPropertyChanged(() => ReconverterFilter); |
382 |
//CollectionViewSource.GetDefaultView(FilterConvertSource).Refresh(); |
|
383 |
//FilterConvertSourceView.Refresh(); |
|
384 | 357 |
|
385 | 358 |
} |
386 | 359 |
} |
... | ... | |
396 | 369 |
{ |
397 | 370 |
_Service_IDFilter = null; |
398 | 371 |
} |
399 |
else if (_Service_IDFilter != value)
|
|
372 |
else if (_Service_IDFilter != value) |
|
400 | 373 |
{ |
401 | 374 |
_Service_IDFilter = value; |
402 | 375 |
OnPropertyChanged(() => Service_IDFilter); |
403 |
//CollectionViewSource.GetDefaultView(FilterConvertSource).Refresh(); |
|
404 |
//FilterConvertSourceView.Refresh(); |
|
405 | 376 |
} |
406 | 377 |
} |
407 | 378 |
} |
... | ... | |
414 | 385 |
{ |
415 | 386 |
if (_RevisionFilter == "") |
416 | 387 |
{ |
417 |
_RevisionFilter = null ;
|
|
388 |
_RevisionFilter = null; |
|
418 | 389 |
} |
419 | 390 |
else if (_RevisionFilter != value) |
420 | 391 |
{ |
421 | 392 |
_RevisionFilter = value; |
422 | 393 |
OnPropertyChanged(() => RevisionFilter); |
423 |
//CollectionViewSource.GetDefaultView(FilterConvertSource).Refresh(); |
|
424 |
//FilterConvertSourceView.Refresh(); |
|
425 | 394 |
} |
426 | 395 |
} |
427 | 396 |
} |
... | ... | |
440 | 409 |
{ |
441 | 410 |
_GroupNOFilter = value; |
442 | 411 |
OnPropertyChanged(() => GroupNOFilter); |
443 |
//CollectionViewSource.GetDefaultView(FilterConvertSource).Refresh(); |
|
444 |
//FilterConvertSourceView.Refresh(); |
|
445 | 412 |
} |
446 | 413 |
} |
447 | 414 |
} |
... | ... | |
458 | 425 |
return; |
459 | 426 |
_SelectedCreateTimeBegin = value; |
460 | 427 |
OnPropertyChanged(() => SelectedCreateTimeBegin); |
461 |
//CollectionViewSource.GetDefaultView(FilterConvertSource).Refresh(); |
|
462 |
//FilterConvertSourceView.Refresh(); |
|
463 |
//AddGeneratorBeginFilter(); |
|
464 | 428 |
|
465 | 429 |
} |
466 | 430 |
} |
... | ... | |
476 | 440 |
return; |
477 | 441 |
_SelectedCreateTimeEnd = value; |
478 | 442 |
OnPropertyChanged(() => SelectedCreateTimeEnd); |
479 |
//CollectionViewSource.GetDefaultView(FilterConvertSource).Refresh(); |
|
480 |
//FilterConvertSourceView.Refresh(); |
|
481 |
//AddGeneratorBeginFilter(); |
|
482 |
|
|
483 | 443 |
} |
484 | 444 |
} |
485 | 445 |
|
486 | 446 |
public int _DataBase_ItemsHeight = 800; |
487 |
public int DataBase_ItemsHeight
|
|
447 |
public int DataBase_ItemsHeight |
|
488 | 448 |
{ |
489 | 449 |
get { return _DataBase_ItemsHeight; } |
490 | 450 |
set |
491 | 451 |
{ |
492 | 452 |
_DataBase_ItemsHeight = value; |
493 | 453 |
OnPropertyChanged(() => DataBase_ItemsHeight); |
494 |
|
|
495 | 454 |
} |
496 | 455 |
} |
497 | 456 |
|
... | ... | |
650 | 609 |
ConvertItemEx.ChangeValues(changeitem, newitem), x => x.ConvertID == newitem.ConvertID && x.ProjectNumber == newitem.ProjectNumber); |
651 | 610 |
}); |
652 | 611 |
|
653 |
RealConvert_Height = 80 + ( 10 * collection.Count());
|
|
612 |
RealConvert_Height = 80 + (10 * collection.Count()); |
|
654 | 613 |
DataBase_ItemsHeight = 800 - (RealConvert_Height + Alive_Height); |
655 | 614 |
} |
656 | 615 |
} |
... | ... | |
768 | 727 |
|
769 | 728 |
//DocumentID = unikey |
770 | 729 |
|
771 |
//null 왼쪽에서 부터 p_BEGIN_START_DATETIE, p_Finish_START_DATETIE, BEGIN_END_DATETIME, Finish_END_DATETIME (전에 없애라고 하셔서..) |
|
772 |
//오류떠서 [Model].Context.tt File에서 288줄 Function.Name to edmFunction.FullName바꿨더니 오류 안남 |
|
773 | 730 |
var items = entities.SELECT_CONVERT_ITEM(ProjectNumberFilter, UniqueKeyFilter, _status, SelectedCount.ValueMember, SelectedCreateTimeBegin, SelectedCreateTimeEnd, null, null, null, null, GroupNOFilter, |
774 |
Docuemnt_NameFilter, Docuemnt_NOFilter, RevisionFilter).ToList();//이대로 그냥 쓰면 쿼리 -> 쿼리 결과는 두 번 이상 열거할 수 없습니다 뜸
|
|
731 |
Docuemnt_NameFilter, Docuemnt_NOFilter, RevisionFilter).ToList(); |
|
775 | 732 |
|
776 | 733 |
//SEARCH 할때 최소한 프로젝트 넘버랑 유니크키(다큐먼트 넘버) 크레이트타임 시작 줘야함 |
777 | 734 |
|
... | ... | |
913 | 870 |
itemsToEach.ConvertPath = item.ConvertPath; |
914 | 871 |
itemsToEach.MarkusLink = convertpath[1]; |
915 | 872 |
itemsToEach.UniqueKey = item.UniqueKey; |
916 |
|
|
917 |
//itemsToEach.ConvertPath = item.ConvertPath; |
|
873 |
itemsToEach.GroupNo = item.GroupNo; |
|
874 |
itemsToEach.ProcessorAffinity = item.ProcessorAffinity; |
|
875 |
itemsToEach.DocumnetName = item.DocumnetName; |
|
876 |
itemsToEach.Revision = item.Revision; |
|
877 |
itemsToEach.Exception = item.Exception; |
|
918 | 878 |
itemsToEach.ConvertPath = convertpath[0]; |
919 | 879 |
itemsToEach.CreateTime = item.CreateTime; |
920 |
itemsToEach.Exception = item.Exception; |
|
921 |
itemsToEach.ProcessorAffinity = item.ProcessorAffinity; |
|
922 | 880 |
itemsToEach.ReConverter = item.ReConverter; |
923 | 881 |
itemsToEach.DocumentID = item.DocumentID; |
924 |
itemsToEach.DocumnetName = item.DocumnetName; |
|
925 |
itemsToEach.GroupNo = item.GroupNo; |
|
926 |
itemsToEach.Revision = item.Revision; |
|
927 | 882 |
itemsToEach.StartTime = item.StartTime; |
928 | 883 |
itemsToEach.EndTime = item.EndTime; |
929 | 884 |
|
... | ... | |
1015 | 970 |
} |
1016 | 971 |
} |
1017 | 972 |
|
1018 |
Alive_Height = 80 + (newitems.Count() * 10 );
|
|
1019 |
DataBase_ItemsHeight = 800 - ( RealConvert_Height + Alive_Height);
|
|
973 |
Alive_Height = 80 + (newitems.Count() * 10); |
|
974 |
DataBase_ItemsHeight = 800 - (RealConvert_Height + Alive_Height); |
|
1020 | 975 |
} |
1021 | 976 |
|
1022 | 977 |
|
... | ... | |
1252 | 1207 |
|
1253 | 1208 |
#region Data Search |
1254 | 1209 |
|
1255 |
|
|
1256 |
/// <summary> |
|
1257 |
/// Grid Filter |
|
1258 |
/// </summary> |
|
1259 |
|
|
1260 |
private bool DetailFilter(object item) |
|
1261 |
{ |
|
1262 |
var Item = item as ConvertItem; |
|
1263 |
if (ProjectNumberFilter == null) return true; |
|
1264 |
if (ProjectNumberFilter == Item.ProjectNumber) return true; |
|
1265 |
//if (ConvertStateFilter == null) return true; |
|
1266 |
//if (ConvertStateFilter == (StatusCodeType)Item.ConvertState) return true; |
|
1267 |
if (Docuemnt_NameFilter == null) return true; |
|
1268 |
if (Docuemnt_NameFilter == Item.DocumnetName) return true; |
|
1269 |
if (Service_IDFilter == null) return true; |
|
1270 |
if (Service_IDFilter == Item.ServiceID) return true; |
|
1271 |
if (UniqueKeyFilter == null) return true; |
|
1272 |
if (UniqueKeyFilter == Item.UniqueKey) return true; |
|
1273 |
if (Docuemnt_NOFilter == null) return true; |
|
1274 |
if (Docuemnt_NOFilter == Item.DocumnetNo) return true; |
|
1275 |
if (ReconverterFilter == null) return true; |
|
1276 |
if (ReconverterFilter == Item.ReConverter) return true; |
|
1277 |
if (RevisionFilter == null) return true; |
|
1278 |
if (RevisionFilter == Item.Revision) return true; |
|
1279 |
|
|
1280 |
return false; |
|
1281 |
} |
|
1282 |
|
|
1283 | 1210 |
public void RemoveCreateTimeFilter(object obj) |
1284 | 1211 |
{ |
1285 | 1212 |
DefaultCreateTime = DateTime.Now; |
... | ... | |
1325 | 1252 |
|
1326 | 1253 |
#endregion |
1327 | 1254 |
|
1328 |
|
|
1329 | 1255 |
#endregion |
1330 | 1256 |
} |
1331 | 1257 |
} |
내보내기 Unified diff