public static void UpdateEvent(Event evnt, Schedule schedule, Options options,
                              bool updateSeries)
 {
     if (RemoteSettings.Service != null)
      {
     RemoteSettings.Service.SaveEventInfo(evnt.ToXml(), schedule == null ? string.Empty : schedule.ToXml(), options.ToXml(),
                                          updateSeries, RemoteSettings.ServiceCredentials);
     CacheManager.ClearAllCaches();
      }
      else
      {
     CalendarActions.UpdateEvent(evnt, schedule, options, updateSeries);
      }
 }
        public static void CreateEvent(Event ev, Schedule schedule, Options options)
        {
            if (RemoteSettings.Service != null)
             {
            RemoteSettings.Service.CreateEvent(ev.ToXml(),
                                               schedule == null ? string.Empty : schedule.ToXml(),
                                               options.ToXml(), RemoteSettings.ServiceCredentials);

            CacheManager.ClearAllCaches();
             }
             else
             {
            CalendarActions.CreateEvent(ev, schedule, options);
             }
        }