示例#1
0
 public static Calendar MapToCalendarFromCalendarVM(CalendarViewModel calendar)
 {
     Calendar calendarTMP = new Calendar();
     calendarTMP.CalendarColor = calendar.CalendarColor;
     calendarTMP.Text = calendar.Description;
     calendarTMP.Name = calendar.Name;
     calendarTMP.TimeZone = calendar.TimeZone;
     calendarTMP.Visibility = calendar.Visibility;
     return calendarTMP;
 }
示例#2
0
 // -------- Calendars --------
 public static CalendarViewModel MapToCalendarViewModel(Calendar calendar)
 {
     CalendarViewModel CVM = new CalendarViewModel();
     CVM.CalendarColor = calendar.CalendarColor;
     CVM.Description = calendar.Text;
     CVM.Name = calendar.Name;
     CVM.notificationSettings = new NotificationSettingsViewModel();
     CVM.TimeZone = calendar.TimeZone;
     CVM.Visibility = calendar.Visibility;
     return CVM;
 }