예제 #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);
 }