public bool SaveComponentAttribute(int FieldInstanceID, Attributes.AttributeType attributeType,
                                           string componentKey,
                                           int cryptography, string regExpression, string parentComponent, string parentAttribute, UsageType usageFieldType)
        {
            int inext = rd.getNextID("ComponentAttribute");

            iQuery = new QueryBuilder(QueryType._Insert)
                     .AddField("ComponentAttributeID", "C_ComponentAttribute", FieldType._Number, "", inext.ToString())
                     .AddField("FieldInstanceID", "C_ComponentAttribute", FieldType._Number, "", FieldInstanceID.ToString())
                     .AddField("Attributetype", "C_ComponentAttribute", FieldType._Number, "", ((int)attributeType).ToString())
                     .AddField("componentKey", "C_ComponentAttribute", FieldType._String, "", (componentKey).ToString())
                     .AddField("cryptography", "C_ComponentAttribute", FieldType._Number, "", (cryptography).ToString())
                     .AddField("regExpression", "C_ComponentAttribute", FieldType._String, "", (regExpression).ToString())
                     .AddField("parentComponent", "C_ComponentAttribute", FieldType._String, "", (parentComponent).ToString())
                     .AddField("parentAttribute", "C_ComponentAttribute", FieldType._String, "", (parentAttribute).ToString())
                     .AddField("UsageFieldType", "C_ComponentAttribute", FieldType._Number, "", ((int)usageFieldType).ToString())
                     .AddField("LastUPD", "C_ComponentAttribute", FieldType._DateTime, "", (DateTime.Now.ToString()));
            if (rd.ExecuteQuery(iQuery).Result)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
 public bool SaveComponentAttribute(int componentAttribute, int FieldInstanceID,
                                    Attributes.AttributeType attributeType,
                                    string componentKey,
                                    int cryptography, string regExpression, string parentComponent, int parentAttributes, UsageType usageFieldType)
 {
     iQuery = new QueryBuilder(QueryType._Update)
              .AddField("Attributetype", "C_ComponentAttribute", FieldType._Number, "", ((int)attributeType).ToString())
              // .AddField("componentKey", "C_ComponentAttribute", FieldType._String, "", (componentKey).ToString())
              .AddField("cryptography", "C_ComponentAttribute", FieldType._Number, "", (cryptography).ToString())
              .AddField("regExpression", "C_ComponentAttribute", FieldType._String, "", (regExpression).ToString())
              .AddField("parentComponent", "C_ComponentAttribute", FieldType._String, "", (parentComponent).ToString())
              .AddField("parentAttribute", "C_ComponentAttribute", FieldType._Number, "", (parentAttributes).ToString())
              .AddField("UsageFieldType", "C_ComponentAttribute", FieldType._Number, "", ((int)usageFieldType).ToString())
              .AddField("LastUPD", "C_ComponentAttribute", FieldType._DateTime, "", (DateTime.Now.ToString()))
              .AddWhere(0, "C_ComponentAttribute", "ComponentAttributeID", FieldType._Number, Operator._Equal, componentAttribute.ToString(),
                        Condition._None);
     return(true);
 }
Exemple #3
0
 public IAttributeCollectionDecorator Create(Attributes.AttributeType attributeType)
 {
     return(_attributeCollectionDecorators.ContainsKey(attributeType.Id) ? _attributeCollectionDecorators[attributeType.Id] : null);
 }