コード例 #1
0
 public ActionResult Edit(LoanedItem loanedItem)
 {
     try
     {
         _loanedItemRepository.Merge(loanedItem);
         return RedirectToAction("Index");
     }
     catch
     {
         return View();
     }
 }
コード例 #2
0
        public ActionResult Create(LoanedItem loanedItem, int employeeId)
        {
            try
            {   
                //loanedItem.LoanedBy = _employeeRepository.GetById(employeeId);
                _loanedItemRepository.SaveOrUpdate(loanedItem);

                return RedirectToAction("Index");
            }
            catch
            {
                return View();
            }
        }