浏览代码

Product Groups Tree is noiw fully expanded by default
Fixed Product Screen Holdings and Movements Filters

frogsoftware 1 年之前
父节点
当前提交
6f59628865

+ 1 - 1
prs.desktop/Panels/Products/Master List/ProductGroupTree.cs

@@ -21,7 +21,7 @@ public class ProductGroupTree: DynamicTreeView<ProductGroup>
     {
         Options.AddRange(DynamicTreeOption.Add, DynamicTreeOption.Edit, DynamicTreeOption.Delete);
         MaxRowHeight = 30D;
-        ExpandMode = DynamicTreeGridExpandMode.Root;
+        ExpandMode = DynamicTreeGridExpandMode.All;
         //OnContextMenuOpening += ProductTree_OnContextMenuOpening;
     }
 

+ 12 - 12
prs.desktop/Panels/Products/Master List/ProductHoldingControl.cs

@@ -36,16 +36,16 @@ public class ProductHoldingControl : DynamicDataGrid<StockHolding>, IProductCont
         base.Reload(criteria, columns, ref sort, action);
     }
 
-    protected override bool FilterRecord(CoreRow row)
-    {
-        var result = base.FilterRecord(row);
-        if (result)
-        {
-            var qty = row.Get<StockHolding, double>(x => x.Qty);
-            var iszero = CoreUtils.IsEffectivelyEqual(qty, 0.0F);
-            result = !iszero;
-        }
-
-        return result;
-    }
+    // protected override bool FilterRecord(CoreRow row)
+    // {
+    //     var result = base.FilterRecord(row);
+    //     if (result)
+    //     {
+    //         var qty = row.Get<StockHolding, double>(x => x.Qty);
+    //         var iszero = CoreUtils.IsEffectivelyEqual(qty, 0.0F);
+    //         result = !iszero;
+    //     }
+    //
+    //     return result;
+    // }
 }

+ 1 - 1
prs.desktop/Panels/Products/Master List/ProductInstanceControl.cs

@@ -110,7 +110,7 @@ public class ProductInstanceControl : DynamicDataGrid<ProductInstance>, IProduct
         ref SortOrder<ProductInstance>? sort,
         Action<CoreTable?, Exception?> action)
     {
-        if (Product.ID == Guid.Empty)
+        if ((Product?.ID ?? Guid.Empty) == Guid.Empty)
         {
             criteria.Add(new Filter<ProductInstance>().None());
         }

+ 1 - 9
prs.desktop/Panels/Products/Master List/ProductMovementSummary.cs

@@ -31,15 +31,7 @@ public class ProductMovementSummaryControl : DynamicDataGrid<StockMovement>, IPr
         {
             criteria.Add(new Filter<StockMovement>(x => x.Product.ID).IsEqualTo(Product.ID));
         }
-        criteria.Add(new Filter<StockMovement>(x => x.System).IsEqualTo(false));
+        //criteria.Add(new Filter<StockMovement>(x => x.System).IsEqualTo(false));
         base.Reload(criteria, columns, ref sort, action);
     }
-
-    //protected override bool FilterRecord(CoreRow row)
-    //{
-    //    bool result = base.FilterRecord(row);
-    //    if (result)
-    //        result = !row.Get<StockMovement, bool>(x => x.Hidden);
-    //    return result;
-    //}
 }