Exemplo n.º 1
0
        public ActionResult FlightsWithCheckinInformationIndex(
            [Bind()] FlightsWithCheckinInformationLiveContract contract,
            Guid?dillToDiffrentiateFromHttpGet
            )
        {
            Guid userId = Logging.UserId(User.Identity, ViewBag);

            if (contract.FromDateTime == DateTime.MinValue)
            {
                contract.FromDateTime = DateTime.UtcNow.Date;
            }

            if (contract.UntilDateTime == DateTime.MinValue)
            {
                contract.UntilDateTime = contract.FromDateTime.AddDays(1);
            }

            contract.Flights =
                new FlightSearchService().FlightsWithCheckinInformation(
                    Guid.Empty,
                    Guid.Empty,
                    contract.FromDateTime,
                    contract.UntilDateTime
                    );

            return(View(
                       MVCHelper.Resolve(Request, "Checkin", "FlightsWithCheckinInformationIndex"),
                       contract
                       ));
        }
Exemplo n.º 2
0
        public ActionResult FlightsWithCheckinInformationIndex(
            [Bind()] FlightsWithCheckinInformationLiveContract contract
            )
        {
            // get user id in order to trigger registration of user ( and hopefully fill the viewbag with user id )
            Logging.UserId(User.Identity, ViewBag);

            // default date's
            if (contract.FromDateTime == DateTime.MinValue)
            {
                contract.FromDateTime = DateTime.UtcNow.Date;
            }

            if (contract.UntilDateTime == DateTime.MinValue)
            {
                contract.UntilDateTime = DateTime.UtcNow.Date.AddDays(1);
            }

            contract.Flights =
                new FlightSearchService().FlightsWithCheckinInformation(
                    Guid.Empty,
                    Guid.Empty,
                    contract.FromDateTime,
                    contract.UntilDateTime
                    );

            return(View(
                       MVCHelper.Resolve(Request, "Checkin", "FlightsWithCheckinInformationIndex"),
                       contract
                       ));
        }