public ActionResult Detail(int id)
        {
            // var charityRepository = new MockCharityRepository();
            var charityRepository = new CharityRepository();

            var charity = charityRepository.Get(id);

            return View(charity);
        }
 public ActionResult Details(string id)
 {
     if (string.IsNullOrEmpty(id))
     {
         return (View("Review"));
     }
     int CharityRequestID = Convert.ToInt32(id);
     Models.CharityRepository repo = new CharityRepository();
     return View(repo.GetCharities(CharityRequestID));
 }
        public ActionResult List()
        {
            //using (ObjectContext context = new ObjectContext())
            //{
            //    //var query = context.CreateQuery<gc_CharityRequirements>().SelectMany();
            //}

            // var charityRepository = new MockCharityRepository();
            var charityRepository = new CharityRepository();

            List<CharityRequirement> charities = charityRepository.GetAllCharities().ToList();

            return View(charities);
        }
        public ActionResult SignUp(CharityRequirement charity, FormCollection form)
        {
            var infrastructure = SelectedTechnologies(form, "Infrastructure.");
            var support = SelectedTechnologies(form,"Support.");

            Validate(charity, infrastructure, support);

            if (ModelState.IsValid)
            {
                var charityRepository = new CharityRepository();
                charityRepository.Register(charity, infrastructure, support);
                charityRepository.Save();
                return View("ThankYou");
            }
            return View("Proposal", new CharitySignUpViewModel(charity));
        }
 public ActionResult Review()
 {
     Models.CharityRepository repo = new CharityRepository();
     return View(repo.GetAllCharities());
 }
 public ActionResult Final()
 {
     Models.CharityRepository repo = new CharityRepository();
        return View("Review",repo.GetFinalCharities());
 }