示例#1
0
 public Property(int Id, propertytype.PropertyType pt)
 {
     _pt              = pt;
     _id              = Id;
     _data            = _pt.DataTypeDefinition.DataType.Data;
     _data.PropertyId = Id;
 }
示例#2
0
        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());
            }
        }
示例#3
0
 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;
 }
示例#4
0
 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;
 }
示例#5
0
        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));
        }
示例#6
0
 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;
 }
示例#7
0
        public Property(int Id, propertytype.PropertyType pt)
        {

            _pt = pt;
            _id = Id;
            _data = _pt.DataTypeDefinition.DataType.Data;
            _data.PropertyId = Id;
        }
示例#8
0
 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;
 }
示例#9
0
        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;
        }
示例#10
0
        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;
        }
示例#11
0
 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;
 }
示例#12
0
        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));
        }
示例#13
0
        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());
            }
            
        }
示例#14
0
 public colorPicker(interfaces.IData Data, List <KeyValuePair <int, String> > Prevalues)
 {
     _data          = Data;
     this.Prevalues = Prevalues;
 }
示例#15
0
		public numberField(interfaces.IData Data) 
        {
			_data = Data;
		}
		public dropdownMultiple(interfaces.IData Data,SortedList Prevalues)
		{
			_data = Data;
			_prevalues = Prevalues;
		}
示例#17
0
		public memberPicker(interfaces.IData Data)
		{
			_data = Data;
		}
示例#18
0
 public dropdownMultiple(interfaces.IData Data, SortedList Prevalues)
 {
     _data      = Data;
     _prevalues = Prevalues;
 }
示例#19
0
文件: yesNo.cs 项目: KqSMea8/gueslang
 public yesNo(interfaces.IData Data)
 {
     _data = Data;
 }
示例#20
0
 public checkboxlistEditor(interfaces.IData Data, List <KeyValuePair <int, String> > Prevalues)
 {
     _data          = Data;
     this.Prevalues = Prevalues;
 }
示例#21
0
 public pagePicker(interfaces.IData data) : base(data)
 {
 }
示例#22
0
 public radiobox(interfaces.IData Data, List <KeyValuePair <int, String> > Prevalues)
 {
     _data          = Data;
     this.Prevalues = Prevalues;
 }
示例#23
0
 public dateField(interfaces.IData Data)
 {
     _data = Data;
 }
示例#24
0
		public dictionaryPicker(interfaces.IData Data, SortedList Prevalues) 
		{
			_data = Data;
			_prevalues = Prevalues;
		}
示例#25
0
		public yesNo(interfaces.IData Data) {
			_data = Data;
		}
示例#26
0
		public pagePicker(interfaces.IData Data)
		{
			_data = Data;
		}
示例#27
0
 public uploadField(interfaces.IData Data, string ThumbnailSizes)
 {
     _data       = (cms.businesslogic.datatype.DefaultData)Data;
     _thumbnails = ThumbnailSizes;
 }
示例#28
0
 public radiobox(interfaces.IData Data, SortedList Prevalues)
 {
     _data      = Data;
     _prevalues = Prevalues;
 }
示例#29
0
 public radiobox(interfaces.IData Data, List<KeyValuePair<int, String>> Prevalues)
 {
     _data = Data;
     this.Prevalues = Prevalues;
 }
示例#30
0
		public SimpleEditor(interfaces.IData Data) 
		{
			_data = Data;

		}
 public noEdit(interfaces.IData Data)
 {
     _data = Data;
 }
示例#32
0
 public checkboxlistEditor(interfaces.IData Data, List<KeyValuePair<int, String>> Prevalues)
 {
     _data = Data;
     this.Prevalues = Prevalues;
 }
示例#33
0
		public dateField(interfaces.IData Data) {
			_data = Data;
		}
示例#34
0
 public dictionaryPicker(interfaces.IData Data, SortedList Prevalues)
 {
     _data      = Data;
     _prevalues = Prevalues;
 }
示例#35
0
 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;
 }
示例#37
0
		public checkboxlistEditor(interfaces.IData Data,SortedList Prevalues)
		{
			_data = Data;
			_prevalues = Prevalues;
		}
示例#38
0
 public colorPicker(interfaces.IData Data, SortedList Prevalues)
 {
     _data      = Data;
     _prevalues = Prevalues;
 }
示例#39
0
 public mediaChooser(interfaces.IData Data)
 {
     _data = Data;
 }
示例#40
0
		public radiobox(interfaces.IData Data, SortedList Prevalues) 
		{
			_data = Data;
			_prevalues = Prevalues;
		}
示例#41
0
 public memberPicker(interfaces.IData Data)
 {
     _data = Data;
 }
示例#42
0
 public TextFieldEditor(interfaces.IData Data)
 {
     _data = Data;
 }
 public SimpleEditor(interfaces.IData Data)
 {
     _data = Data;
 }
示例#44
0
 public BaseTreePickerEditor(IData Data)
     : base()
 {
     _data = Data;
 }
示例#45
0
 public dropdownMultiple(interfaces.IData Data, List <KeyValuePair <int, String> > Prevalues)
 {
     _data          = Data;
     this.Prevalues = Prevalues;
 }
示例#46
0
 public colorPicker(interfaces.IData Data, SortedList Prevalues)
 {
     _data = Data;
     _prevalues = Prevalues;
 }
示例#47
0
		public noEdit(interfaces.IData Data) {
			_data = Data;
		}
示例#48
0
		public mediaChooser(interfaces.IData Data)
		{
			_data = Data;
		}
示例#49
0
 public numberField(interfaces.IData Data)
 {
     _data = Data;
 }
 public TextFieldEditor(interfaces.IData Data)
 {
     _data = Data;
 }
示例#51
0
 public checkboxlistEditor(interfaces.IData Data, SortedList Prevalues)
 {
     _data      = Data;
     _prevalues = Prevalues;
 }
 public BaseTreePickerEditor(IData Data)
     : base()
 {
     _data = Data;
 }
示例#53
0
 public pagePicker(interfaces.IData Data)
 {
     _data = Data;
 }