/// <summary> /// Invoked when the Cart button is clicked. /// </summary> /// <param name="obj">The Object</param> private async void AddToCartClicked(object obj) { this.cartItemCount = this.cartItemCount ?? 0; this.CartItemCount += 1; var request = new Model.Requests.KorpaStavkaInsertRequest { BiciklId = ProductDetail.Id, Kolicina = 1 }; var stavka = await _serviceKorpaStavka.Insert <Model.KorpaStavka>(request); await UpdateCartItemCount(); }
/// <summary> /// Invoked when the Buy Now button is clicked. /// </summary> /// <param name="obj">The Object</param> private async void BuyNowClicked(object obj) { this.cartItemCount = this.cartItemCount ?? 0; this.CartItemCount += 1; var request = new Model.Requests.KorpaStavkaInsertRequest { OpremaId = ProductDetail.Id, Kolicina = 1 }; var stavka = await _serviceKorpaStavka.Insert<Model.KorpaStavka>(request); if (stavka != null) await Navigation.PushAsync(new CartPage()); else await UpdateCartItemCount(); }
public Model.KorpaStavka Update(int Id, [FromBody] Model.Requests.KorpaStavkaInsertRequest request) { return(_service.Update(Id, request)); }
public Model.KorpaStavka Insert([FromBody] Model.Requests.KorpaStavkaInsertRequest request) { return(_service.Insert(request)); }