コード例 #1
0
 public GameService(IGameLoader gameLoaderService, IHotelService hotelService, IJailService jailService, ILotteryService lotteryService)
 {
     _gameLoaderService = gameLoaderService;
     _hotelService      = hotelService;
     _jailService       = jailService;
     _lotteryService    = lotteryService;
 }
コード例 #2
0
        //private readonly IUnitOfWork _unitOfWork;

        public HotelController(
            IHotelService hotelService
            /* IUnitOfWork unitOfWork*/)
        {
            _hotelService = hotelService;
            //_unitOfWork = unitOfWork;
        }
コード例 #3
0
 public CommentController(ICommentService commentService, IMapper mapper, IHotelService hotelService)
 {
     _commentService = commentService;
     _mapper         = mapper;
     _hotelService   = hotelService;
     _lang           = Thread.CurrentThread.CurrentCulture.Name;
 }
コード例 #4
0
        public static HotelSearchResponse Search(HotelSearchRequest req, string SID)
        {
            var UName = ConfigurationSettings.AppSettings["TBOUserName"];
            var UPass = ConfigurationSettings.AppSettings["TBOPassword"];

            IHotelService proxy = TBOCredentials.CreateProxy();

            req.Credentials = new AuthenticationData()
            {
                UserName = UName,
                Password = UPass
            };

            ProviderLogger.LogSearchProviderReq(req, SID);

            HotelSearchResponse resp      = new HotelSearchResponse();
            Stopwatch           stopWatch = new Stopwatch();

            stopWatch.Start();
            resp = proxy.HotelSearch(req);


            stopWatch.Stop();
            TimeSpan ts1 = stopWatch.Elapsed;

            ProviderLogger.LogSearchProviderRsp(resp, SID, ts1.ToString());

            return(resp);
        }
コード例 #5
0
 public HotelController(
     IHotelService hotelService,
     UserManager <ApplicationUser> userManager)
 {
     this.hotelService = hotelService;
     this.userManager  = userManager;
 }
コード例 #6
0
 public LoginViewModel(LoginView loginView)
 {
     view = loginView;
     ReadOwnerUsernameAndPass();
     hotelService = new HotelService();
     users        = hotelService.GetUsers();
 }
コード例 #7
0
        public static HotelBookResponse Booking(HotelBookRequest req, string SID)
        {
            var UName = ConfigurationSettings.AppSettings["TBOUserName"];
            var UPass = ConfigurationSettings.AppSettings["TBOPassword"];

            IHotelService proxy = TBOCredentials.CreateProxy();

            req.Credentials = new AuthenticationData()
            {
                UserName = UName,
                Password = UPass
            };
            req.RestrictDuplicateBooking = true;
            ProviderLogger.LogHotelBookReq(req, SID);
            HotelBookResponse resp      = new HotelBookResponse();
            Stopwatch         stopwatch = new Stopwatch();

            stopwatch.Start();
            resp = proxy.HotelBook(req);
            stopwatch.Stop();
            TimeSpan ts1          = stopwatch.Elapsed;
            TimeSpan baseInterval = new TimeSpan(0, 0, 60);

            if (ts1 > baseInterval)
            {
                BookDetail.DetailService(req.ClientReferenceNumber);
            }
            ProviderLogger.LogHotelBookResp(resp, SID);

            return(resp);
        }
コード例 #8
0
 public HotelFacade(IHotelService HotelService, IHotelTranslationService typeTranslationService, IManageStorage manageStorage, IHotelFeatureService hotelFeatureService)
 {
     _hotelService            = HotelService;
     _hotelTranslationService = typeTranslationService;
     _manageStorage           = manageStorage;
     _hotelFeatureService     = hotelFeatureService;
 }
コード例 #9
0
 public HotelFacade(IHotelService hotelService, IUnitOfWorkAsync unitOfWork, IHotelTranslationService typeTranslationService, IManageStorage manageStorage, IHotelFeatureService hotelFeatureService) : base(unitOfWork)
 {
     _hotelService            = hotelService;
     _hotelTranslationService = typeTranslationService;
     _manageStorage           = manageStorage;
     _hotelFeatureService     = hotelFeatureService;
 }
コード例 #10
0
        public WorldService(ICompanyEmployeeRepository companyEmployeeRepository, IContractRepository contractRepository, IContractService contractService,
                            ICitizenRepository citizenRepository, IConfigurationRepository configurationRepository, IEquipmentRepository equipmentRepository,
                            IPartyService partyService, ICongressCandidateService congressCandidateService, ICongressVotingService congressVotingService,
                            ICountryService countryService, IBattleService battleService, IRegionService regionService, ICompanyService companyService,
                            IEmbargoService embargoService, IWarService warService, IEmployeeService employeeService, IMPPService mppService, IWalletService walletService,
                            INewDayRepository newDayRepository, IHotelService hotelService, IHouseService houseService)
        {
            this.citizenRepository         = citizenRepository;
            this.configurationRepository   = configurationRepository;
            this.equipmentRepository       = equipmentRepository;
            this.companyEmployeeRepository = companyEmployeeRepository;
            this.contractRepository        = contractRepository;
            this.contractService           = contractService;
            this.partyService             = partyService;
            this.congressCandidateService = congressCandidateService;
            this.congressVotingService    = congressVotingService;
            this.countryService           = countryService;
            this.battleService            = battleService;
            this.regionService            = regionService;
            this.companyService           = companyService;
            this.embargoService           = embargoService;
            this.warService       = warService;
            this.employeeService  = employeeService;
            this.mppService       = mppService;
            this.walletService    = Attach(walletService);
            this.newDayRepository = newDayRepository;
            this.hotelService     = hotelService;
            this.houseService     = houseService;

            citizenRepository.SetTimeout(300);
            equipmentRepository.SetTimeout(300);
        }
コード例 #11
0
 public VacationPartFactory(IHotelService hotelService, IHotelSelector hotelSelector,
                            IAirplaneService airplaneService)
 {
     this.hotelService    = hotelService;
     this.hotelSelector   = hotelSelector;
     this.airplaneService = airplaneService;
 }
 public ReservationController(UserManager<User> userManager, IReservationService reservationService, IHotelService hotelService, ITaxiReservationService taxiReservationService)
 {
     this.userManager = userManager;
     this.reservationService = reservationService;
     this.hotelService = hotelService;
     this.taxiReservationService = taxiReservationService;
 }
コード例 #13
0
 public HotelController(IHotelService hotelService,
                        ICityService cityService, IUserService userService)
     : base(userService)
 {
     this.hotelService = hotelService;
     this.cityService  = cityService;
 }
コード例 #14
0
 public HotelPropertyTypeService(ApplicationContext applicationContext, IPropertyTypeService propertyTypeService,
                                 IHotelService hotelService)
 {
     this.applicationContext  = applicationContext;
     this.propertyTypeService = propertyTypeService;
     this.hotelService        = hotelService;
 }
コード例 #15
0
 public HomeController(Context con, ICommonService commonService, IHotelService hotelService, IUserService userService)
     : base(userService)
 {
     this.con           = con;
     this.commonService = commonService;
     this.hotelService  = hotelService;
 }
コード例 #16
0
 public BasketController(IOrderService orderService, IMapper mapper, IHotelService hotelService, IRoomService roomService)
 {
     _orderService = orderService;
     _mapper       = mapper;
     _hotelService = hotelService;
     _roomService  = roomService;
 }
コード例 #17
0
        public RoomServiceDialog(
            BotSettings settings,
            BotServices services,
            ResponseManager responseManager,
            ConversationState conversationState,
            UserState userState,
            IHotelService hotelService,
            IBotTelemetryClient telemetryClient)
            : base(nameof(RoomServiceDialog), settings, services, responseManager, conversationState, userState, hotelService, telemetryClient)
        {
            var roomService = new WaterfallStep[]
            {
                HasCheckedOut,
                MenuPrompt,
                ShowMenuCard,
                AddItemsPrompt,
                ConfirmOrderPrompt,
                EndDialog
            };

            HotelService = hotelService;

            AddDialog(new WaterfallDialog(nameof(RoomServiceDialog), roomService));
            AddDialog(new TextPrompt(DialogIds.MenuPrompt, ValidateMenuPrompt));
            AddDialog(new TextPrompt(DialogIds.AddMore, ValidateAddItems));
            AddDialog(new ConfirmPrompt(DialogIds.ConfirmOrder));
            AddDialog(new TextPrompt(DialogIds.FoodOrderPrompt, ValidateFoodOrder));
        }
コード例 #18
0
 public SettingsController(ICityService cityService, IHotelService hotelService, ICountryService countryService, IUserService userService)
     : base(userService)
 {
     this.cityService    = cityService;
     this.hotelService   = hotelService;
     this.countryService = countryService;
 }
コード例 #19
0
 // Hotel controller constructor
 public BaseController(
     IHotelService hotelServ,
     IFeedbackService feedbackServ)
 {
     hotelService    = hotelServ;
     feedbackService = feedbackServ;
 }
コード例 #20
0
        public static HotelBookingDetailResponse DetailService(string CRefNo)
        {
            var UName = ConfigurationSettings.AppSettings["TBOUserName"];
            var UPass = ConfigurationSettings.AppSettings["TBOPassword"];

            IHotelService             proxy = TBOCredentials.CreateProxy();
            HotelBookingDetailRequest req   = new HotelBookingDetailRequest
            {
                Credentials = new AuthenticationData()
                {
                    UserName = UName,
                    Password = UPass
                },
                //BookingId = BookId,
                //ConfirmationNo = ConfirmNo,
                ClientReferenceNumber = CRefNo
            };

            var sid = new Guid();

            ProviderLogger.LogBookingDetailReq(req, sid.ToString());
            HotelBookingDetailResponse resp = new HotelBookingDetailResponse();

            resp = proxy.HotelBookingDetail(req);
            ProviderLogger.LogBookingDetailRsp(resp, sid.ToString());

            return(resp);
        }
コード例 #21
0
        public static HotelCancelResponse Cancel(string ConfirmNo)
        {
            var UName = ConfigurationSettings.AppSettings["TBOUserName"];
            var UPass = ConfigurationSettings.AppSettings["TBOPassword"];

            HotelCancelRequest req = new HotelCancelRequest
            {
                Credentials = new AuthenticationData()
                {
                    UserName = UName,
                    Password = UPass
                },
                //RequestType = "HotelCancel",
                ConfirmationNo = ConfirmNo,
                Remarks        = "test cancel"
            };

            IHotelService proxy = TBOCredentials.CreateProxy();
            var           sid   = new Guid();

            ProviderLogger.LogHotelCancelReq(req, sid.ToString());
            HotelCancelResponse resp = new HotelCancelResponse();

            resp = proxy.HotelCancel(req);
            ProviderLogger.LogHotelCancelResp(resp, sid.ToString());
            return(resp);
        }
コード例 #22
0
        public static HotelRoomAvailabilityResponse Availabilty(string SessionId, int ResIndex, string HotelCode, string SID)
        {
            var UName = ConfigurationSettings.AppSettings["TBOUserName"];
            var UPass = ConfigurationSettings.AppSettings["TBOPassword"];
            HotelRoomAvailabilityRequest req = new HotelRoomAvailabilityRequest
            {
                SessionId   = SessionId,
                ResultIndex = ResIndex,
                HotelCode   = HotelCode,
                IsCancellationPolicyRequired = true, // already come in Pricing
                Credentials = new AuthenticationData()
                {
                    UserName = UName,
                    Password = UPass
                }
            };

            ProviderLogger.LogRoomAvailabiltyReq(req, SID);

            IHotelService proxy = TBOCredentials.CreateProxy();
            HotelRoomAvailabilityResponse resp = new HotelRoomAvailabilityResponse();

            resp = proxy.AvailableHotelRooms(req);
            ProviderLogger.LogRoomAvailabilityProviderRsp(resp, SID);

            return(resp);
        }
コード例 #23
0
        public ExtendStayDialog(
            BotSettings settings,
            BotServices services,
            ResponseManager responseManager,
            ConversationState conversationState,
            UserState userState,
            IHotelService hotelService,
            IBotTelemetryClient telemetryClient)
            : base(nameof(ExtendStayDialog), settings, services, responseManager, conversationState, userState, hotelService, telemetryClient)
        {
            var extendStay = new WaterfallStep[]
            {
                HasCheckedOut,
                CheckEntities,
                ExtendDatePrompt,
                ConfirmExtentionPrompt,
                EndDialog
            };

            HotelService = hotelService;

            AddDialog(new WaterfallDialog(nameof(ExtendStayDialog), extendStay));
            AddDialog(new ConfirmPrompt(DialogIds.CheckNumNights, ValidateCheckNumNightsPrompt));
            AddDialog(new DateTimePrompt(DialogIds.ExtendDatePrompt, ValidateDateAsync));
            AddDialog(new ConfirmPrompt(DialogIds.ConfirmExtendStay, ValidateConfirmExtensionAsync));
        }
コード例 #24
0
        public HospitalityDialogBase(
            string dialogId,
            BotSettings settings,
            BotServices services,
            ResponseManager responseManager,
            ConversationState conversationState,
            UserState userState,
            IHotelService hotelService,
            IBotTelemetryClient telemetryClient)
            : base(dialogId)
        {
            Settings          = settings;
            Services          = services;
            ResponseManager   = responseManager;
            StateAccessor     = conversationState.CreateProperty <HospitalitySkillState>(nameof(HospitalitySkillState));
            UserStateAccessor = userState.CreateProperty <HospitalityUserSkillState>(nameof(HospitalityUserSkillState));
            TelemetryClient   = telemetryClient;
            HotelService      = hotelService;

            // NOTE: Uncomment the following if your skill requires authentication
            // if (!Settings.OAuthConnections.Any())
            // {
            //     throw new Exception("You must configure an authentication connection before using this component.");
            // }
            //
            // AddDialog(new MultiProviderAuthDialog(services));
        }
コード例 #25
0
 public HotelsController(IHotelService hotelService, IImageService imageService, IThumbnailService thumbnailService, IPropertyTypeService propertyTypeService)
 {
     this.hotelService        = hotelService;
     this.imageService        = imageService;
     this.thumbnailService    = thumbnailService;
     this.propertyTypeService = propertyTypeService;
 }
コード例 #26
0
        public HospitalityUserSkillState(IHotelService hotelService)
        {
            CheckedOut   = false;
            LateCheckOut = false;

            // '?' for serialization
            UserReservation = hotelService?.GetReservationDetails().Result;
        }
コード例 #27
0
 public RoomController(IRoomService roomService,
                       IHotelService hotelService,
                       IRoomTypeService roomTypeService)
 {
     this.roomService     = roomService;
     this.hotelService    = hotelService;
     this.roomTypeService = roomTypeService;
 }
コード例 #28
0
 public RoomController(IRoomService roomService,
     IHotelService hotelService,
     IRoomTypeService roomTypeService)
 {
     this.roomService = roomService;
     this.hotelService = hotelService;
     this.roomTypeService = roomTypeService;
 }
コード例 #29
0
 public TourManagementController(ITourService tourService, ICityService cityService, IHotelService hotelService)
 {
     this.tourService = tourService;
     this.cityService = cityService;
     this.hotelService = hotelService;
     Mapper.CreateMap<TourViewModel, TourDto>();
     Mapper.CreateMap<TourDto, TourViewModel>();
 }
コード例 #30
0
 public HabitacionController(IHabitacionService habitacionService,
                             ITipoHabitacionService tipoHabitacionService,
                             IHotelService hotelService)
 {
     _habitacionService     = habitacionService;
     _tipoHabitacionService = tipoHabitacionService;
     _hotelService          = hotelService;
 }
        public BookingViewModel(
            IHotelService hotelService)
        {
            _hotelService = hotelService;

            _cities      = new List <Models.City>();
            _suggestions = new List <string>();
        }
コード例 #32
0
        public HotelServiceTest()
        {
            var services = new ServiceCollection();

            services.AddScoped <IHotelRepository, HotelRepository>();
            services.AddScoped <IHotelService, HotelService>();
            _hotelService = services.BuildServiceProvider().GetRequiredService <IHotelService>();
        }
コード例 #33
0
 public GeoManagementController(
     ICountryService countryService,
     ICityService cityService,
     IHotelService hotelService)
 {
     this.countryService = countryService;
     this.cityService = cityService;
     this.hotelService = hotelService;
 }
コード例 #34
0
 public DestinationController(
     IOrchardServices services, 
     IDestinationService destinationService,
     IHotelService hotelService,
     IDestinationPathConstraint destinationPathConstraint, 
     IShapeFactory shapeFactory,
     ISiteService siteService) {
     this.services = services;
     this.destinationService = destinationService;
     this.hotelService = hotelService;
     this.siteService = siteService;
     this.Logger = NullLogger.Instance;
     this.Shape = shapeFactory;
 }
コード例 #35
0
        public MainModule(IHotelService hotelService)
        {
            Get["/"] = _ =>
                           {
                               Response resp = View["Index"];
                               resp.ContentType = "text/html; charset=utf-8";
                               return resp;
                           };

            Get["/hotels/"] = _ =>
                                 {
                                     Response resp = View["Hotels"];
                                     resp.ContentType = "text/html; charset=utf-8";
                                     return resp;
                                 };
        }
コード例 #36
0
        public HotelPartHandler(
            IDestinationService destinationService, IHotelService hotelService, RequestContext requestContext)
        {
            this.destinationService = destinationService;
            this.hotelService = hotelService;

            OnGetDisplayShape<HotelPart>(SetModelProperties);
            OnGetEditorShape<HotelPart>(SetModelProperties);
            OnUpdateEditorShape<HotelPart>(SetModelProperties);

            //OnCreated<HotelPart>((context, part) => UpdateBlogPostCount(part));
            //OnPublished<HotelPart>((context, part) => UpdateBlogPostCount(part));
            //OnUnpublished<HotelPart>((context, part) => UpdateBlogPostCount(part));
            //OnVersioned<HotelPart>((context, part, newVersionPart) => UpdateBlogPostCount(newVersionPart));
            //OnRemoved<HotelPart>((context, part) => UpdateBlogPostCount(part));

            OnRemoved<DestinationPart>(
                (context, b) =>
                hotelService.Get(context.ContentItem.As<DestinationPart>()).ToList().ForEach(
                    blogPost => context.ContentManager.Remove(blogPost.ContentItem)));
        }
コード例 #37
0
ファイル: HotelController.cs プロジェクト: kjelliver/Hulen
 public HotelController(IHotelService hotelService)
 {
     _hotelService = hotelService;
 }
コード例 #38
0
 public HotelController(IHotelService hotelService, IHotelChainService hotelChainService)
 {
     this.hotelService = hotelService;
     this.hotelChainService = hotelChainService;
 }
コード例 #39
0
 private void ListRoom_Loaded(object sender, RoutedEventArgs e)
 {
     this._hotelService = new HotelServiceClient();
     RoomDTO[] rooms = this._hotelService.SelectAll();
     ListRoom.ItemsSource = rooms;
 }
コード例 #40
0
 public HotelController(IHotelService ause)
 {
     this.ause = ause;
 }
コード例 #41
0
        public HotelApiModule(IHotelService hotelService)
            : base("/api/hotel")
        {
            Get["/"] = _ =>
                           {
                               string q = null;
                               int p = 0;
                               string f = null;
                               if (Request.Query["q"] != null)
                               {
                                   q = Request.Query["q"];
                               }
                               if (Request.Query["p"] != null)
                               {
                                   p = Request.Query["p"];
                               }
                               if (Request.Query["f"])
                               {
                                   f = Request.Query["f"];
                               }
                               return Response.AsJson(hotelService.FindHotels(q, f!=null ? f.Split(',') : new string[0], p));
                           };

            Get["/{hotelId}"] = _ =>
                                    {
                                        int hotelId = Context.Parameters["hotelId"];

                                        return Response.AsJson(hotelService.GetHotel(hotelId));
                                    };
            Get["/history"] = _ =>
                                  {
                                      return Response.AsJson(hotelService.GetHistory(0));
                                  };

            Post["/"] =
            Post["/{hotelId}"] = _ =>
                                     {
                                         HotelModel model = this.Bind();
                                         int hotelId = model.Id;
                                         if (hotelId == 0 && Context.Parameters["hotelId"] != null)
                                         {
                                             hotelId = Context.Parameters["hotelId"] ?? 0;
                                         }
                                         try
                                         {
                                             if (hotelId == 0)
                                                 hotelId = hotelService.AddHotel(model.Name, model.Description, model.ResortName, model.Image, model.Latitude, model.Longitude);
                                             else
                                                 hotelService.UpdateHotel(hotelId, model.Name, model.Description, model.Image);

                                             if (model.Facts != null)
                                             {
                                                 hotelService.SetHotelFacts(hotelId, model.Facts);
                                             }

                                             return Response.AsJson(new { HotelId = hotelId });
                                         }
                                         catch (InvalidOperationException ex)
                                         {
                                             var response = Response.AsJson(new { ex.Message });
                                             return response.StatusCode = HttpStatusCode.NotFound;
                                         }
                                     };

            Delete["/{hotelId}"] = _ =>
                                       {
                                           int hotelId = Context.Parameters["hotelId"];
                                           hotelService.DeleteHotel(hotelId);

                                           var response = new Response();
                                           response.StatusCode = HttpStatusCode.Accepted;

                                           return new Response();
                                       };
        }