Exemplo n.º 1
0
        /// <summary>
        /// 获取浏览记录
        /// </summary>
        /// <param name="strServerUrl"></param>
        /// <param name="paths"></param>
        /// <param name="strStyle"></param>
        /// <param name="records"></param>
        /// <param name="strError"></param>
        /// <returns></returns>
		public int GetBrowseRecord(
			string strServerUrl,
			string [] paths,
			string strStyle,
			out ArrayList records,
			out string strError)
		{
			strError = "";
			records = null;

			if (String.IsNullOrEmpty(strServerUrl) == true)
				strServerUrl = this.ServerUrl;

			RmsChannel channelSave = channel;
			
			channel = Channels.GetChannel(strServerUrl);
			if (channel == null)
			{
				strError = "get channel error";
				return -1;
			}

			try 
			{
				// 根据制定的记录路径获得浏览格式记录
				// parameter:
				//		aRecord	返回的浏览记录信息。一个ArrayList数组。每个元素为一个string[],所包含的内容
				//				根据strStyle而定。如果strStyle中有id,则aRecord每个元素中的string[]第一个字符串就是id,后面是各列内容。
				return channel.GetBrowseRecords(paths,
					strStyle,
					out records,
					out strError);
			}

			finally 
			{
				channel = channelSave;
			}

		}