public ActionResult GetAllBusinessTrips(AllBusinessTripsCollectionViewModel businessTripsCollectionViewModel) { businessTripsCollectionViewModel.BusinessTrips = new BusinessTripCollectionModel().GetBusinessTripsBy(businessTripsCollectionViewModel.BusinessTripFilter, new CustomRoleProvider().GetRolesForUser(GetUserIdFromCookie().ToString())); return(View("AllBusinessTrips", businessTripsCollectionViewModel)); }
public ActionResult GetBy(string guid) { Guid parsedGuid; if (Guid.TryParse(guid, out parsedGuid)) { var businessTripsCollectionViewModel = new AllBusinessTripsCollectionViewModel { BusinessTripFilter = new BusinessTripFilter { UserId = guid } }; return(GetAllBusinessTrips(businessTripsCollectionViewModel)); } return(View("BusinessTripNotFound")); }