private void BorrarXML()
 {
     try
     {
         this.datos_Del_XML            = new DatosXML();
         this.datos_Del_XML.Opc        = 2;
         this.datos_Del_XML.NumFactura = this.txt_numero_factura.Text;
         this.XMLHELPER = new XMLHELPER(datos_Del_XML);
         this.XMLHELPER.borrarxml();
     }
     catch (Exception ex)
     {
     }
 }
        private void listarXML()
        {
            try
            {
                this.datos_Del_XML     = new DatosXML();
                this.datos_Del_XML.Opc = 1;
                this.XMLHELPER         = new XMLHELPER(datos_Del_XML);
                this.datos             = new DataTable();
                this.datos             = this.XMLHELPER.mostrarxml();

                if (datos.Rows.Count >= 0)
                {
                    DataRow fila = datos.Rows[0];
                    this.txt_fecha_emision.Text   = fila["fecha_de_emison"].ToString();
                    this.txt_numero_factura.Text  = fila["numero_factura"].ToString();
                    this.txt_nombre_comercio.Text = fila["nombre_comercio"].ToString();
                    this.txt_cedula_juridica.Text = fila["cedula_juridica"].ToString();
                    this.TxtMoneda.Text           = fila["Moneda"].ToString();
                    if (fila["Tipo_cambio"].ToString() == "")
                    {
                        this.TxtCambio.Text = "0";
                    }
                    else
                    {
                        this.TxtCambio.Text = fila["Tipo_cambio"].ToString();
                    }
                    if (fila["Plazo_credito"].ToString() == "")
                    {
                        this.txt_plazo_credito.Text = 0.ToString();
                    }
                    else
                    {
                        this.txt_plazo_credito.Text = fila["Plazo_credito"].ToString();
                    }
                    this.txt_total_iva.Text   = fila["total_IVA"].ToString();
                    this.txt_total_pagar.Text = fila["total_pagar"].ToString();
                }
                BorrarXML();
            }
            catch (Exception)
            {
                //throw new Exception(ex.Message);
            }
        }
Esempio n. 3
0
        protected void btn_Extraccion_Click(object sender, EventArgs e)
        {
            try
            {
                if (!File_XML_Extraccion.HasFile)

                {
                    //this.Label2.Text = "Debe cargar un archivo XML para continuar";
                }
                else
                {
                    this.datos_Del_XML     = new DatosXML();
                    this.datos_Del_XML.Xml = File_XML_Extraccion.FileBytes;
                    this.datos_Del_XML.Opc = 1;
                    this.XMLHELPER         = new XMLHELPER(datos_Del_XML);
                    this.XMLHELPER.enviarxml();
                    ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeEspera", "mensajeEspera('" + "" + "');", true);
                }
            }
            catch (Exception)
            {
                ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true);
            }
        }