// // GET: /Platform/ProjectFinancial/Edit/5 public ActionResult Edit(Guid? id) { var item = new ProjectFinancial(); if (id.HasValue) { item = _iProjectFinancialService.GetById(id.Value); } ViewBag.ProjectInfoId = new SelectList( _iProjectInfoService.GetAll( a => a.ProjectUsers.Any(b => b.SysUserId == _iUserInfo.UserId && !b.Follow)), "Id", "ProjectName", item.ProjectInfoId); return View(item); }
public ActionResult Edit(Guid? id, ProjectFinancial collection) { if (!ModelState.IsValid) { Edit(id); return View(collection); } _iProjectFinancialService.Save(id, collection); _unitOfWork.Commit(); return RedirectToAction("Index"); }