コード例 #1
0
        private void button2_Click(object sender, RoutedEventArgs e)
        {
            Tresp response = new Tresp();

            try
            {
                response = MainWindow.WEB_SERVICE_RM.ventasRealizadas(ListaVentas.ToArray(), MainWindow.CLIENTE, MainWindow.CLAVE);
            }
            catch (Exception ex)
            {
                MessageBox.Show(Mensajes.ErrorWs + ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                this.Close();
                return;
            }
            string textoRta = "";

            if (response.error != 0)
            {
                textoRta += "ERRORES: ";
                textoRta += "\n-------------------------";
                textoRta += "\nCod. de error -> " + response.error;
                textoRta += "\nDescripción -> " + response.descError;
            }
            else
            {
                textoRta += "OK!";
            }

            textBlock1.Text = textoRta;
        }
コード例 #2
0
        // - 2 -
        private static void Test_desactivaRegla(string regla, string fecha, string _cliente, string _clave)
        {
            Tresp resDesactivaRegla = ws.desactivaRegla(regla, fecha, _cliente, _clave);

            Console.WriteLine(resDesactivaRegla.error + " -> " + resDesactivaRegla.descError);
            Console.ReadKey();
        }
コード例 #3
0
        private void Test_desactivaRegla(string regla, string fecha, string _cliente, string _clave)
        {
            Tresp resDesactivaRegla = new Tresp();

            try
            {
                resDesactivaRegla = MainWindow.WEB_SERVICE_RM.desactivaRegla(regla, fecha, _cliente, _clave);
            }
            catch (Exception ex)
            {
                MessageBox.Show(Mensajes.ErrorWs + ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                this.Close();
                return;
            }
            if (resDesactivaRegla.error == 0)
            {
                textBlock1.Text = "OK \nRegla desactivada con éxito!";
            }
            else
            {
                textBlock1.Text  = "ERROR: \n";
                textBlock1.Text += "Código: " + resDesactivaRegla.error + "\n";
                textBlock1.Text += "Descripción: " + resDesactivaRegla.descError;
            }
        }
コード例 #4
0
        // - 6 -
        private static void Test_ventasRealizadas(List <Tventa> listaVentas, string _cliente, string _clave)
        {
            Tresp response = ws.ventasRealizadas(listaVentas.ToArray(), _cliente, _clave);

            if (response.error != 0)
            {
                Console.WriteLine("ERRORES: ");
                Console.WriteLine("-------------------------");
                Console.WriteLine("Cod. de error -> " + response.error);
                Console.WriteLine("Descripción -> " + response.descError);
            }
            else
            {
                Console.WriteLine("OK!");
            }
            Console.ReadKey();
        }