|
@@ -19,7 +19,7 @@ namespace PRSDesktop
|
|
|
public ProductSuppliersControl()
|
|
|
{
|
|
|
ColumnsTag = "ProductSupplier";
|
|
|
-
|
|
|
+
|
|
|
HiddenColumns.Add(x => x.URL);
|
|
|
ActionColumns.Add(new DynamicImageColumn(URLImage, URLAction) { Position = DynamicActionColumnPosition.Start });
|
|
|
|
|
@@ -135,6 +135,18 @@ namespace PRSDesktop
|
|
|
return base.GetEditor(item, column);
|
|
|
}
|
|
|
|
|
|
+ protected override void DoReconfigureEditors(DynamicEditorGrid grid, SupplierProduct[] items)
|
|
|
+ {
|
|
|
+ base.DoReconfigureEditors(grid, items);
|
|
|
+ var fcp = grid.FindEditor(nameof(SupplierProduct.ForeignCurrencyPrice));
|
|
|
+ var tp = grid.FindEditor(nameof(SupplierProduct.TradePrice));
|
|
|
+ if (fcp != null & tp != null)
|
|
|
+ {
|
|
|
+ fcp.SetEnabled(items.All(x=>x.SupplierLink.Currency.ID != Guid.Empty));
|
|
|
+ tp.SetEnabled(items.All(x=>x.SupplierLink.Currency.ID == Guid.Empty));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
protected override void DoAdd(bool OpenEditorOnDirectEdit = false)
|
|
|
{
|
|
|
if (Product.ID == Guid.Empty)
|