diff --git a/Src/SwqlStudio/CrudProperty.cs b/Src/SwqlStudio/CrudProperty.cs index a48a31547..5a6a448a0 100644 --- a/Src/SwqlStudio/CrudProperty.cs +++ b/Src/SwqlStudio/CrudProperty.cs @@ -5,10 +5,12 @@ namespace SwqlStudio { public class CrudProperty { + public bool UseInPropertyBag { get; } private readonly Property _property; - public CrudProperty(Property property) + public CrudProperty(Property property, bool useInPropertyBag = true) { + UseInPropertyBag = useInPropertyBag; _property = property; } diff --git a/Src/SwqlStudio/CrudTab.cs b/Src/SwqlStudio/CrudTab.cs index 96a09338e..28f8e37e2 100644 --- a/Src/SwqlStudio/CrudTab.cs +++ b/Src/SwqlStudio/CrudTab.cs @@ -46,12 +46,12 @@ private void BindProperties() createProperties = false; goto case CrudOperation.Update; case CrudOperation.Update: - crudPropertyBindingSource.Add(new CrudProperty(new Property() + crudPropertyBindingSource.Add(new CrudProperty(new Property { IsKey = true, Name = SwisUri, Type = typeof(string).Name - })); + }, false)); break; default: throw new ArgumentOutOfRangeException(); @@ -116,7 +116,7 @@ private PropertyBag CreatePropertyBag() var rv = new PropertyBag(); foreach (CrudProperty property in crudPropertyBindingSource) { - if (!string.IsNullOrEmpty(property.Value)) + if (property.UseInPropertyBag && !string.IsNullOrEmpty(property.Value)) { rv[property.Name] = property.Value; }