Example #1
0
        public AddNewTimeTaskPageViewModel Map(ListTimeTaskItemViewModel taskViewModel, AddNewTimeTaskPageViewModel pageViewModel)
        {
            pageViewModel.TaskId                  = taskViewModel.Id;
            pageViewModel.TaskName                = taskViewModel.Name;
            pageViewModel.TaskType                = taskViewModel.Type;
            pageViewModel.TaskDescription         = taskViewModel.Description;
            pageViewModel.TaskTagsString          = taskViewModel.Tags.CreateTagsString();
            pageViewModel.TaskConstantTime        = taskViewModel.AssignedTime;
            pageViewModel.TaskHasConstantTime     = taskViewModel.IsAssignedTime;
            pageViewModel.TaskImmortality         = taskViewModel.IsImmortal;
            pageViewModel.TaskPrioritySliderValue = (int)taskViewModel.Priority;
            pageViewModel.TaskImportance          = taskViewModel.IsImportant;
            pageViewModel.TaskMaximumProgress     = taskViewModel.MaxProgress;
            pageViewModel.TaskProgress            = taskViewModel.Progress;

            return(pageViewModel);
        }
Example #2
0
 /// <summary>
 /// Maps a <see cref="ListTimeTaskItemViewModel"/> to a <see cref="TimeTaskContext"/> object
 /// </summary>
 /// <param name="viewmodel">The <see cref="ListTimeTaskItemViewModel"/> to map</param>
 /// <returns><see cref="TimeTaskContext"/></returns>
 public TimeTaskContext ReverseMap(ListTimeTaskItemViewModel viewmodel) => mMapper.Map <TimeTaskContext>(viewmodel);