コード例 #1
0
        public ActionResult GetAllBusinessTrips(AllBusinessTripsCollectionViewModel businessTripsCollectionViewModel)
        {
            businessTripsCollectionViewModel.BusinessTrips =
                new BusinessTripCollectionModel().GetBusinessTripsBy(businessTripsCollectionViewModel.BusinessTripFilter, new CustomRoleProvider().GetRolesForUser(GetUserIdFromCookie().ToString()));

            return(View("AllBusinessTrips", businessTripsCollectionViewModel));
        }
コード例 #2
0
        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"));
        }