|
@@ -18,7 +18,7 @@ namespace PRSDesktop
|
|
|
|
|
|
private bool _stylecolumnVisible;
|
|
|
|
|
|
- private bool _includeReserves;
|
|
|
+ public bool IncludeReserves { get; set; }
|
|
|
|
|
|
public JobSummaryGrid() : base()
|
|
|
{
|
|
@@ -54,17 +54,11 @@ namespace PRSDesktop
|
|
|
ActionColumns.Add(new DynamicImageManagerColumn<JobMaterial>(this, x => x.Product.Image, false)
|
|
|
{ Position = DynamicActionColumnPosition.Start });
|
|
|
|
|
|
- AddButton("Include Reserves", null, ToggleIncludeReserves);
|
|
|
+
|
|
|
|
|
|
OnCellDoubleClick += JobSummaryGrid_OnCellDoubleClick;
|
|
|
}
|
|
|
-
|
|
|
- private bool ToggleIncludeReserves(Button sender, CoreRow[] arg2)
|
|
|
- {
|
|
|
- _includeReserves = !_includeReserves;
|
|
|
- UpdateButton(sender, null, _includeReserves ? "Free Stock Only" : "Include Reserves");
|
|
|
- return true;
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
protected override void GenerateColumns(DynamicGridColumns columns)
|
|
|
{
|
|
@@ -237,7 +231,7 @@ namespace PRSDesktop
|
|
|
null,
|
|
|
new Filter<StockHolding>(x=>x.Units).IsNotEqualTo(0.0F)
|
|
|
.And(
|
|
|
- _includeReserves
|
|
|
+ IncludeReserves
|
|
|
? new Filter<StockHolding>(x=>x.Job.ID).IsNotEqualTo(ParentID)
|
|
|
: new Filter<StockHolding>(x=>x.Job.JobStatus.Active).IsEqualTo(false)
|
|
|
),
|
|
@@ -256,7 +250,7 @@ namespace PRSDesktop
|
|
|
unitsize,
|
|
|
null,
|
|
|
|
|
|
- _includeReserves
|
|
|
+ IncludeReserves
|
|
|
? new Filter<PurchaseOrderItem>(x=>x.Job.ID).IsNotEqualTo(ParentID)
|
|
|
: new Filter<PurchaseOrderItem>(x=>x.Job.JobStatus.Active).IsEqualTo(false),
|
|
|
null
|
|
@@ -354,7 +348,7 @@ namespace PRSDesktop
|
|
|
new Filter<StockHolding>(x => x.Product.ID).InList(pids)
|
|
|
.And(x=>x.Units).IsNotEqualTo(0.0F)
|
|
|
.And(
|
|
|
- _includeReserves
|
|
|
+ IncludeReserves
|
|
|
? new Filter<StockHolding>(x => x.Job.ID).IsNotEqualTo(ParentID)
|
|
|
: new Filter<StockHolding>(x => x.Job.JobStatus.Active).IsEqualTo(false)
|
|
|
),
|
|
@@ -369,7 +363,7 @@ namespace PRSDesktop
|
|
|
new Filter<PurchaseOrderItem>(x => x.ReceivedDate).IsEqualTo(DateTime.MinValue)
|
|
|
.And(x => x.Product.ID).InList(pids)
|
|
|
.And(
|
|
|
- _includeReserves
|
|
|
+ IncludeReserves
|
|
|
? new Filter<PurchaseOrderItem>(x => x.Job.ID).IsNotEqualTo(ParentID)
|
|
|
: new Filter<PurchaseOrderItem>(x => x.Job.JobStatus.Active).IsEqualTo(false)
|
|
|
),
|