Пример #1
0
 private void btnGet_Click(object sender, EventArgs e)
 {
     try
     {
         String  ProductId = txtIdProductGet.Text;
         Product product   = _RESTProductService.GetById(ProductId);
         CleanLabelProduct();
         this.ProductDescription.Text = product.ProductDescription;
         this.ProductId.Text          = product.ProductId;
         this.SetEstado("Se obtuvo el producto correctamente");
     }
     catch (NotResourceFoundException)
     {
         this.SetEstado("No existe el produto con id: " + txtIdProductGet.Text);
     }
     catch (InternalErrorException)
     {
         this.SetEstado("Error al obtener el producto");
     }
 }