private void AttachParameterRow(ShippingMethodDto.ShippingMethodParameterRow row) { if (row.RowState == DataRowState.Detached) { _shippingMethodDto.ShippingMethodParameter.Rows.Add(row); } }
private ShippingMethodDto.ShippingMethodParameterRow GetOrCreateParameterRow(string parameterName) { ShippingMethodDto.ShippingMethodParameterRow row = GetParameterRow(parameterName); if (row == null) { row = _shippingMethodDto.ShippingMethodParameter.NewShippingMethodParameterRow(); row.ShippingMethodId = _shippingMethodDto.ShippingMethod[0].ShippingMethodId; row.Parameter = parameterName; } return(row); }