Пример #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;
 }
        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;
 }
 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;
 }
        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);
        }
        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);
        }
        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);
        }
        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;
 }
        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>();
 }
 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;
 }
 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;
                                 };
        }
        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
 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();
                                       };
        }