Ejemplo n.º 1
0
        /// <summary>
        /// Create a new Extended Field in this Section
        /// </summary>
        public DataEntryField CreateExtendedField(string name, string path, ControlType controlType)
        {
            CheckPath(path);
            var field = new DataEntryField(name, FieldType.Extended, controlType)
            {
                OrderBy = Fields.Count,
                Path    = path
            };

            Fields.Add(field);
            return(field);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Create a new Custom DataEntryField in this DataEntrySection.
        /// </summary>
        public DataEntryField CreateCustomField(string name, ControlType controlType, Guid agencyId)
        {
            // Create a New Custom Field
            var field = new DataEntryField(name, FieldType.Custom, controlType, agencyId)
            {
                OrderBy = Fields.Count
            };

            field.Path = field.Name.ToPascalCase();

            // Check the Path is Unique
            CheckPath(field.Path);

            // Check the Name is Unique
            CheckName(field.Name);

            // Add the new Field
            Fields.Add(field);

            // Return the Field
            return(field);
        }