Пример #1
0
		public bool CleanupWordUpCalendar ()
			{
			WPMediaGoogleCalendarUpdate.DoUpdate WordUpStaffGoogleUpdate = new DoUpdate();
			WordUpStaffGoogleUpdate.CalendarTitle = "word up!23 Staff";
			if (WordUpStaffGoogleUpdate.ErrorsOccured)
				return false;
			Dictionary<String, Dictionary<String, String>> WordUpStaffGoogleExistingIDs
					= WordUpStaffGoogleUpdate.LoadUsedGoogleIDsInSpecificCalendar();
			Dictionary<String, Dictionary<String, String>> WordUpStaffNonExistingTermineIDs
					= SelectWordUpNonExistingWPMediaIDs(WordUpStaffGoogleExistingIDs, 0);
			foreach (String EventID in WordUpStaffNonExistingTermineIDs.Keys)
				{
				WordUpStaffGoogleUpdate.DeleteCalendarEntry(EventID);
				}


			WPMediaGoogleCalendarUpdate.DoUpdate WordUpCommonGoogleUpdate = new DoUpdate();
			WordUpCommonGoogleUpdate.CalendarTitle = "word up!23 - Öffentliche Termine";
			if (WordUpStaffGoogleUpdate.ErrorsOccured)
				return false;
			Dictionary<String, Dictionary<String, String>> WordUpCommonGoogleExistingIDs
					= WordUpCommonGoogleUpdate.LoadUsedGoogleIDsInSpecificCalendar();
			Dictionary<String, Dictionary<String, String>> WordUpCommonNonExistingTermineIDs
					= SelectWordUpNonExistingWPMediaIDs(WordUpCommonGoogleExistingIDs, 1);
			foreach (String EventID in WordUpCommonNonExistingTermineIDs.Keys)
				{
				WordUpCommonGoogleUpdate.DeleteCalendarEntry(EventID);
				}
			return true;
			}
Пример #2
0
		//public bool DeleteGoogleCalendarItem (SymbolicCalendar SymbolicCalendarName, String GoogleID)
		//	{
		//	WPMediaGoogleCalendarUpdate.DoUpdate GoogleUpdate = new DoUpdate();
		//	switch (SymbolicCalendarName)
		//		{
		//		case SymbolicCalendar.AltErlaaInfo:
		//			GoogleUpdate.CalendarTitle = "Termine in Alt Erlaa";
		//			break;
		//		case SymbolicCalendar.WordUpPublic:
		//			GoogleUpdate.CalendarTitle = "word up!23 - Öffentliche Termine";
		//			break;
		//		case SymbolicCalendar.WordUpStaff:
		//			GoogleUpdate.CalendarTitle = "word up!23 Staff";
		//			break;
		//		}
		//	GoogleUpdate.DeleteCalendarEntry (GoogleID);
		//	return true;
		//	}


		public bool CleanupWPMediaCalendar ()
			{
			WPMediaGoogleCalendarUpdate.DoUpdate AltErlaaGoogleUpdate = new DoUpdate ();
			AltErlaaGoogleUpdate.CalendarTitle = "Termine in Alt Erlaa";

			if (AltErlaaGoogleUpdate.ErrorsOccured)
				return false;
			Dictionary<String, Dictionary<String, String>> WPMediaExistingGoogleIDs = AltErlaaGoogleUpdate.LoadUsedGoogleIDsInSpecificCalendar();
			Dictionary<String, Dictionary<String, String>> WPMediaNonExistingWPMediaIDs = SelectWPMediaNonExistingWPMediaIDs(WPMediaExistingGoogleIDs);
			foreach (String EventID in WPMediaNonExistingWPMediaIDs.Keys)
				{
				AltErlaaGoogleUpdate.DeleteCalendarEntry (EventID);
				}
			return true;
			}