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));
        }
Esempio n. 2
0
 public async Task <OaLeaveShowDto> GetAsync(long id)
 {
     return(await leaveService.GetAsync(id));
 }