|
@@ -232,11 +232,8 @@ namespace PRS.Shared
|
|
CheckChanged();
|
|
CheckChanged();
|
|
}
|
|
}
|
|
|
|
|
|
- public override object? GetValue(string property)
|
|
|
|
|
|
+ protected override object? GetChildValue(string property)
|
|
{
|
|
{
|
|
- if (!property.StartsWith($"{ColumnName}.")) return null;
|
|
|
|
- property = property[(ColumnName.Length + 1)..];
|
|
|
|
-
|
|
|
|
if (property == "Quantity") return QuantityBox.Value ?? 0.0;
|
|
if (property == "Quantity") return QuantityBox.Value ?? 0.0;
|
|
if (property == "Length") return LengthBox.Value ?? 0.0;
|
|
if (property == "Length") return LengthBox.Value ?? 0.0;
|
|
if (property == "Width") return WidthBox.Value ?? 0.0;
|
|
if (property == "Width") return WidthBox.Value ?? 0.0;
|
|
@@ -246,25 +243,19 @@ namespace PRS.Shared
|
|
|
|
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
- public override Dictionary<string, object?> GetValues()
|
|
|
|
|
|
+
|
|
|
|
+ protected override IEnumerable<KeyValuePair<string, object?>> GetChildValues()
|
|
{
|
|
{
|
|
- var values = new Dictionary<string, object?>
|
|
|
|
- {
|
|
|
|
- {$"{ColumnName}.Quantity", QuantityBox.Value ?? 0.0},
|
|
|
|
- {$"{ColumnName}.Length", LengthBox.Value ?? 0.0},
|
|
|
|
- {$"{ColumnName}.Width", WidthBox.Value ?? 0.0},
|
|
|
|
- {$"{ColumnName}.Height", HeightBox.Value ?? 0.0},
|
|
|
|
- {$"{ColumnName}.Weight", WeightBox.Value ?? 0.0},
|
|
|
|
- {$"{ColumnName}.Unit.ID", Combo.SelectedValue is Guid guid ? guid : Guid.Empty }
|
|
|
|
- };
|
|
|
|
- return values;
|
|
|
|
|
|
+ yield return new("Quantity", QuantityBox.Value ?? 0.0);
|
|
|
|
+ yield return new("Length", LengthBox.Value ?? 0.0);
|
|
|
|
+ yield return new("Width", WidthBox.Value ?? 0.0);
|
|
|
|
+ yield return new("Height", HeightBox.Value ?? 0.0);
|
|
|
|
+ yield return new("Weight", WeightBox.Value ?? 0.0);
|
|
|
|
+ yield return new("Unit.ID", Combo.SelectedValue is Guid guid ? guid : Guid.Empty);
|
|
}
|
|
}
|
|
|
|
|
|
- public override void SetValue(string property, object? value)
|
|
|
|
|
|
+ protected override void SetChildValue(string property, object? value)
|
|
{
|
|
{
|
|
- if (!property.StartsWith($"{ColumnName}.")) return;
|
|
|
|
- property = property[(ColumnName.Length + 1)..];
|
|
|
|
-
|
|
|
|
if (property == "Unit.ID")
|
|
if (property == "Unit.ID")
|
|
{
|
|
{
|
|
Combo.SelectedValue = value is Guid guid ? guid : Guid.Empty;
|
|
Combo.SelectedValue = value is Guid guid ? guid : Guid.Empty;
|