public async Task onsomecomandAsync()
        {
            App.WaitScreenStart(Translator.getText("Loading"));

            lstrequestsAccepted = new ObservableCollection <SelectedUser>();
            ApiService _apiService = new ApiService();


            useraccept = await _apiService.getRequestesAcceptedbyTravelerAsync(IdInfo);

            Users_Ratings users_Ratings = new Users_Ratings();

            if (useraccept.user != null)
            {
                users_Ratings = await _apiService.getUserRatings(useraccept.travelerSpecs.Id, IdInfo.Id);
            }


            if (useraccept.user != null)
            {
                firstname  = useraccept.user.FirstName;
                lastname   = useraccept.user.LastName;
                FirstName += " " + lastname;
            }
            if (useraccept.travelerSpecs != null)
            {
                datefrom = useraccept.travelerSpecs.FromDate;
                dateto   = useraccept.travelerSpecs.ToDate;
                status   = useraccept.travelerSpecs.status;
            }

            if (useraccept.user != null)
            {
                image = (useraccept.user.UserPhoto == null) ? "giphy.gif" : ImageManager.BytesToImage(useraccept.user.UserPhoto);
            }



            showclick = (status == 9 || IdInfo.status == 9) ? true : false;
            showcchat = (status < 9 && IdInfo.status != 9) ? true : false;


            string message = (useraccept.travelerSpecs != null)? "User-" + users_Ratings.Rating : "NoUser-" + users_Ratings.Rating;

            MessagingCenter.Send <RequestInfoPageViewModel, string>(this, "UserNoUser", message);



            //}
            App.WaitScreenStop();
            //return UserAccept;
        }
        internal async Task <string> SendRating(SelectedUser ob, RequestSpecs IdInfo)
        {
            ApiService _apiservice = new ApiService();

            Users_Ratings users_Ratings = new Users_Ratings();

            users_Ratings.Rating     = Rating;
            users_Ratings.IdRequest  = IdInfo.Id;
            users_Ratings.IdTravel   = ob.travelerSpecs.Id;
            users_Ratings.IdTraveler = 0;



            string response = await _apiservice.SendRating(users_Ratings);

            return(response);
        }
        public RattingBarViewModal(SelectedUser ob)
        {
            FirstName = ob.user.FirstName;
            LastName  = ob.user.LastName;
            Image     = ob.image;

            selectedstar1 = false;
            selectedstar2 = false;
            selectedstar3 = false;
            selectedstar4 = false;
            selectedstar5 = false;
            starimage1    = "emptystar.png";
            starimage2    = "emptystar.png";
            starimage3    = "emptystar.png";
            starimage4    = "emptystar.png";
            starimage5    = "emptystar.png";
            FirstStar     = Translator.getText("Bad");
            SecondStar    = Translator.getText("Regular");
            ThirdStar     = Translator.getText("Good");
            FourStar      = Translator.getText("VeryGood");
            FiveStar      = Translator.getText("Excellent");
        }
示例#4
0
 public DetailAcceptedPageViewModel(SelectedUser ob)
 {
     lstrequestsAccepted = new ObservableCollection <SelectedUser>();
     lstrequestsAccepted.Add(ob);
 }