public DailySyncViewModel(DailySyncFrequency dailySyncFrequency)
 {
     _syncFrequency = dailySyncFrequency;
     TimeOfDay = dailySyncFrequency.TimeOfDay;
     DayGap = dailySyncFrequency.DayGap;
     EveryWeekday = dailySyncFrequency.EveryWeekday;
     CustomDay = dailySyncFrequency.CustomDay;
     IsModified = false;
 }
        public override SyncFrequency GetFrequency()
        {
            if (_syncFrequency == null)
            {
                _syncFrequency = new DailySyncFrequency();
            }

            if (IsModified)
            {
                var timeNow = DateTime.Now;
                _syncFrequency.StartDate = timeNow.Subtract(new TimeSpan(0, 0, timeNow.Second));
                _syncFrequency.EveryWeekday = EveryWeekday;
                _syncFrequency.CustomDay = CustomDay;
                _syncFrequency.DayGap = DayGap;
                _syncFrequency.TimeOfDay = TimeOfDay;
            }

            return _syncFrequency;
        }