public Property(int Id, propertytype.PropertyType pt) { _pt = pt; _id = Id; _data = _pt.DataTypeDefinition.DataType.Data; _data.PropertyId = Id; }
internal Property(Umbraco.Core.Models.Property property) { _id = property.Id; _property = property; _propertyType = property.PropertyType; //Just to ensure that there is a PropertyType available _pt = PropertyType.GetPropertyType(property.PropertyTypeId); //ensure we have data property editor set if (_pt.DataTypeDefinition.DataType != null) { _data = _pt.DataTypeDefinition.DataType.Data; } else { //send back null we will handle it in ContentControl AddControlNew //and display to use message from the dictionary errors section _data = new DefaultData(null); } _data.PropertyId = Id; //set the value so it doesn't need to go to the database var dvs = _data as IDataValueSetter; if (dvs != null) { dvs.SetValue(property.Value, property.PropertyType.DataTypeDatabaseType.ToString()); } }
public Property(int Id) { _id = Id; _pt = umbraco.cms.businesslogic.propertytype.PropertyType.GetPropertyType( SqlHelper.ExecuteScalar <int>("select propertytypeid from cmsPropertyData where id = @id", SqlHelper.CreateParameter("@id", Id))); _data = _pt.DataTypeDefinition.DataType.Data; _data.PropertyId = Id; }
public Property(int Id) { _id = Id; _pt = Umbraco.Cms.BusinessLogic.propertytype.PropertyType.GetPropertyType(int.Parse( Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(GlobalSettings.DbDSN, CommandType.Text, "select propertytypeid from cmsPropertyData where id = @id", new SqlParameter("@id", Id)).ToString())); _data = _pt.DataTypeDefinition.DataType.Data; _data.PropertyId = Id; }
public static Property MakeNew(propertytype.PropertyType pt, Content c, Guid VersionId) { int newPropertyId = int.Parse(Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(_connstring, CommandType.Text, "Insert into cmsPropertyData (contentNodeId, versionId, propertyTypeId) values (" + c.Id.ToString() + ", '" + VersionId.ToString() + "'," + pt.Id.ToString() + ") select @@identity").ToString()); interfaces.IData d = pt.DataTypeDefinition.DataType.Data; d.MakeNew(newPropertyId); return(new Property(newPropertyId, pt)); }
public Property(int Id) { _id = Id; _pt = umbraco.cms.businesslogic.propertytype.PropertyType.GetPropertyType( SqlHelper.ExecuteScalar<int>("select propertytypeid from cmsPropertyData where id = @id", SqlHelper.CreateParameter("@id", Id))); _data = _pt.DataTypeDefinition.DataType.Data; _data.PropertyId = Id; }
public Property(int Id, propertytype.PropertyType pt) { _pt = pt; _id = Id; if (_pt.DataTypeDefinition.DataType == null) { throw new Exception(string.Format("Could not load datatype '{0}'", _pt.DataTypeDefinition.Text)); } _data = _pt.DataTypeDefinition.DataType.Data; _data.PropertyId = Id; }
internal Property(Umbraco.Core.Models.Property property) { _id = property.Id; _property = property; _propertyType = property.PropertyType; //Just to ensure that there is a PropertyType available _pt = PropertyType.GetPropertyType(property.PropertyTypeId); _data = _pt.DataTypeDefinition.DataType.Data; _data.PropertyId = Id; }
public Property(int Id) { _id = Id; _pt = PropertyType.GetPropertyType( SqlHelper.ExecuteScalar <int>("select propertytypeid from cmsPropertyData where id = @id", SqlHelper.CreateParameter("@id", Id))); if (_pt.DataTypeDefinition.DataType == null) { throw new Exception(string.Format("Could not load datatype '{0}'", _pt.DataTypeDefinition.Text)); } _data = _pt.DataTypeDefinition.DataType.Data; _data.PropertyId = Id; }
public static Property MakeNew(propertytype.PropertyType pt, Content c, Guid versionId) { int newPropertyId = 0; // The method is synchronized SqlHelper.ExecuteNonQuery("INSERT INTO cmsPropertyData (contentNodeId, versionId, propertyTypeId) VALUES(@contentNodeId, @versionId, @propertyTypeId)", SqlHelper.CreateParameter("@contentNodeId", c.Id), SqlHelper.CreateParameter("@versionId", versionId), SqlHelper.CreateParameter("@propertyTypeId", pt.Id)); newPropertyId = SqlHelper.ExecuteScalar <int>("SELECT MAX(id) FROM cmsPropertyData"); interfaces.IData d = pt.DataTypeDefinition.DataType.Data; d.MakeNew(newPropertyId); return(new Property(newPropertyId, pt)); }
internal Property(Umbraco.Core.Models.Property property) { _id = property.Id; _property = property; _propertyType = property.PropertyType; //Just to ensure that there is a PropertyType available _pt = PropertyType.GetPropertyType(property.PropertyTypeId); _data = _pt.DataTypeDefinition.DataType.Data; _data.PropertyId = Id; //set the value so it doesn't need to go to the database var dvs = _data as IDataValueSetter; if (dvs != null) { dvs.SetValue(property.Value, property.PropertyType.DataTypeDatabaseType.ToString()); } }
public colorPicker(interfaces.IData Data, List <KeyValuePair <int, String> > Prevalues) { _data = Data; this.Prevalues = Prevalues; }
public numberField(interfaces.IData Data) { _data = Data; }
public dropdownMultiple(interfaces.IData Data,SortedList Prevalues) { _data = Data; _prevalues = Prevalues; }
public memberPicker(interfaces.IData Data) { _data = Data; }
public dropdownMultiple(interfaces.IData Data, SortedList Prevalues) { _data = Data; _prevalues = Prevalues; }
public yesNo(interfaces.IData Data) { _data = Data; }
public checkboxlistEditor(interfaces.IData Data, List <KeyValuePair <int, String> > Prevalues) { _data = Data; this.Prevalues = Prevalues; }
public pagePicker(interfaces.IData data) : base(data) { }
public radiobox(interfaces.IData Data, List <KeyValuePair <int, String> > Prevalues) { _data = Data; this.Prevalues = Prevalues; }
public dateField(interfaces.IData Data) { _data = Data; }
public dictionaryPicker(interfaces.IData Data, SortedList Prevalues) { _data = Data; _prevalues = Prevalues; }
public pagePicker(interfaces.IData Data) { _data = Data; }
public uploadField(interfaces.IData Data, string ThumbnailSizes) { _data = (cms.businesslogic.datatype.DefaultData)Data; _thumbnails = ThumbnailSizes; }
public radiobox(interfaces.IData Data, SortedList Prevalues) { _data = Data; _prevalues = Prevalues; }
public radiobox(interfaces.IData Data, List<KeyValuePair<int, String>> Prevalues) { _data = Data; this.Prevalues = Prevalues; }
public SimpleEditor(interfaces.IData Data) { _data = Data; }
public noEdit(interfaces.IData Data) { _data = Data; }
public checkboxlistEditor(interfaces.IData Data, List<KeyValuePair<int, String>> Prevalues) { _data = Data; this.Prevalues = Prevalues; }
public colorPicker(interfaces.IData Data, List<KeyValuePair<int, String>> Prevalues) { _data = Data; this.Prevalues = Prevalues; }
public dropdownMultiple(interfaces.IData Data, List<KeyValuePair<int, String>> Prevalues) { _data = Data; this.Prevalues = Prevalues; }
public checkboxlistEditor(interfaces.IData Data,SortedList Prevalues) { _data = Data; _prevalues = Prevalues; }
public colorPicker(interfaces.IData Data, SortedList Prevalues) { _data = Data; _prevalues = Prevalues; }
public mediaChooser(interfaces.IData Data) { _data = Data; }
public TextFieldEditor(interfaces.IData Data) { _data = Data; }
public BaseTreePickerEditor(IData Data) : base() { _data = Data; }
public dropdownMultiple(interfaces.IData Data, List <KeyValuePair <int, String> > Prevalues) { _data = Data; this.Prevalues = Prevalues; }
public checkboxlistEditor(interfaces.IData Data, SortedList Prevalues) { _data = Data; _prevalues = Prevalues; }