// GET: LeaveTypesController/Edit/5
        public async Task <ActionResult> EditMauHopDong(string id)
        {
            //if (!(await _leaveTypeRepository.isExist(id)))
            //{
            //    return NotFound();
            //}
            //var leavetype = await _leaveTypeRepository.FindById(id);
            //var model = _mapper.Map<LeaveTypeVM>(leavetype);

            if (!(await _mauHopDongRepository.isExist(id)))
            {
                return(NotFound());
            }

            var mauHopDong = await _mauHopDongRepository.FindById(id);

            var model = _mapper.Map <CreateEditMauHopDongVM>(mauHopDong);

            model = await AddLoaiHopDongToCreateEditMauHopDongVM(model);


            return(View(model));
        }