Exemplo n.º 1
0
		public PromoterSet Promoters(ColumnSet cs)
		{
			if (promoters == null || !promotersColumns.Equals(cs))
			{
				Query q = new Query();
				q.NoLock = true;
				q.TableElement = Usr.PromoterJoin;
				q.QueryCondition = new Q(PromoterUsr.Columns.UsrK, this.K);
				q.OrderBy = new OrderBy(Promoter.Columns.Name);
				q.Columns = cs;
				promoters = new PromoterSet(q);
				promotersColumns = cs;
			}
			return promoters;
		}
Exemplo n.º 2
0
		public PhotoSet PhotosMe(ColumnSet cs, int topRecords)
		{
			if (photosMe == null)
			{
				Query q = new Query();
				q.QueryCondition = new Q(Usr.Columns.K, this.K);
				q.TableElement = Photo.UsrMeJoin;
				q.OrderBy = Photo.DateTimeOrder(OrderBy.OrderDirection.Descending);
				if (cs != null)
					q.Columns = cs;
				if (topRecords > 0)
					q.TopRecords = topRecords;
				photosMe = new PhotoSet(q);
			}
			return photosMe;
		}
Exemplo n.º 3
0
		public EventSet EventsAttended(ColumnSet cs, int topRecords)
		{
			if (eventsAttended == null)
			{
				Query q = new Query();
				q.QueryCondition = new Q(Usr.Columns.K, this.K);
				q.TableElement = Event.UsrAttendedJoin;
				if (cs != null)
					q.Columns = cs;
				if (topRecords > 0)
					q.TopRecords = topRecords;
				eventsAttended = new EventSet(q);
			}
			return eventsAttended;
		}
Exemplo n.º 4
0
		public PlaceSet PlacesVisit(ColumnSet cs, int topRecords)
		{
			if (placesVisit == null)
			{
				Query q = new Query();
				q.TableElement = Place.UsrVisitJoin;
				if (cs != null)
					q.Columns = cs;
				if (topRecords > 0)
					q.TopRecords = topRecords;
				q.OrderBy = new OrderBy(Place.Columns.Population, OrderBy.OrderDirection.Descending);
				q.QueryCondition = new Q(Usr.Columns.K, this.K);
				placesVisit = new PlaceSet(q);
			}
			return placesVisit;
		}
Exemplo n.º 5
0
		public InvoiceItemSet GetInvoiceItems(ColumnSet columns)
		{
			Query q = new Query();
			q.QueryCondition = new Q(InvoiceItem.Columns.InvoiceK, this.K);
			q.Columns = new ColumnSet(InvoiceItem.Columns.CustomData,
										InvoiceItem.Columns.Description,
										InvoiceItem.Columns.InvoiceK,
										InvoiceItem.Columns.ItemProcessed,
										InvoiceItem.Columns.K,
										InvoiceItem.Columns.KeyData,
										InvoiceItem.Columns.Price,
										InvoiceItem.Columns.RevenueEndDate,
										InvoiceItem.Columns.RevenueStartDate,
										InvoiceItem.Columns.Total,
										InvoiceItem.Columns.Type,
										InvoiceItem.Columns.Vat);
			return new InvoiceItemSet(q);

		}
Exemplo n.º 6
0
		/// <summary>
		/// This is needed when using Distinct
		/// </summary>
		/// <param name="overideString"></param>
		/// <param name="overrideColumns"></param>
		public OrderBy(string overideString, params object[] overrideColumns)
		{
			this.OverideString = overideString;
			ColumnSet c = new ColumnSet(overrideColumns);
			allColumns = c.Columns;
		}