コード例 #1
0
        /// Checks if the folder exists or not.
        /// <param name="type"></param>
        /// <param name="path">Parent folder path</param>
        /// <param name="folderName">Name of the folder to search</param>
        /// <returns>True if found, else false.</returns>
        public bool CheckExist(ItemTypeEnum type, string path, string folderName)
        {
            var tempPath = Path.Combine(path, folderName).Replace(@"\", "/");

            // Condition criteria.

            // Condition criteria.
            var condition = new SearchCondition
            {
                Condition = ConditionEnum.Contains,
                ConditionSpecified = true,
                Name = "Name",
                Value = ""
            };
            var conditions = new SearchCondition[1];
            conditions[0] = condition;

            var returnedItems = this._rs.FindItems(path, BooleanOperatorEnum.Or, conditions);

            // Iterate thro' each report properties to get the path.
            foreach (var item in returnedItems)
            {
                if (item.Type == type)
                {
                    if (item.Path.Trim().ToLower() == tempPath.Trim().ToLower())
                    {
                        return true;
                    }
                }
            }
            return false;
        }
コード例 #2
0
 /// <remarks/>
 public void FindItemsAsync(string Folder, BooleanOperatorEnum BooleanOperator, SearchCondition[] Conditions, object userState)
 {
     if ((this.FindItemsOperationCompleted == null))
     {
         this.FindItemsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnFindItemsOperationCompleted);
     }
     this.InvokeAsync("FindItems", new object[]
     {
         Folder,
         BooleanOperator,
         Conditions
     }, this.FindItemsOperationCompleted, userState);
 }
コード例 #3
0
 /// <remarks/>
 public void FindItemsAsync(string Folder, BooleanOperatorEnum BooleanOperator, SearchCondition[] Conditions)
 {
     this.FindItemsAsync(Folder, BooleanOperator, Conditions, null);
 }
コード例 #4
0
 public CatalogItem[] FindItems(string Folder, BooleanOperatorEnum BooleanOperator, SearchCondition[] Conditions)
 {
     object[] results = this.Invoke("FindItems", new object[]
     {
         Folder,
         BooleanOperator,
         Conditions
     });
     return ((CatalogItem[])(results[0]));
 }