// GET: Investment/Edit/5 public ActionResult Edit(Guid id) { var investment = InvestmentRepository.GetInvestment(id); if (investment.CapitalDetails == null || investment.CapitalDetails.Count == 0) { investment.CapitalDetails = new List <CapitalDetail>(); investment.CapitalDetails.Add(new CapitalDetail { Description = "Cash" }); investment.CapitalDetails.Add(new CapitalDetail { Description = "Machinery" }); investment.CapitalDetails.Add(new CapitalDetail { Description = "Land Rental" }); investment.CapitalDetails.Add(new CapitalDetail { Description = "Utilities & Infrastructure" }); investment.CapitalDetails.Add(new CapitalDetail { Description = "Building" }); investment.CapitalDetails.Add(new CapitalDetail { Description = "Raw Material" }); } investment.CapitalDetails = investment.CapitalDetails.OrderBy(cd => cd.Description).ToList(); return(View(investment)); }
// GET: Investment/Details/5 public ActionResult Details(Guid id) { InvestmentViewModel investment = InvestmentRepository.GetInvestment(id); return(View(investment)); }
// GET: Investment/Delete/5 public ActionResult Delete(Guid id) { var investment = InvestmentRepository.GetInvestment(id); return(View(investment)); }