Ejemplo n.º 1
0
        // GET: OverTimes/Edit/5
        public IActionResult Edit(long?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            //  var overTime = await _context.OverTimes.FindAsync(id)
            var overTime = overTimeRepository.GetEdit(id);

            if (overTime == null)
            {
                return(NotFound());
            }
            ViewData["FromEmployeeInfoId"] = new SelectList(employeeInfoRepository.GetEmployeeInfoList(), "Id", "Id", overTime.FromEmployeeInfoId);
            ViewData["ToEmployeeInfoId"]   = new SelectList(employeeInfoRepository.GetEmployeeInfoList(), "Id", "Id", overTime.ToEmployeeInfoId);
            return(View(overTime));
        }