Exemplo n.º 1
0
        public bool UpdateUserDefinedListData(Guid objectCustomFieldId,
                                              IEnumerable <Guid> itemIds,
                                              CustomFieldTypeFlag customFieldTypeFlag)
        {
            ObjectCustomFieldDataUserDefinedListBO objectCustomFieldDataUserDefinedListBO =
                new ObjectCustomFieldDataUserDefinedListBO();

            return(objectCustomFieldDataUserDefinedListBO
                   .UpdateCustomFieldData(objectCustomFieldId, itemIds, customFieldTypeFlag));
        }
Exemplo n.º 2
0
        public bool UpdateUserDefinedListData(Guid cmsObjectId,
                                              Guid objectTypeCustomFieldId,
                                              IEnumerable <Guid> itemIds,
                                              CustomFieldTypeFlag customFieldTypeFlag)
        {
            Session session = null;

            try
            {
                session = XpoHelper.GetNewSession();
                ObjectCustomFieldDataUserDefinedListBO objectCustomFieldDataUserDefinedListBO =
                    new ObjectCustomFieldDataUserDefinedListBO();

                ObjectCustomFieldBO objectCustomFieldBO = new ObjectCustomFieldBO();
                ObjectCustomField   objectCustomField   =
                    objectCustomFieldBO.GetObjectCustomField(session, cmsObjectId, objectTypeCustomFieldId);
                if (objectCustomField == null)
                {
                    throw new Exception("Could not found ObjectCustomField");
                }

                return(objectCustomFieldDataUserDefinedListBO
                       .UpdateCustomFieldData(objectCustomField.ObjectCustomFieldId, itemIds, customFieldTypeFlag));
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                if (session != null)
                {
                    session.Dispose();
                }
            }
        }