예제 #1
0
 //
 // GET: /Platform/SysDepartment/Edit/5
 public ActionResult Edit(Guid? id)
 {
     var item = new Knowledge();
     if (id.HasValue)
     {
         item = _iKnowledgeService.GetById(id.Value);
     }
     return View(item);
 }
예제 #2
0
        public ActionResult Edit(Guid? id, Knowledge collection)
        {
            if (!ModelState.IsValid)
            {
                return View(collection);
            }

            _iKnowledgeService.Save(id, collection);
            _unitOfWork.Commit();

            return RedirectToAction("Index");
        }