示例#1
0
        public ArtDevField CreateFieldNumber(string Name)
        {
            SPField     Field       = NewOrRefNumber(Name);
            ArtDevField ArtDevField = new ArtDevField(Field);

            return(ArtDevField);
        }
示例#2
0
        public ArtDevField CreateFieldText(string Name)
        {
            SPFieldText Field       = NewOrRefText(Name);
            ArtDevField ArtDevField = new ArtDevField(Field);

            return(ArtDevField);
        }
示例#3
0
        public ArtDevField CreateFieldUrl(string Name)
        {
            SPFieldUrl  Field       = NewOrRefURL(Name);
            ArtDevField ArtDevField = new ArtDevField(Field);

            return(ArtDevField);
        }
示例#4
0
        public ArtDevField CreateFieldCurrency(string Name)
        {
            SPFieldCurrency Field       = NewOrRefCurrency(Name);
            ArtDevField     ArtDevField = new ArtDevField(Field);

            return(ArtDevField);
        }
示例#5
0
        public ArtDevField CreateFieldChoice(string Name)
        {
            SPFieldChoice Field       = NewOrRefChoice(Name);
            ArtDevField   ArtDevField = new ArtDevField(Field);

            return(ArtDevField);
        }
示例#6
0
        public ArtDevField CreateFieldDateTime(string Name)
        {
            SPFieldDateTime Field       = NewOrRefDateTime(Name);
            ArtDevField     ArtDevField = new ArtDevField(Field);

            return(ArtDevField);
        }
示例#7
0
        public ArtDevList AddFieldLink(ArtDevField field)
        {
            this.artDevFields.Add(field);
            this.sPFields.Add(field.field);
            SPField sPField = this.list.Fields.TryGetFieldByStaticName(field.field.StaticName) ?? null;

            if (sPField == null)
            {
                this.list.Fields.Add(field.field); this.Field = this.list.Fields.TryGetFieldByStaticName(field.field.StaticName);
            }
            else
            {
                this.Field = sPField;
            }
            return(this);
        }
示例#8
0
        public ArtDevField CreateFieldLookup(string Name, string ListUrl, string WebUrl = null)
        {
            SPList list = null; SPFieldLookup Field = null;

            if (WebUrl == null)
            {
                list  = this.Web().GetList(ListUrl);
                Field = NewOrRefLookup(Name, list);
            }
            else
            {
                using (SPSite site = new SPSite(this.site.Url))
                {
                    using (SPWeb web = site.OpenWeb(WebUrl))
                    {
                        list  = web.GetList(ListUrl);
                        Field = NewOrRefLookup(Name, list, web);
                    }
                }
            }
            ArtDevField ArtDevField = new ArtDevField(Field);

            return(ArtDevField);
        }
示例#9
0
 public ArtDevContentType AddFieldLink(ArtDevField field)
 {
     this.sPFields.Add(field.field);
     this.link = new SPFieldLink(field.field);
     return(this);
 }