public ActionResult CompleteProject(int?id) { ViewBag.ProjectId = id.Value; SuccessRate s = new SuccessRate(); s.projectId = id.Value; return(View(s)); }
public ActionResult CompleteProjectConfirmed(SuccessRate success) { Output.Write(success.projectId + " : " + success.successRate); Project entity = Service.Get(success.projectId); entity.EndDate = DateTime.Now; entity.SuccessRate = success.successRate; Service.Update(entity, entity.ProjectId); return(RedirectToAction("Index")); }