public async Task <IActionResult> Show(int?id) { OaLeaveShowDto model; if (id == null || id == 0) { model = new OaLeaveShowDto() { StartTime = DateTime.Now.AddDays(1), EndTime = DateTime.Now.AddDays(2) }; } else { model = await leaveService.GetAsync(id.Value); } return(View(model)); }
public async Task <OaLeaveShowDto> GetAsync(long id) { return(await leaveService.GetAsync(id)); }