Example #1
0
        public PartialViewResult PageVolunteers(int offSet = 0, int limit = 5)
        {
            var repository = new VolunteersRepository();
            var model      = repository.GetVolunteers(offSet, limit);

            return(PartialView("Partials/VolunteersTable", model));
        }
Example #2
0
        public PartialViewResult CreateVolunteer(Volunteer volunteer)
        {
            var repository = new VolunteersRepository();

            repository.CreateVolunteer(volunteer);
            var model = repository.GetVolunteers();

            return(PartialView("Partials/VolunteersTable", model));
        }
Example #3
0
        public ActionResult Index()
        {
            var             repository = new VolunteersRepository();
            VolunteersModel model      = repository.GetVolunteers();

            if (model != null)
            {
                model.FoodBanks = new FoodBanksRepository().GetFoodBanks(0, 1000).FoodBanks;
            }

            return(View("Index", model));
        }