public async void ScanResult(Result result)
        {
            this.manager = new ListRoomManager();
            var reservation = await this.manager.GetRoomCurrentReservations(result.Text);

            switch (reservation.Status)
            {
            case StatusCode.Ok:
            {
                this.Sucess(reservation.Result, result);
                break;
            }

            case StatusCode.ConnectionProblem:
            {
                await this.DisplayAlert(HeadError, BodyInternetIsNotExist, Ok);

                break;
            }

            case StatusCode.Error:
            {
                await this.DisplayAlert(HeadError, BodyError, Ok);

                break;
            }

            case StatusCode.NoAuthorize:
            {
                await this.Navigation.PushAsync(new LoginPage());

                break;
            }
            }
        }
Exemple #2
0
 public AddReservationViewModel(
     SelectModel filterParameter,
     RoomViewModel roomModel,
     ListRoomManager roomManager,
     INavigationService navigationService) : base(navigationService)
 {
     this.model   = new AddReservationModel(filterParameter, roomModel);
     this.service = roomManager;
     this.AddReservationCommand = new Command(this.AddReservation);
     this.GoBackCommand         = new Command(this.GoBack);
 }
Exemple #3
0
        public SelectViewModel(ListRoomManager listRoomManager,
                               IProfileService profileService,
                               IReservationService reservationServise,
                               INavigationService navigationService,
                               SelectModel model) : base(navigationService)
        {
            this.model              = model;
            this.service            = listRoomManager;
            this.reservationServise = reservationServise;
            this.profileService     = profileService;

            this.GoToMyReservation   = new Command(this.GetMyReservation);
            this.GoToSearch          = new Command(this.Search);
            this.GoToCalendarCommand = new Command(this.GoToCalendar);
        }