Пример #1
0
		/// <summary>
		/// Create a new APRptSource.
		/// </summary>
		/// <param name="innerKey">View source key.</param>
		/// <param name="sourceName">View source name.</param>
		/// <param name="description">View source description.</param>
		protected APRptSource(string innerKey, string sourceName, string description)
		{
			_innerKey = innerKey;
			_sourceName = sourceName;
			_description = description;
			_references = new List<APRptColumnCollection>();
			_allColumns = new APRptColumnCollection();
		}
Пример #2
0
		/// <summary>
		/// Create a new APRptConditionBuilder.
		/// </summary>
		/// <param name="def">The condition defined of Rpt.</param>
		/// <param name="avaliableColumns">The avaliable columns.</param>
		public APRptConditionBuilder(APRptConditionDef def, APRptColumnCollection avaliableColumns)
		{
			if (def == null)
				throw new ArgumentNullException("def");

			_def = def;
			_avaliableColumns = avaliableColumns;
			_filters = new Dictionary<string, APRptFilter>();


			foreach (APRptFilterDef filter in def.Filters)
			{
				_filters.Add(filter.Serial, new APRptFilter(
					_avaliableColumns[filter.ColumnId],
					filter.Comparator,
					ParseValues(filter.Values)));
			}
		}
Пример #3
0
		private APRptColumnCollection GetAvaliableColumns()
		{
			APRptColumnCollection avaliable = new APRptColumnCollection();

			foreach (APRptReferDef def in _def.Refers)
			{
				avaliable.Add(_source.AllColumns[def.ColumnId]);
			}

			return avaliable;
		}
Пример #4
0
		/// <summary>
		/// Add reference.
		/// </summary>
		/// <param name="reference">The reference of APRptColumn.</param>
		public virtual void AddReference(APRptColumnCollection reference)
		{
			_references.Add(reference);

			foreach (APRptColumn ex in reference)
			{
				_allColumns.Add(ex);
			}
		}