Beispiel #1
0
        // 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));
        }
Beispiel #2
0
        // GET: Investment/Details/5
        public ActionResult Details(Guid id)
        {
            InvestmentViewModel investment = InvestmentRepository.GetInvestment(id);

            return(View(investment));
        }
Beispiel #3
0
        // GET: Investment/Delete/5
        public ActionResult Delete(Guid id)
        {
            var investment = InvestmentRepository.GetInvestment(id);

            return(View(investment));
        }