/// <inheritdoc /> Task <PostAuction> IApiService.PostAuction(PostAuction data, int id) { var arguments = new object[] { data, id }; var func = requestBuilder.BuildRestResultFuncForMethod("PostAuction", new Type[] { typeof(PostAuction), typeof(int) }); return((Task <PostAuction>)func(Client, arguments)); }
public async Task PostBid() { try { int auctionId = int.Parse(hdnLeilaoId.Value); PostAuction post = new PostAuction() { SellerId = sellerId, Price = double.Parse(txbValorLance.Text) }; var bid = await ApiClient.PostAuction(post, auctionId); hdnHoraLance.Value = DateTime.Now.ToString(); divResultadoLance.Visible = true; lkbUpdateEntregas.Visible = false; lkbDetalhesEntrega.Visible = false; lblResultadoLance.Text = "Leilão #" + bid.AuctionId + "- Lance #" + bid.Id + "- Valor = R$" + bid.Price; } catch (Exception ex) { throw new Exception(ex.Message); } }