StartOptions (Einlesen Währungen) NCTS wegen Import von Dakosy
This commit is contained in:
@@ -1,15 +1,8 @@
|
||||
Imports System.Data.OleDb
|
||||
Imports System.DirectoryServices.ActiveDirectory
|
||||
Imports System.IO
|
||||
Imports System.Net
|
||||
Imports System.Text
|
||||
Imports System.Xml
|
||||
|
||||
Imports DocumentFormat.OpenXml.Drawing.Diagrams
|
||||
Imports DocumentFormat.OpenXml.Presentation
|
||||
Imports DocumentFormat.OpenXml.Wordprocessing
|
||||
Imports iTextSharp.text.pdf.qrcode.Version
|
||||
Imports Org.BouncyCastle.Asn1.Pkcs
|
||||
Imports Renci.SshNet
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
@@ -4000,6 +3993,11 @@ Public Class frmStartOptions
|
||||
showPic(importEZOLLWechselkurse(VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM), PictureBox20)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LinkLabel63_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel63.LinkClicked
|
||||
|
||||
showPic(importEZOLLWechselkurse(VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM, 2, 2), PictureBox24)
|
||||
End Sub
|
||||
Private Sub Button17_Click(sender As Object, e As EventArgs) Handles Button17.Click
|
||||
Dim f As New frmDatenarchivarchiv
|
||||
f.ShowDialog()
|
||||
@@ -4248,10 +4246,14 @@ Public Class frmStartOptions
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function importEZOLLWechselkurse(isTestsystem As Boolean) As Boolean
|
||||
Private Function importEZOLLWechselkurse(isTestsystem As Boolean, Optional kursart As Integer = 1, Optional art As Integer = 1) As Boolean
|
||||
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = isTestsystem
|
||||
|
||||
'KURSART 1 = notirete Währung, 2 ...
|
||||
'ART 1 = cFremdwaehrungskurse, 2 WährungkurseNeu
|
||||
|
||||
|
||||
Dim MyData As String = ""
|
||||
Dim SQL = New SQL
|
||||
Dim erg = True
|
||||
@@ -4262,7 +4264,7 @@ Public Class frmStartOptions
|
||||
Dim lastDaycurrentMonth = DateTime.Now.AddMonths(1)
|
||||
lastDaycurrentMonth = New DateTime(lastDaycurrentMonth.Year, lastDaycurrentMonth.Month, 1).AddDays(-1)
|
||||
|
||||
Dim kursart = "1" 'notirete Währung
|
||||
|
||||
Dim startdatum_tag2 = firstDaycurrentMonth.Day
|
||||
Dim startdatum_monat2 = firstDaycurrentMonth.Month
|
||||
Dim startdatum_jahr2 = firstDaycurrentMonth.Year
|
||||
@@ -4295,47 +4297,65 @@ Public Class frmStartOptions
|
||||
Dim endDatum, startDatum
|
||||
Dim count As Integer = 1
|
||||
For Each node As XmlElement In doc.GetElementsByTagName("kurs")
|
||||
Dim wk As New cFremdwaehrungskurse()
|
||||
Dim wk
|
||||
If art = 1 Then
|
||||
wk = New cFremdwaehrungskurse()
|
||||
Else
|
||||
wk = New cWaehrungskurseNEU()
|
||||
End If
|
||||
If node.Attributes("id") IsNot Nothing Then wk.fw_id = node.Attributes("id").Value
|
||||
If node.HasChildNodes Then
|
||||
For Each element As XmlElement In node.ChildNodes
|
||||
If element.Name = "land" AndAlso element.InnerText <> "" Then wk.fw_land = element.InnerText
|
||||
If element.Name = "iso2" AndAlso element.InnerText <> "" Then wk.fw_iso2 = element.InnerText
|
||||
If element.Name = "iso3" AndAlso element.InnerText <> "" Then wk.fw_iso3 = element.InnerText
|
||||
For Each element As XmlElement In node.ChildNodes
|
||||
If element.Name = "land" AndAlso element.InnerText <> "" Then wk.fw_land = element.InnerText
|
||||
If element.Name = "iso2" AndAlso element.InnerText <> "" Then wk.fw_iso2 = element.InnerText
|
||||
If element.Name = "iso3" AndAlso element.InnerText <> "" Then wk.fw_iso3 = element.InnerText
|
||||
If element.Name = "kurswert" AndAlso element.InnerText <> "" Then
|
||||
wk.fw_kurswert = element.InnerText
|
||||
End If
|
||||
If element.Name = "startdatum" AndAlso element.InnerText <> "" Then
|
||||
wk.fw_startdatum = element.InnerText
|
||||
startDatum = wk.fw_startdatum
|
||||
End If
|
||||
If element.Name = "enddatum" AndAlso element.InnerText <> "" Then
|
||||
wk.fw_enddatum = element.InnerText
|
||||
endDatum = wk.fw_enddatum
|
||||
If art = 1 Then
|
||||
If element.Name = "startdatum" AndAlso element.InnerText <> "" Then
|
||||
wk.fw_startdatum = element.InnerText
|
||||
startDatum = wk.fw_startdatum
|
||||
End If
|
||||
If element.Name = "enddatum" AndAlso element.InnerText <> "" Then
|
||||
wk.fw_enddatum = element.InnerText
|
||||
endDatum = wk.fw_enddatum
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
count = count + 1
|
||||
wk.SAVE()
|
||||
End If
|
||||
count = count + 1
|
||||
wk.SAVE()
|
||||
End If
|
||||
Next
|
||||
Dim wk_euro As New cFremdwaehrungskurse()
|
||||
Dim wk_euro
|
||||
|
||||
If art = 1 Then
|
||||
wk_euro = New cFremdwaehrungskurse()
|
||||
Else
|
||||
wk_euro = New cWaehrungskurseNEU()
|
||||
End If
|
||||
|
||||
wk_euro.fw_id = 0
|
||||
wk_euro.fw_land = "Europa"
|
||||
wk_euro.fw_kurswert = 1
|
||||
wk_euro.fw_iso3 = "EUR"
|
||||
wk_euro.fw_iso2 = "EU"
|
||||
wk_euro.fw_startdatum = firstDaycurrentMonth.ToShortDateString()
|
||||
wk_euro.fw_enddatum = lastDaycurrentMonth.ToShortDateString()
|
||||
If art = 1 Then
|
||||
wk_euro.fw_startdatum = firstDaycurrentMonth.ToShortDateString()
|
||||
wk_euro.fw_enddatum = lastDaycurrentMonth.ToShortDateString()
|
||||
End If
|
||||
|
||||
wk_euro.SAVE()
|
||||
|
||||
'Dim sqlCount = SQL.getValueTxtBySqlVarList("SELECT isnull(count(*),0) FROM tblZOLL_Wechselkurse WHERE [fw_startdatum]='" & startDatum & "' AND fw_enddatum='" & endDatum & "'", "FMZOLL")
|
||||
'If count <> sqlCount Then
|
||||
' 'MsgBox("Anzahl der Importierten Datensätze:" & sqlCount & vbNewLine & "Anzahl Datensätze in Datei: " & count)
|
||||
' 'erg = False
|
||||
'End If
|
||||
'Dim sqlCount = SQL.getValueTxtBySqlVarList("SELECT isnull(count(*),0) FROM tblZOLL_Wechselkurse WHERE [fw_startdatum]='" & startDatum & "' AND fw_enddatum='" & endDatum & "'", "FMZOLL")
|
||||
'If count <> sqlCount Then
|
||||
' 'MsgBox("Anzahl der Importierten Datensätze:" & sqlCount & vbNewLine & "Anzahl Datensätze in Datei: " & count)
|
||||
' 'erg = False
|
||||
'End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
@@ -4920,4 +4940,9 @@ Public Class frmStartOptions
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button23_Click(sender As Object, e As EventArgs) Handles Button23.Click
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
|
||||
|
||||
Dim ok = False
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user