private void SaveCalendarStatistic(DreamCalendar storedStatistic, Statistic_Add_Edit_PopUpViewModel statisticViewModel)
 {
     if (storedStatistic != null)
     {
         storedStatistic.BadDreamValue  = statisticViewModel.BadSleepLineValue;
         storedStatistic.GoodDreamValue = statisticViewModel.GoodSleepLineValue;
         _dreamCalendarService.UpdateStatisticPerDay(storedStatistic);
     }
     else
     {
         _dreamCalendarService.CreateStatisticPerDay(new DreamCalendar
         {
             Date           = this.CalendarModel.SelectedDateTime.ToString("d"),
             GoodDreamValue = statisticViewModel.GoodSleepLineValue,
             BadDreamValue  = statisticViewModel.BadSleepLineValue
         });
         CalendarModel.FilledDays.Add(new SpecialDate(DateTime.Now)
         {
             Selectable      = true,
             BackgroundColor = CustomColors.Green,
             TextColor       = CustomColors.Yellow
         });
         CalendarModel.RedrawSpecialDatesAction.Invoke();
     }
 }
 public void UpdateStatisticPerDay(DreamCalendar statistic)
 {
     _dreamCalendarRepository.Update(statistic);
 }