コード例 #1
0
ファイル: EditModal.cshtml.cs プロジェクト: snowchenlei/Hcm
        public async Task <IActionResult> OnPostAsync()
        {
            var dto = ObjectMapper.Map <WorkExperienceUpdateViewModel, WorkExperienceUpdateDto>(WorkExperience);

            string[] times = WorkExperience.WorkTime
                             .Split(new char[] { '~' }, StringSplitOptions.RemoveEmptyEntries);

            dto.StartTime = Convert.ToDateTime(times[0] + " 00:00:00");
            dto.EndTime   = Convert.ToDateTime(times[1] + " 00:00:00");

            await _workExperienceAppService
            .UpdateAsync(WorkExperience.EmployeeId, WorkExperience.Id,
                         dto);

            return(NoContent());
        }
コード例 #2
0
 public virtual async Task <WorkExperienceListDto> UpdateAsync(Guid employeeId, Guid workExperienceId, WorkExperienceUpdateDto input)
 {
     return(await _workExperienceAppService.UpdateAsync(employeeId, workExperienceId, input));
 }