Class ProductGroupFieldValue
- Namespace
- Dynamicweb.Ecommerce.Products
- Assembly
- Dynamicweb.Ecommerce.dll
This class saves the new values for ProductGroupField
[Serializable]
public class ProductGroupFieldValue
- Inheritance
-
ProductGroupFieldValue
- Inherited Members
Examples
using System;
using Dynamicweb.Ecommerce.Products;
namespace Dynamicweb.Ecommerce.Examples.Products;
public static class ProductGroupCustomFieldsRendererSample
{
public static void RenderProductGroupCustomFields(ProductGroupFieldValueCollection productGroupFieldValues)
{
ArgumentNullException.ThrowIfNull(productGroupFieldValues);
var values = new ProductFieldValueCollection();
foreach (ProductGroupFieldValue value in productGroupFieldValues)
{
var field = new ProductField();
var fieldValue = new ProductFieldValue(field, value.Value)
{
ProductField =
{
Types = value.ProductGroupField.Types,
TemplateName = value.ProductGroupField.TemplateName,
SystemName = value.ProductGroupField.SystemName
},
Value = value.Value
};
values.Add(fieldValue);
}
if (values.Count > 0)
{
//TODO: insert your code here
}
}
}
Constructors
ProductGroupFieldValue()
Initializes a new instance of the ProductGroupFieldValue class.
public ProductGroupFieldValue()
ProductGroupFieldValue(ProductGroupField, object?)
Initializes a new instance of the ProductGroupFieldValue class.
[SetsRequiredMembers]
public ProductGroupFieldValue(ProductGroupField productGroupField, object? value)
Parameters
productGroupFieldProductGroupFieldThe ProductGroupField object.
valueobjectThe value.
Properties
HasValue
Gets value indicating whether the product field value has been set.
[MemberNotNullWhen(true, "Value")]
public bool HasValue { get; }
Property Value
ProductGroupField
Gets or sets the ProductGroupField.
public required ProductGroupField ProductGroupField { get; set; }
Property Value
- ProductGroupField
The ProductGroupField object.
Value
Gets or sets the value.
public object? Value { get; set; }
Property Value
- object
The value.
Methods
Save(DataRow)
Saves the specified DataRow.
public void Save(DataRow dataRow)
Parameters
dataRowDataRowDataRow.