Пример #1
0
 public static RepeatableSettingsViewModel MapToRepeatableSettingsViewModel(Repeatable repeatable)
 {
     RepeatableSettingsViewModel repeatableSettingsVM = new RepeatableSettingsViewModel();
     repeatableSettingsVM.Id = repeatable.Id;
     repeatableSettingsVM.Period = repeatable.Period;
     repeatableSettingsVM.RepeatCount = repeatable.RepeatCount;
     return repeatableSettingsVM;
 }
Пример #2
0
 public static Repeatable MapToRepeatable(RepeatableSettingsViewModel repeatableSettingsVM)
 {
     Repeatable repeatable = new Repeatable();
     repeatable.Period = repeatableSettingsVM.Period;
     if (repeatableSettingsVM.RepeatCount != null)
     {
         repeatable.RepeatCount = repeatableSettingsVM.RepeatCount;
     }
     else
     {
         //TODO: calculate repeat count using date
         throw new NotImplementedException();
     }
     return repeatable;
 }