Ejemplo n.º 1
0
        private void button6_Click(object sender, EventArgs e)
        {
            var client = new ServicioTimbrado.ServicioTimbradoClient();

            try
            {
                foreach (var archivo in TxtUuids.Lines)
                {
                    string res = client.CancelaCfdi(txtUsuario.Text, txtPassword.Text, archivo, TxtRfc.Text);
                    TxtResultCancelar.AppendText(archivo.ToString() + " -> " + res + "\r\n");
                }
                LbArchivos.Items.Clear();
            }
            catch (Exception ee)
            {
                MessageBox.Show(ee.Message);
            }
            finally
            {
                client.Close();
            }
        }
Ejemplo n.º 2
0
 private void button4_Click_1(object sender, EventArgs e)
 {
     Timbrador.CertificadorClient client = new Timbrador.CertificadorClient();
     try
     {
         foreach (var archivo in TxtUuids.Lines)
         {
             string[] datos = archivo.Split('\t');
             string   res   = client.CancelaCfdi(datos[0], datos[1]);
             TxtResultCancelar.AppendText(res + " -> " + res + "\r\n");
         }
         LbArchivos.Items.Clear();
     }
     catch (Exception ee)
     {
         MessageBox.Show(ee.Message);
     }
     finally
     {
         client.Close();
     }
 }