|
@@ -3,17 +3,29 @@ using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using Comal.Classes;
|
|
|
using InABox.Clients;
|
|
|
+using InABox.Configuration;
|
|
|
using InABox.Core;
|
|
|
using InABox.DynamicGrid;
|
|
|
|
|
|
namespace PRSDesktop
|
|
|
{
|
|
|
+
|
|
|
+ public class JobGridSettings : IUserConfigurationSettings
|
|
|
+ {
|
|
|
+ public CoreFilterDefinition? CurrentFilter { get; set; }
|
|
|
+ }
|
|
|
+
|
|
|
public class JobGrid : DynamicDataGrid<Job>
|
|
|
{
|
|
|
private Guid _statusid = Guid.Empty;
|
|
|
|
|
|
+ private JobGridSettings _settings;
|
|
|
+
|
|
|
public JobGrid()
|
|
|
{
|
|
|
+ _settings = new UserConfiguration<JobGridSettings>().Load();
|
|
|
+ SelectFilter(_settings.CurrentFilter, false);
|
|
|
+
|
|
|
HiddenColumns.Add(x => x.ID);
|
|
|
HiddenColumns.Add(x => x.JobNumber);
|
|
|
HiddenColumns.Add(x => x.Name);
|
|
@@ -99,5 +111,12 @@ namespace PRSDesktop
|
|
|
|
|
|
return result;
|
|
|
}
|
|
|
+
|
|
|
+ protected override void FilterSelected(CoreFilterDefinition filter)
|
|
|
+ {
|
|
|
+ base.FilterSelected(filter);
|
|
|
+ _settings.CurrentFilter = filter;
|
|
|
+ new UserConfiguration<JobGridSettings>().Save(_settings);
|
|
|
+ }
|
|
|
}
|
|
|
}
|