Пример #1
0
        /// <summary>
        /// Deletes the comment of a cell of the cube.
        /// </summary>
        /// <param name="firstElement">The first element name.</param>
        /// <param name="secondElement">The second element name.</param>
        /// <param name="elements">A variable list of additional dimension elements that reference the cell.</param>
        /// <returns>True, if the comment has been deleted or false, otherwise.</returns>
        public bool DeleteCellComment(string firstElement, string secondElement, params string[] elements)
        {
            if (Dimensions == null)
            {
                return(false);
            }

            System.Collections.Specialized.StringCollection elementNames = new System.Collections.Specialized.StringCollection();
            elementNames.Add(firstElement);
            elementNames.Add(secondElement);
            if (elements != null)
            {
                for (int i = 0; i < elements.Length; i++)
                {
                    elementNames.Add(elements[i]);
                }
            }
            if (_dimensions.Count != elementNames.Count)
            {
                throw new System.ArgumentException(CreateExceptionString(_elementMismatch));
            }
            bool result = NativeOlapApi.CubeDeleteCellComment(_server.Store.ClientSlot, _serverHandle, _name, elementNames, _server.LastErrorInternal);

            elementNames = null;
            return(result);
        }
Пример #2
0
 /// <summary>
 /// Deletes the comment of a cell of the cube.
 /// </summary>
 /// <param name="elements">A list of dimension elements that reference the cell.</param>
 /// <returns>True, if the comment has been deleted or false, otherwise.</returns>
 public bool DeleteCellComment(System.Collections.Specialized.StringCollection elements)
 {
     if (Dimensions == null)
     {
         return(false);
     }
     if (_dimensions.Count != elements.Count)
     {
         throw new System.ArgumentException(CreateExceptionString(_elementMismatch));
     }
     return(NativeOlapApi.CubeDeleteCellComment(_server.Store.ClientSlot, _serverHandle, _name, elements, _server.LastErrorInternal));
 }