|
@@ -6,25 +6,36 @@ using Comal.Classes;
|
|
|
using InABox.Clients;
|
|
|
using InABox.Core;
|
|
|
using InABox.DynamicGrid;
|
|
|
-using InABox.Reports;
|
|
|
using InABox.Core.Reports;
|
|
|
using InABox.Wpf.Reports;
|
|
|
using InABox.WPF;
|
|
|
using System.Windows.Media.Imaging;
|
|
|
-using com.sun.org.apache.xpath.@internal;
|
|
|
+using InABox.Configuration;
|
|
|
|
|
|
namespace PRSDesktop
|
|
|
{
|
|
|
- public class InvoiceListGrid : DynamicDataGrid<Invoice>
|
|
|
+
|
|
|
+ public class InvoiceGridSettings : IUserConfigurationSettings
|
|
|
+ {
|
|
|
+ public CoreFilterDefinition CurrentFilter { get; set; }
|
|
|
+ }
|
|
|
+
|
|
|
+ public class InvoiceGrid : DynamicDataGrid<Invoice>
|
|
|
{
|
|
|
private static readonly BitmapImage? post = PRSDesktop.Resources.post.AsBitmapImage();
|
|
|
private static readonly BitmapImage? tick = PRSDesktop.Resources.tick.AsBitmapImage();
|
|
|
private static readonly BitmapImage? warning = PRSDesktop.Resources.warning.AsBitmapImage();
|
|
|
private static readonly BitmapImage? refresh = PRSDesktop.Resources.refresh.AsBitmapImage();
|
|
|
|
|
|
+ private InvoiceGridSettings _settings;
|
|
|
+
|
|
|
protected override void Init()
|
|
|
{
|
|
|
base.Init();
|
|
|
+
|
|
|
+ _settings = new UserConfiguration<InvoiceGridSettings>().Load();
|
|
|
+ SelectFilter(_settings.CurrentFilter, false);
|
|
|
+
|
|
|
AddButton("Print", PRSDesktop.Resources.printer.AsBitmapImage(), PrintInvoice2);
|
|
|
AddButton("Email", PRSDesktop.Resources.email.AsBitmapImage(), EmailInvoice2);
|
|
|
HiddenColumns.Add(x => x.CustomerLink.ID);
|
|
@@ -36,6 +47,7 @@ namespace PRSDesktop
|
|
|
ToolTip = Posted_ToolTip
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
protected override void DoReconfigure(FluentList<DynamicGridOption> options)
|
|
|
{
|
|
|
base.DoReconfigure(options);
|
|
@@ -242,5 +254,12 @@ namespace PRSDesktop
|
|
|
// msg.Body = "Please find your invoice attached";
|
|
|
// mailer.SendMessage(msg);
|
|
|
}
|
|
|
+
|
|
|
+ protected override void FilterSelected(CoreFilterDefinition filter)
|
|
|
+ {
|
|
|
+ base.FilterSelected(filter);
|
|
|
+ _settings.CurrentFilter = filter;
|
|
|
+ new UserConfiguration<InvoiceGridSettings>().Save(_settings);
|
|
|
+ }
|
|
|
}
|
|
|
}
|