예제 #1
0
        void PonerDisponibleArticulo_click(object sender, EventArgs e)
        {
            GridView view             = gridViewEbay;
            int      currentRowHandle = view.FocusedRowHandle;

            MyEntityModel.EBAY_SEGUIMIENTO row = (MyEntityModel.EBAY_SEGUIMIENTO)view.GetRow(currentRowHandle);
            CredencialesEbay credencialeebay   = new CredencialesEbay();

            credencialeebay.cuenta = row.VENDEDOR;
            ItemType item = new ItemType();
            ReviseFixedPriceItemCall reviseFP = new ReviseFixedPriceItemCall(credencialeebay.context);

            item.Quantity = 20;
            item.ItemID   = row.ARTICULO;
            reviseFP.Item = item;
            try
            {
                reviseFP.Execute();
                FuncionesEbay.fnGrabarErrorEbayArticulo(row.ARTICULO, "");
            }
            catch (Exception ex)
            {
                FuncionesEbay.fnGrabarErrorEbayArticulo(row.ARTICULO, ex.Message);
            }
            Console.WriteLine(reviseFP.ApiResponse.Ack + " Revised SKU " + reviseFP.ItemID);
        }
예제 #2
0
        private void buttonEditVenta_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            decimal precio;
            var     result = XtraInputBox.Show("Nuevo precio:", "Cambiar precio de venta (envío NO incluido)", ebay_seguimiento.PRECIO.ToString());

            if (result != "")
            {
                try
                {
                    precio = fnSpreciodprecio(result);
                    ItemType item = new ItemType();
                    item.ItemID = ebay_seguimiento.ARTICULO;
                    CredencialesEbay credencialeebay = new CredencialesEbay();
                    credencialeebay.cuenta = ebay_seguimiento.VENDEDOR;
                    ReviseFixedPriceItemCall reviseFP = new ReviseFixedPriceItemCall(credencialeebay.context);
                    item.StartPrice = new AmountType {
                        currencyID = CurrencyCodeType.EUR, Value = (double)precio
                    };
                    item.ItemID   = ebay_seguimiento.ARTICULO;
                    reviseFP.Item = item;
                    try
                    {
                        reviseFP.Execute();
                        FuncionesEbay.fnGrabarErrorEbayArticulo(ebay_seguimiento.ARTICULO, "");
                    }
                    catch (Exception ex)
                    {
                        FuncionesEbay.fnGrabarErrorEbayArticulo(ebay_seguimiento.ARTICULO, ex.Message);
                    }
                    Console.WriteLine(reviseFP.ApiResponse.Ack + " Revised SKU " + reviseFP.ItemID);
                }
                catch
                {
                    XtraMessageBox.Show("Error en el precio", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }