예제 #1
0
        // GET: Bonuses/Edit/5
        public IActionResult Edit(long?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            //  var bonus = await _context.Bonuses.FindAsync(id);
            var bonus = bonusRepository.GetEdit(id);

            if (bonus == null)
            {
                return(NotFound());
            }
            ViewData["BonusTypeId"]    = new SelectList(bonusTypeRepository.GetBonusTypeList(), "Id", "Id", bonus.BonusTypeId);
            ViewData["EmployeeInfoId"] = new SelectList(employeeInfoRepository.GetEmployeeInfoList(), "Id", "Id", bonus.EmployeeInfoId);
            return(View(bonus));
        }