Example #1
0
        public async Task <IActionResult> GetLeaveType(int id)
        {
            try
            {
                var leaveType = await leaveTypeService.GetLeaveTypeById(id);

                if (leaveType == null)
                {
                    return(NotFound());
                }
                return(Ok(leaveType));
            }
            catch (Exception)
            {
                return(BadRequest());
            }
        }
        public ActionResult LeaveTypeEdit(int id)
        {
            var editLeaveType = _leaveTypeService.GetLeaveTypeById(id);

            return(View(editLeaveType));
        }
 public ActionResult <LeaveType> GetLeaveTypeById(int id)
 {
     return(_LeaveTypeService.GetLeaveTypeById(id));
 }