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; } } }
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); }
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); }