public PartialViewResult UpdateVolunteer( Volunteer volunteer ) { var repository = new VolunteersRepository(); repository.UpdateVolunteer( volunteer ); var model = repository.GetVolunteer( volunteer.Id ); return PartialView( "Partials/VolunteerTableRow", model.Volunteer ); }
public PartialViewResult GetVolunteerForEdit( int id ) { var repository = new VolunteersRepository(); var model = repository.GetVolunteer( id ); if ( model != null ) model.FoodBanks = new FoodBanksRepository().GetFoodBanks( 0, 1000 ).FoodBanks; return PartialView( "Partials/Volunteer", model ); }