Example #1
0
        public virtual void RemoveCustomField(CustomFieldTypeId customFieldId)
        {
            if (customFieldTypeIdList == null)
            {
                customFieldTypeIdList = new List <CustomFieldTypeId>();
            }

            customFieldTypeIdList.Remove(customFieldId);
        }
Example #2
0
 public CustomFieldType UpdateCustomFieldType(CustomFieldTypeId id, string name, string dictionaryName,
                                              long minValue, long maxValue, int entityId, string typeId)
 {
     try
     {
         using (var scope = new TransactionScope())
         {
             var customFieldType = customFieldRep.GetById(id);
             customFieldType.Update(name, dictionaryName, minValue, maxValue, Enumeration.FromValue <EntityTypeEnum>(entityId.ToString()), typeId);
             scope.Complete();
             return(customFieldType);
         }
     }
     catch (Exception exp)
     {
         var res = customFieldRep.TryConvertException(exp);
         if (res == null)
         {
             throw;
         }
         throw res;
     }
 }
Example #3
0
 public CustomFieldType GetById(CustomFieldTypeId customFieldTypeId)
 {
     return(rep.FindByKey(customFieldTypeId));
 }