public static CalendarEvent FromEvent(Event ev) {
			var result = new CalendarEvent();
			result.EntryId = ev.EntryId;
			result.StartTime = ev.EventDatesAndOptions.StartTime;
			result.Title = ev.Title;
			result.EventJson = RestUtil.SerializeJson<Event> (ev);
			return result;
		}
		public static List<DBCategory> FromEvent(Event ev) {
			var result = new List<DBCategory> ();
			foreach (var cat in ev.Categories) {
				var dbCat = new DBCategory ();
				dbCat.CategoryId = cat.CategoryId;
				dbCat.Name = cat.CatName;
				dbCat.UrlTitle = cat.CatUrlTitle;
				result.Add (dbCat);
			}
			return result;
		}
		public static List<CalendarEventCategory> FromEvent(Event ev) {
			var result = new List<CalendarEventCategory> ();
			var entryId = ev.EntryId;
			foreach (var cat in ev.Categories) {
				var evCat = new CalendarEventCategory ();
				evCat.EventId = entryId;
				evCat.CategoryId = cat.CategoryId;
				result.Add (evCat);
			}
			return result;
		}
		public void OpenEvent(Event ev) {
			this.eventIdForSegue = ev.EntryId;
			PerformSegue ("SegueToEvent", this);
		}
		public void OpenEvent(Event ev) {
			this.EventVal = ev.EntryId;
			PerformSegue ("segueCalActivity", this);
		}