예제 #1
0
        public async void UpdateFinancialAmount(object sender, EventArgs e)
        {
            try
            {
                if (groceryAmount.Text != "")
                {
                    bool check = await DisplayAlert("Job Compilation", "Are you sure to complete this Job, Once you press 'Yes' then record will be updated into our datadase ", "Yes", "No");

                    if (check)
                    {
                        ApiCalling api = new ApiCalling();
                        Dictionary <string, object> userData = SharedUserData.getUserData;

                        TrollyFinancialInfo ob = new TrollyFinancialInfo()
                        {
                            trolliId          = obj.trolliId,
                            baseGroceryAmount = Convert.ToDouble(groceryAmount.Text)
                        };
                        api.UpdateTrolliFee(ob);
                        api.SendNotificationWhenSBEnterAmount(Convert.ToString(userData["fullName"]), obj.clientNotificationId, obj.trolliId, obj.assigneeId);

                        await Navigation.PushAsync(new RatingAndReviewForClient(ob.trolliId, obj.clientId));
                    }
                }
                else
                {
                    await DisplayAlert("", "Enter Grocery Amount", "ok");
                }
            }catch (Exception ex)
            {
                await DisplayAlert("", ExceptionManagement.LogException(ex), "Ok");
            }
        }
예제 #2
0
 public async void SaveTrolliFee(TrollyFinancialInfo ob)
 {
     try
     {
         await _client.PostAsync(ApiEndPoints.trolliFinancialInfoAPI + "?principalAmount=" + ob.baseGroceryAmount + "&serviceProviderAmount=" + ob.serviceProviderFee + "&TotalAmount=" + ob.totalAmount + "&TrolliId=" + ob.trolliId + "&clientVerified=" + ob.isConfirmed, null);
     }
     catch (Exception ex)
     {
         Log.Warning("Error", ex.ToString());
     }
 }
예제 #3
0
 public async void UpdateTrolliFee(TrollyFinancialInfo ob)
 {
     try
     {
         await _client.PostAsync(ApiEndPoints.trolliFinancialInfoAPI + "?TrolliId=" + ob.trolliId + "&baseGroceryAmount=" + ob.baseGroceryAmount + "&clientVerified=false", null);
     }
     catch (Exception ex)
     {
         Log.Warning("Error", ex.ToString());
     }
 }
예제 #4
0
 public void saveTrollyFees()
 {
     try
     {
         TrollyFinancialInfo feeInfo = new TrollyFinancialInfo()
         {
             isConfirmed        = "false",
             baseGroceryAmount  = 0,
             serviceProviderFee = totalFees,
             trolliFeeAmount    = 0,
             totalAmount        = totalFees,
             trolliId           = ScheduledTrolly.UUIDs
         };
         ApiCalling api = new ApiCalling();
         api.SaveTrolliFee(feeInfo);
     }catch (Exception ex)
     {
         DisplayAlert("", ExceptionManagement.LogException(ex), "Ok");
     }
 }