Jump to content

luisveber

Members
  • Content count

    3
  • Joined

  • Last visited

Community Reputation

0 Comum

About luisveber

  1. luisveber

    Importar dados XML NFE com Visual Basic

    A nota fiscal tem vários vencimentos, estou precisando que ao importar os dados xml para o sistema, que os vencimentos sejam preenchidos em diferentes textbox conforme imagem abaixo: a tag que preciso importar da nfe é a "dup".
  2. Bom dia pessoal, Estou com uma dúvida, tenho um código que importa os dados de um arquivo xml de uma nota fiscal, porém não estou conseguindo importar a tag "dup" do arquivo xml quando existem mais de uma parcela a ser paga, quando importo para um datagrid eu consigo, porém preciso que estas informações sejam importadas para um textbox assim como as demais informações. Segue código: Public Sub PRealizaLeituraXML() OpenFileDialog1.ShowDialog() Dim diretorio = OpenFileDialog1.FileName Dim docXML As New XmlDocument docXML.Load(diretorio) Dim strRetorno As String = "", noPai As XmlElement, noFilho As XmlElement, noNeto As XmlElement, noBisneto As XmlElement, noTetra As XmlElement, nodelist As XmlNodeList = docXML.DocumentElement.ChildNodes If Len(docXML.OuterXml) > 0 Then For Each noPai In nodelist 'Le os nós principais da NFe If noPai.Name = "NFe" Then For Each noFilho In noPai 'Lê os Nós secundários If noFilho.Name = "infNFe" Then 'Se for o cabecalho da NFe For Each noNeto In noFilho 'Lê as Tags da NFe If noNeto.Name = "ide" Then 'Verifica a identificação da NFe For Each noBisneto In noNeto 'Verifica os valores da NFe txtData.Text = noNeto.ChildNodes.Item(7).InnerText txtDocumento.Text = noNeto.ChildNodes.Item(6).InnerText Next ElseIf noNeto.Name = "emit" Then 'Dados do Emitente da NFe For Each noBisneto In noNeto txtfornec.Text = noNeto.ChildNodes.Item(1).InnerText If noBisneto.Name = "enderEmit" Then 'Dados do Endereço do emitente For Each noTetra In noBisneto Next Else End If Next ElseIf noNeto.Name = "dest" Then 'Dados do Destinatário For Each noBisneto In noNeto If noBisneto.Name = "enderDest" Then 'Dados do Endereço do emitente For Each noTetra In noBisneto Next Else End If Next ElseIf noNeto.Name = "transp" Then 'Dados da Transportadora For Each noBisneto In noNeto If noBisneto.Name = "transporta" Then For Each noTetra In noBisneto Next End If If noBisneto.Name = "veicTransp" Then For Each noTetra In noBisneto Next End If If noBisneto.Name = "vol" Then For Each noTetra In noBisneto Next End If Next ElseIf noNeto.Name = "infAdic" Then 'Dados do Destinatário For Each noBisneto In noNeto If noBisneto.Name = "obsCont" Then 'Dados do Endereço do emitente For Each noTetra In noBisneto Next Else End If Next ElseIf noNeto.Name = "cobr" Then 'Dados do Destinatário For Each noBisneto In noNeto If noBisneto.Name = "fat" Then 'Dados da fatura For Each noTetra In noBisneto Next End If If noBisneto.Name = "dup" Then 'Dados da duplicata For Each noTetra In noBisneto Next End If Next ElseIf noNeto.Name = "total" Then For Each noBisneto In noNeto If noBisneto.Name = "ICMSTot" Then For Each noTetra In noBisneto txtValor.Text = noBisneto.ChildNodes.Item(17).InnerText Next End If Next ElseIf noNeto.Name = "entrega" Then 'Dados da Entrega For Each noBisneto In noNeto Next ElseIf noNeto.Name = "det" Then 'Verifica os detalhes dos produtos For Each noBisneto In noNeto If noBisneto.Name = "prod" Then 'Dados dos Produtos For Each noTetra In noBisneto Next End If If noBisneto.Name = "ICMS" Then 'Dados do ICMS For Each noTetra In noBisneto Next End If Next End If Next End If Next End If Next End If End Sub
  3. Boa tarde pessoal, tenho uma aplicação em VB, onde em quase todos os pcs da minha empresa roda perfeitamente, e em apena um computador apresenta o erro abaixo: Já procurei soluções porém nenhuma até o momento resolveu meu problema em alguns lugares pediram para instalar o accessdatabaseengine, e em outros pediram para mudar a configuração do sistema para x86. se alguem tiver alguma outra solução eu agradeço ERRO: Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.InvalidOperationException: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at Flexlean___Industrial_Soluction.Login.Button1_Click(Object sender, EventArgs e) in C:\Users\Cliente\Documents\Visual Studio 2012\Projects\Flexlean - Industrial Soluction\Flexlean - Industrial Soluction\Form1.vb:line 20 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.PerformClick() at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData) at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData) at System.Windows.Forms.Control.PreProcessMessage(Message& msg) at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg) at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg) ************** Loaded Assemblies ************** mscorlib Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll ---------------------------------------- Flexlean - Industrial Soluction Assembly Version: 1.0.0.0 Win32 Version: 1.0.0.0 CodeBase: file:///W:/Aplicativo%20FlexLean/ARQUIVO%20COMPILADO/Flexlean%20-%20Industrial%20Soluction.exe ---------------------------------------- Microsoft.VisualBasic Assembly Version: 10.0.0.0 Win32 Version: 11.0.50938.18408 built by: FX451RTMGREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll ---------------------------------------- System Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Core Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll ---------------------------------------- System.Windows.Forms Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System.Drawing Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- System.Runtime.Remoting Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll ---------------------------------------- System.Data Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll ---------------------------------------- System.Transactions Assembly Version: 4.0.0.0 Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll ---------------------------------------- ************** JIT Debugging ************** To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled. For example: <configuration> <system.windows.forms jitDebugging="true" /> </configuration> When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.
×

Important Information

Ao usar o fórum, você concorda com nossos Terms of Use.