Beispiel #1
0
		void PerformShowSelectionFull (String [] Selectionen, DateTime FromDate,
					DateTime ToDate, int StartingIndex)
			{
			Dh = new DataHandling ();
			CreateSelectionTree (Dh);
			int NumberOfUnifiedEntries = Dh.LoadSelections (Selectionen, 100, FromDate, ToDate, "Full");
			if (NumberOfUnifiedEntries == 0)
				{
				return;
				}

			int NumberOfPages = 5;
			int NumberOfEntriesPerPage = NumberOfUnifiedEntries / NumberOfPages;
			while ((NumberOfEntriesPerPage < 15)
				&& (NumberOfPages > 1))
				{
				NumberOfPages--;
				NumberOfEntriesPerPage = NumberOfUnifiedEntries / NumberOfPages;
				}
			int [] TableForEntriesPerPage = new int [NumberOfPages];
			String [] ReturnDates = new String [NumberOfPages];

			int Reminder = NumberOfUnifiedEntries - (NumberOfEntriesPerPage * NumberOfPages);
			int AddOnPerPage = Reminder / NumberOfPages;
			int RunningLastDateIndex = 0;
			int Index = 0;
			while (Index < NumberOfPages)
				{
				if (Reminder > AddOnPerPage)
					TableForEntriesPerPage [Index] = NumberOfEntriesPerPage + AddOnPerPage;
				else
					TableForEntriesPerPage [Index] = NumberOfEntriesPerPage + Reminder;
				Reminder -= AddOnPerPage;
				ReturnDates [Index] = Dh.GetFromDate (RunningLastDateIndex);
				RunningLastDateIndex += TableForEntriesPerPage [Index];
				Index++;
				}
			if (Index == 0)
				return;
			String PagingMessage = "";
			if (TableForEntriesPerPage.Length > 1)
				PagingMessage = CreatePagingMessage (ReturnDates, FromDate,
						Dh.MoreEntriesAvailable (), false, StartingIndex);

			Label FollowUpStartLabel = new Label ();
			this.LinkToVideosContentPlace.Controls.Add (FollowUpStartLabel);
			FollowUpStartLabel.Text = PagingMessage;
			FollowUpStartLabel.Width = Unit.Percentage (99);
			FollowUpStartLabel.CssClass = "CSS_FollowUpLabel";

			InternetTV.CreateBeitragCover Formatieren = new InternetTV.CreateBeitragCover ();
			Formatieren.SetData (this.LinkToVideosContentPlace, Dh, TableForEntriesPerPage [0]);
			Formatieren.Create (CreateBeitragCover.FormatingStyle.ARCHIV);

			Label FollowUpLabel = new Label ();
			this.LinkToVideosContentPlace.Controls.Add (FollowUpLabel);
			FollowUpLabel.Text = PagingMessage;
			FollowUpLabel.Width = Unit.Percentage (99);
			FollowUpLabel.CssClass = "CSS_FollowUpLabel";
			}