예제 #1
0
        private bool isInUpdateList(SPField fieldToAdd)
        {
            bool retVal = false;

            foreach (SPField field in fieldsToUpdate)
            {
                if (field.ToString() == fieldToAdd.ToString())
                {
                    retVal = true;
                    break;
                }
            }
            return(retVal);
        }
        /// <summary>Initializes a new instance of the <see cref="CustomRuleCondition"/> class.</summary>
        /// <param name="spField">The sp field.</param>
        /// <param name="strOperator">The str operator.</param>
        /// <param name="fieldValue">The field value.</param>
        public CustomRuleCondition(SPField spField, string strOperator, string fieldValue)
        {
            if (spField == null)
            {
                throw new ArgumentNullException(spField.ToString());
            }
            if (String.IsNullOrEmpty(strOperator))
            {
                throw new ArgumentNullException(strOperator);
            }
            if (String.IsNullOrEmpty(fieldValue))
            {
                throw new ArgumentNullException(fieldValue);
            }

            this.ConditionFieldId           = spField.Id.ToString();
            this.ConditionFieldInternalName = spField.InternalName;
            this.ConditionFieldTitle        = spField.Title;
            this.ConditionOperator          = strOperator;
            this.ConditionFieldValue        = fieldValue;

            this.XmlBody();
        }