public async Task OnGetAsync(Guid id) { var dto = await _employeeAppService.GetEditorAsync(id); Employee = ObjectMapper.Map <GetEmployeeForEditorOutput, EmployeeEditViewModel>(dto); Employee.Id = id; Employee.Calendar = dto.IsGregorianCalendar ? Calendar.GregorianCalendar : Calendar.ChineseCalendar; Calendars = typeof(Calendar).GetDescriptionAndValue() .Select(r => new SelectListItem(r.Key, r.Value.ToString())).ToList(); }
public virtual async Task <GetEmployeeForEditorOutput> GetEditorAsync(Guid id) { return(await _employeeAppService.GetEditorAsync(id)); }