SqlHelper.ExecuteNonQuery("update cmsPropertyData set "+_dataType.DataFieldName+" = NULL where id = "+_propertyId);
else
SqlHelper.ExecuteNonQuery("update cmsPropertyData set "+_dataType.DataFieldName+" = @value where id = "+_propertyId,SqlHelper.CreateParameter("@value",value));
SqlHelper.ExecuteNonQuery("update cmsPropertyData set "+_dataType.DataFieldName+" = @value where id = "+_propertyId,SqlHelper.CreateParameter("@value",value));
_value=value;
}
}
}
publicvirtualvoidMakeNew(intPropertyId)
{
// this default implementation of makenew does not do anything s<>nce
// it uses the default datastorage of umbraco, and the row is already populated by the "property" object
// If the datatype needs to have a default value, inherit this class and override this method.
}
publicvoidDelete(){
// this default implementation of delete does not do anything s<>nce
// it uses the default datastorage of umbraco, and the row is already deleted by the "property" object
}
publicintPropertyId
{
get{
return_propertyId;
}
set
{
_propertyId=value;
_value=SqlHelper.ExecuteScalar<object>("Select "+_dataType.DataFieldName+" from cmsPropertyData where id = "+value);
}
}
// TODO: clean up Legacy - these are needed by the wysiwyeditor, in order to feed the richtextholder with version and nodeid
// solution, create a new version of the richtextholder, which does not depend on these.
publicGuidVersion{
get{
returnnewGuid(SqlHelper.ExecuteScalar<string>("Select versionId from cmsPropertyData where id = "+PropertyId).ToString());
}
}
publicintNodeId{
get{
returnSqlHelper.ExecuteScalar<int>("Select contentNodeid from cmsPropertyData where id = "+PropertyId);