public RateSeller(HistoryTransaction transaction) { _transaction = transaction; BindingContext = _transaction ?? throw new ArgumentNullException(); InitializeComponent(); }
public async Task <bool> ChangeTransactionStatus(HistoryTransaction transaction) { _url = "http://system.foodforus.cloud/api/v1/approveTransaction"; var form = new FormUrlEncodedContent(new[] { new KeyValuePair <string, string>("api_key", _apiKey), new KeyValuePair <string, string>("transactionId", transaction.TransactionId.ToString()), new KeyValuePair <string, string>("statusName", transaction.TransactionName) }); _response = await _client.PostAsync(_url, form); return(_response.IsSuccessStatusCode); }
public async Task <bool> RateTransaction(HistoryTransaction transaction) { _url = "http://system.foodforus.cloud/api/v1/transactionRating"; var form = new FormUrlEncodedContent(new[] { new KeyValuePair <string, string>("apiKey", _apiKey), new KeyValuePair <string, string>("transactionId", transaction.TransactionId.ToString()), new KeyValuePair <string, string>("rating", transaction.Rating), new KeyValuePair <string, string>("comment", transaction.Comment) }); _response = await _client.PostAsync(_url, form); return(_response.IsSuccessStatusCode); }
public async Task <bool> Add(HistoryTransaction historyTransaction) { await _historyRepository.HistoryCredit.InsertOneAsync(historyTransaction); return(true); }
public async Task <IActionResult> Post([FromBody] HistoryTransaction request) { await _services.Add(request); return(Ok()); }
public async Task <IActionResult> CreateHistory(HistoryTransaction request) { await _historyService.Add(request); return(Ok()); }
async void OnHistoryTapped(object sender, ItemTappedEventArgs e) { HistoryTransaction history = (HistoryTransaction)e.Item; await Navigation.PushAsync(new RateSeller(history)); }
public async Task <bool> Add(HistoryTransaction historyTransaction) { await _repositoryHistory.HistoryPay.InsertOneAsync(historyTransaction); return(true); }