Exemple #1
0
        public void Insert(PassengerParam passengerParam)
        {
            try
            {
                new HttpClientHelper(UserInfoMapping.MapToUserInfo()).Post(
                    HttpUrlHelper.Post(AppConstant.RestUrl, "Passenger", "Insert"), passengerParam);



                MapToUserInfo(passengerParam);

                var user = new User()
                {
                    Id = passengerParam.UserParam.Id,
                    IsAuthenticated = true,
                    Password        = passengerParam.UserParam.Password,
                    Language        = passengerParam.UserParam.Language,
                    Mobile          = passengerParam.UserParam.Mobile
                };
                _userRepository.Insert(user);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Exemple #2
0
        public void InsertTripPassengerScore(Guid tripId, double passengerScore)
        {
            var tripParam = new TripParam()
            {
                Id             = tripId,
                PassengerScore = passengerScore
            };

            new HttpClientHelper(UserInfoMapping.MapToUserInfo()).Post(HttpUrlHelper.Post(AppConstant.RestUrl, "Trip", "InsertTripPassengerScore"), tripParam);
        }
Exemple #3
0
 public void Insert(TripParam tripParam)
 {
     try
     {
         new HttpClientHelper(UserInfoMapping.MapToUserInfo()).Post(HttpUrlHelper.Post(AppConstant.RestUrl, "Trip", "Insert"), tripParam);
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
 public void AddOrUpdate(UserTurnoverParam turnoverParam)
 {
     try
     {
         new HttpClientHelper(UserInfoMapping.MapToUserInfo()).Post(
             HttpUrlHelper.Post(AppConstant.RestUrl, "PassengerTurnover", "AddOrUpdate"), turnoverParam);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
 public void Insert(PassengerMessageParam message)
 {
     try
     {
         //new HttpClientHelper(UserInfoMapping.MapToUserInfo()).Post(HttpUrlHelper.Post(AppConstant.RestUrl,"Message","Create"),message);
         new HttpClientHelper(UserInfoMapping.MapToUserInfo()).Post(
             HttpUrlHelper.Post(AppConstant.RestUrl, "Message", "Create"), message);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Exemple #6
0
        public void DriverAccept(Guid tripId, Guid driverId)
        {
            var tripParam = new TripParam()
            {
                Id          = tripId,
                DriverParam = new DriverParam()
                {
                    Id = driverId
                }
            };

            new HttpClientHelper(UserInfoMapping.MapToUserInfo()).Post(HttpUrlHelper.Post(AppConstant.RestUrl, "Trip", "DriverAccept"), tripParam);
        }
 public void Insert(SelectedAddressParam model)
 {
     try
     {
         var user = _userService.GetPassengerByMobile(UserInfo.Instance.Mobile);
         model.User = user.UserParam;
         new HttpClientHelper(UserInfoMapping.MapToUserInfo()).Post(
             HttpUrlHelper.Post(AppConstant.RestUrl, "SelectedAddress", "Insert"), model);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Exemple #8
0
        public void AddTripState(Guid tripId, TripStatusType tripStatusType)
        {
            var tripParam = new TripParam()
            {
                Id = tripId,
                TripActionParams = new List <TripActionParam>()
                {
                    new TripActionParam()
                    {
                        Status = tripStatusType
                    }
                }
            };

            new HttpClientHelper(UserInfoMapping.MapToUserInfo()).Post(HttpUrlHelper.Post(AppConstant.RestUrl, "Trip", "AddTripState"), tripParam);
        }
Exemple #9
0
 public void Edit(PassengerParam passengerParam)
 {
     new HttpClientHelper(UserInfoMapping.MapToUserInfo()).Post(HttpUrlHelper.Post(AppConstant.RestUrl, "Passenger", "Update"), passengerParam);
     //var userInfo =  GetPassengerByMobile(passengerParam.UserParam.Mobile);
     MapToUserInfo(passengerParam);
 }
Exemple #10
0
 public void UpdateUserCode(UserParam userParam)
 {
     new  HttpClientHelper(UserInfoMapping.MapToUserInfo()).Post(HttpUrlHelper.Post(AppConstant.RestUrl, "Account", "UpdateUserCode"), userParam);
 }