From b16b5511daf3615c3cf174b4e40346f3948babbb Mon Sep 17 00:00:00 2001 From: "Hendy@Blueberry" Date: Wed, 11 Jul 2012 11:48:25 -0100 Subject: [PATCH] Removed .HasRecords check in Picker Relations datatype as not supported by SQL CE (and not required). (Left Picker Relations exlcuded from the project) --- .../PickerRelations/PickerRelationsDataEditor.cs | 12 ------------ .../PickerRelations/PickerRelationsEventHandler.cs | 11 ++++------- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/src/umbraco.editorControls/PickerRelations/PickerRelationsDataEditor.cs b/src/umbraco.editorControls/PickerRelations/PickerRelationsDataEditor.cs index e95f2e5789..d5dcdc313f 100644 --- a/src/umbraco.editorControls/PickerRelations/PickerRelationsDataEditor.cs +++ b/src/umbraco.editorControls/PickerRelations/PickerRelationsDataEditor.cs @@ -248,17 +248,5 @@ namespace umbraco.editorControls.PickerRelations return isContextObjectTypeValid; } - - ///// - ///// Insted of rendering the current name of this property, use a consistant label - ///// - ///// - //protected override void Render(HtmlTextWriter writer) - //{ - // writer.WriteLine("
MultiNode Relations
"); - // writer.WriteLine("
"); - // base.Render(writer); - // writer.WriteLine("
"); - //} } } diff --git a/src/umbraco.editorControls/PickerRelations/PickerRelationsEventHandler.cs b/src/umbraco.editorControls/PickerRelations/PickerRelationsEventHandler.cs index 66cbc3d103..0bba75267e 100644 --- a/src/umbraco.editorControls/PickerRelations/PickerRelationsEventHandler.cs +++ b/src/umbraco.editorControls/PickerRelations/PickerRelationsEventHandler.cs @@ -232,15 +232,12 @@ namespace umbraco.editorControls.PickerRelations { //clear data Relation relation; - if (relations.HasRecords) + while (relations.Read()) { - while (relations.Read()) - { - relation = new Relation(relations.GetInt("id")); + relation = new Relation(relations.GetInt("id")); - // TODO: [HR] check to see if an instance identifier is used - relation.Delete(); - } + // TODO: [HR] check to see if an instance identifier is used + relation.Delete(); } } }