コード例 #1
0
        private void DeleteEvent(Google.Apis.Calendar.v3.Data.Event googleEvent)
        {
            PSCalendarContract.Dto.GoogleEvent @event = CalendarSyncBL.GetEvent(googleEvent.Id);
            CalendarCoreBL.Delete(@event.EventGuid);
            CalendarSyncBL.SyncAccountEventMarkAsDeleted(@event.GoogleCalendarEventId);

            CalendarSyncBL.UpdateLogItem(@event.EventGuid, googleEvent.Updated.Value);
        }
コード例 #2
0
        private void AddGoogleEventToPSTable(string calendarId, Google.Apis.Calendar.v3.Data.Event googleEvent)
        {
            PSCalendarContract.Dto.Event @event = ConvertEvent(googleEvent);
            @event.Type = this.CalendarList.Single(x => x.Value == calendarId).Key;
            Guid eventGuid = CalendarCoreBL.AddEvent(@event);

            CalendarSyncBL.AddSyncAccountEvent(Account, eventGuid, googleEvent.Id, calendarId);
            CalendarSyncBL.UpdateLogItem(eventGuid, googleEvent.Updated.Value);
        }