Beispiel #1
0
        // POST: LeaveRequest
        public async Task <ActionResult> ApplyForLeave()
        {
            LeaveRequestViewModel leaveRequestViewModel = new LeaveRequestViewModel();
            List <LeaveType>      leaveTypes            = await _leaveTypeRepo.GetAllLeaveTypes();

            var leaveTypeViewModel = _mapper.Map <List <LeaveType>, List <LeaveTypesVM> >(leaveTypes);

            leaveRequestViewModel.LeaveTypes = leaveTypeViewModel;
            return(View(leaveRequestViewModel));
        }