frmStartOptions
This commit is contained in:
136
initATLASAufschubkonten/frmStartOptions.Designer.vb
generated
136
initATLASAufschubkonten/frmStartOptions.Designer.vb
generated
@@ -25,6 +25,9 @@ Partial Class frmStartOptions
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmStartOptions))
|
||||
Me.pnl = New System.Windows.Forms.Panel()
|
||||
Me.Button24 = New System.Windows.Forms.Button()
|
||||
Me.CheckBox8 = New System.Windows.Forms.CheckBox()
|
||||
Me.Label43 = New System.Windows.Forms.Label()
|
||||
Me.PictureBox25 = New System.Windows.Forms.PictureBox()
|
||||
Me.Button23 = New System.Windows.Forms.Button()
|
||||
Me.PictureBox24 = New System.Windows.Forms.PictureBox()
|
||||
@@ -156,6 +159,7 @@ Partial Class frmStartOptions
|
||||
Me.LinkLabel30 = New System.Windows.Forms.LinkLabel()
|
||||
Me.Label11 = New System.Windows.Forms.Label()
|
||||
Me.TabPage4 = New System.Windows.Forms.TabPage()
|
||||
Me.LinkLabel64 = New System.Windows.Forms.LinkLabel()
|
||||
Me.Label42 = New System.Windows.Forms.Label()
|
||||
Me.cbxUploadDA = New System.Windows.Forms.CheckBox()
|
||||
Me.Label5 = New System.Windows.Forms.Label()
|
||||
@@ -231,7 +235,7 @@ Partial Class frmStartOptions
|
||||
Me.lklAufschubkontenATLASEZOLL = New System.Windows.Forms.LinkLabel()
|
||||
Me.lblRoutineManager = New System.Windows.Forms.Label()
|
||||
Me.Button21 = New System.Windows.Forms.Button()
|
||||
Me.LinkLabel64 = New System.Windows.Forms.LinkLabel()
|
||||
Me.txtKdNr = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.MyTextBox3 = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.MyTextBox2 = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.txtSyskaWdhDateiname = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
@@ -258,9 +262,6 @@ Partial Class frmStartOptions
|
||||
Me.MyTextBox1 = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.txtGJ_UNISPED = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.DataGridViewTextBoxColumn1 = New System.Windows.Forms.DataGridViewTextBoxColumn()
|
||||
Me.txtKdNr = New VERAG_PROG_ALLGEMEIN.MyTextBox()
|
||||
Me.Label43 = New System.Windows.Forms.Label()
|
||||
Me.CheckBox8 = New System.Windows.Forms.CheckBox()
|
||||
Me.pnl.SuspendLayout()
|
||||
CType(Me.PictureBox25, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.PictureBox24, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
@@ -302,6 +303,7 @@ Partial Class frmStartOptions
|
||||
'
|
||||
Me.pnl.BackColor = System.Drawing.Color.White
|
||||
Me.pnl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.pnl.Controls.Add(Me.Button24)
|
||||
Me.pnl.Controls.Add(Me.CheckBox8)
|
||||
Me.pnl.Controls.Add(Me.Label43)
|
||||
Me.pnl.Controls.Add(Me.txtKdNr)
|
||||
@@ -387,6 +389,42 @@ Partial Class frmStartOptions
|
||||
Me.pnl.Size = New System.Drawing.Size(1229, 1007)
|
||||
Me.pnl.TabIndex = 0
|
||||
'
|
||||
'Button24
|
||||
'
|
||||
Me.Button24.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.Button24.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.Button24.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button24.Location = New System.Drawing.Point(901, 308)
|
||||
Me.Button24.Name = "Button24"
|
||||
Me.Button24.Size = New System.Drawing.Size(187, 38)
|
||||
Me.Button24.TabIndex = 134
|
||||
Me.Button24.Text = "test"
|
||||
Me.Button24.UseVisualStyleBackColor = True
|
||||
Me.Button24.Visible = False
|
||||
'
|
||||
'CheckBox8
|
||||
'
|
||||
Me.CheckBox8.AutoSize = True
|
||||
Me.CheckBox8.Checked = True
|
||||
Me.CheckBox8.CheckState = System.Windows.Forms.CheckState.Checked
|
||||
Me.CheckBox8.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.CheckBox8.Location = New System.Drawing.Point(1018, 207)
|
||||
Me.CheckBox8.Name = "CheckBox8"
|
||||
Me.CheckBox8.Size = New System.Drawing.Size(79, 17)
|
||||
Me.CheckBox8.TabIndex = 133
|
||||
Me.CheckBox8.Text = "Testsystem"
|
||||
Me.CheckBox8.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label43
|
||||
'
|
||||
Me.Label43.AutoSize = True
|
||||
Me.Label43.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label43.Location = New System.Drawing.Point(907, 234)
|
||||
Me.Label43.Name = "Label43"
|
||||
Me.Label43.Size = New System.Drawing.Size(35, 13)
|
||||
Me.Label43.TabIndex = 132
|
||||
Me.Label43.Text = "KdNr"
|
||||
'
|
||||
'PictureBox25
|
||||
'
|
||||
Me.PictureBox25.BackgroundImage = CType(resources.GetObject("PictureBox25.BackgroundImage"), System.Drawing.Image)
|
||||
@@ -1986,6 +2024,17 @@ Partial Class frmStartOptions
|
||||
Me.TabPage4.Text = "VERAG 360"
|
||||
Me.TabPage4.UseVisualStyleBackColor = True
|
||||
'
|
||||
'LinkLabel64
|
||||
'
|
||||
Me.LinkLabel64.AutoSize = True
|
||||
Me.LinkLabel64.LinkColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.LinkLabel64.Location = New System.Drawing.Point(416, 160)
|
||||
Me.LinkLabel64.Name = "LinkLabel64"
|
||||
Me.LinkLabel64.Size = New System.Drawing.Size(135, 13)
|
||||
Me.LinkLabel64.TabIndex = 131
|
||||
Me.LinkLabel64.TabStop = True
|
||||
Me.LinkLabel64.Text = "Ländercode ISO2 einfügen"
|
||||
'
|
||||
'Label42
|
||||
'
|
||||
Me.Label42.AutoSize = True
|
||||
@@ -2799,16 +2848,29 @@ Partial Class frmStartOptions
|
||||
Me.Button21.Text = "AAS Sendung 24h"
|
||||
Me.Button21.UseVisualStyleBackColor = True
|
||||
'
|
||||
'LinkLabel64
|
||||
'txtKdNr
|
||||
'
|
||||
Me.LinkLabel64.AutoSize = True
|
||||
Me.LinkLabel64.LinkColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(54, Byte), Integer), CType(CType(128, Byte), Integer))
|
||||
Me.LinkLabel64.Location = New System.Drawing.Point(416, 160)
|
||||
Me.LinkLabel64.Name = "LinkLabel64"
|
||||
Me.LinkLabel64.Size = New System.Drawing.Size(135, 13)
|
||||
Me.LinkLabel64.TabIndex = 131
|
||||
Me.LinkLabel64.TabStop = True
|
||||
Me.LinkLabel64.Text = "Ländercode ISO2 einfügen"
|
||||
Me.txtKdNr._DateTimeOnly = False
|
||||
Me.txtKdNr._numbersOnly = True
|
||||
Me.txtKdNr._numbersOnlyKommastellen = ""
|
||||
Me.txtKdNr._numbersOnlyTrennzeichen = False
|
||||
Me.txtKdNr._Prozent = False
|
||||
Me.txtKdNr._ShortDateNew = False
|
||||
Me.txtKdNr._ShortDateOnly = False
|
||||
Me.txtKdNr._TimeOnly = False
|
||||
Me.txtKdNr._TimeOnly_Seconds = False
|
||||
Me.txtKdNr._value = ""
|
||||
Me.txtKdNr._Waehrung = False
|
||||
Me.txtKdNr._WaehrungZeichen = True
|
||||
Me.txtKdNr.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtKdNr.Location = New System.Drawing.Point(961, 227)
|
||||
Me.txtKdNr.MaxLength = 50
|
||||
Me.txtKdNr.MaxLineLength = -1
|
||||
Me.txtKdNr.MaxLines_Warning = ""
|
||||
Me.txtKdNr.MaxLines_Warning_Label = Nothing
|
||||
Me.txtKdNr.Name = "txtKdNr"
|
||||
Me.txtKdNr.Size = New System.Drawing.Size(136, 20)
|
||||
Me.txtKdNr.TabIndex = 95
|
||||
'
|
||||
'MyTextBox3
|
||||
'
|
||||
@@ -3315,53 +3377,6 @@ Partial Class frmStartOptions
|
||||
Me.DataGridViewTextBoxColumn1.MinimumWidth = 8
|
||||
Me.DataGridViewTextBoxColumn1.Name = "DataGridViewTextBoxColumn1"
|
||||
'
|
||||
'txtKdNr
|
||||
'
|
||||
Me.txtKdNr._DateTimeOnly = False
|
||||
Me.txtKdNr._numbersOnly = True
|
||||
Me.txtKdNr._numbersOnlyKommastellen = ""
|
||||
Me.txtKdNr._numbersOnlyTrennzeichen = False
|
||||
Me.txtKdNr._Prozent = False
|
||||
Me.txtKdNr._ShortDateNew = False
|
||||
Me.txtKdNr._ShortDateOnly = False
|
||||
Me.txtKdNr._TimeOnly = False
|
||||
Me.txtKdNr._TimeOnly_Seconds = False
|
||||
Me.txtKdNr._value = ""
|
||||
Me.txtKdNr._Waehrung = False
|
||||
Me.txtKdNr._WaehrungZeichen = True
|
||||
Me.txtKdNr.ForeColor = System.Drawing.Color.Black
|
||||
Me.txtKdNr.Location = New System.Drawing.Point(961, 227)
|
||||
Me.txtKdNr.MaxLength = 50
|
||||
Me.txtKdNr.MaxLineLength = -1
|
||||
Me.txtKdNr.MaxLines_Warning = ""
|
||||
Me.txtKdNr.MaxLines_Warning_Label = Nothing
|
||||
Me.txtKdNr.Name = "txtKdNr"
|
||||
Me.txtKdNr.Size = New System.Drawing.Size(136, 20)
|
||||
Me.txtKdNr.TabIndex = 95
|
||||
'
|
||||
'Label43
|
||||
'
|
||||
Me.Label43.AutoSize = True
|
||||
Me.Label43.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.Label43.Location = New System.Drawing.Point(907, 234)
|
||||
Me.Label43.Name = "Label43"
|
||||
Me.Label43.Size = New System.Drawing.Size(35, 13)
|
||||
Me.Label43.TabIndex = 132
|
||||
Me.Label43.Text = "KdNr"
|
||||
'
|
||||
'CheckBox8
|
||||
'
|
||||
Me.CheckBox8.AutoSize = True
|
||||
Me.CheckBox8.Checked = True
|
||||
Me.CheckBox8.CheckState = System.Windows.Forms.CheckState.Checked
|
||||
Me.CheckBox8.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.CheckBox8.Location = New System.Drawing.Point(1018, 207)
|
||||
Me.CheckBox8.Name = "CheckBox8"
|
||||
Me.CheckBox8.Size = New System.Drawing.Size(79, 17)
|
||||
Me.CheckBox8.TabIndex = 133
|
||||
Me.CheckBox8.Text = "Testsystem"
|
||||
Me.CheckBox8.UseVisualStyleBackColor = True
|
||||
'
|
||||
'frmStartOptions
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -3655,4 +3670,5 @@ Partial Class frmStartOptions
|
||||
Friend WithEvents Label43 As Label
|
||||
Friend WithEvents txtKdNr As VERAG_PROG_ALLGEMEIN.MyTextBox
|
||||
Friend WithEvents CheckBox8 As CheckBox
|
||||
Friend WithEvents Button24 As Button
|
||||
End Class
|
||||
|
||||
@@ -3,6 +3,8 @@ Imports System.IO
|
||||
Imports System.Net
|
||||
Imports System.Text
|
||||
Imports System.Xml
|
||||
Imports com.esendex.sdk
|
||||
Imports com.sun.xml.internal.rngom
|
||||
Imports Renci.SshNet
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
@@ -4586,7 +4588,7 @@ Public Class frmStartOptions
|
||||
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = cbxTestsystem.Checked
|
||||
cbxMSEBatchNr.DataSource = SQL.loadCboBySql("SELECT distinct([batch_seq_nr]) FROM [VERAG].[dbo].[tblMSETransactions]", "FMZOLL")
|
||||
cbxMSEBatchNr.DataSource = SQL.loadCboBySql("SELECT distinct top 10 ([batch_seq_nr]) FROM [VERAG].[dbo].[tblMSETransactions] order by batch_seq_nr desc", "FMZOLL")
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -5153,4 +5155,72 @@ Public Class frmStartOptions
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button24_Click(sender As Object, e As EventArgs) Handles Button24.Click
|
||||
|
||||
Dim test As Boolean = False
|
||||
|
||||
Dim dir = IIf(test, "C:\Users\d.breimaier\Desktop\MSE_test\", "C:\Users\d.breimaier\Desktop\MSE\") & Now.ToShortDateString.Replace(":", "") & IIf(VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM, "Test", "")
|
||||
|
||||
If Directory.Exists(dir) Then dir &= "_" & Now.ToShortTimeString.Replace(":", "")
|
||||
|
||||
Directory.CreateDirectory(dir)
|
||||
|
||||
|
||||
Dim sql As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
Dim dt_CSV_selected = SQL.loadDgvBySql_Param("SELECT TOP (10) controller_id as [Controller ID], 'VERAG 360 GmbH' as [Controller Name] , inv.[invoice_id] as [Invoice ID], inv.invoice_date as [Invoice Date],
|
||||
cust.customer_id as [CustomerID], cust.partner_customer_number as [Customer No], cust.customer_name as [Customer name], bills.specification_page_name as [Specification Page], bills.specification_page_id as [Specification ID], trans.purchase_datetime as [Transaction date], trans.transaction_id as [Transaction ID],
|
||||
trans.supplier_name as [Transaction Supplier/Terminal], trans.transaction_country as [Transaction Country], trans.transaction_product_name as [Product description], trans.transaction_product_id as [Product Description ID], trans.device_product_type as [Card Type], trans.device_product_number as [Card number], trans.license_plate_number as [Load File Licence Plate Number],
|
||||
'' as [Card Licence Plate Number], trans.license_plate_number as [Truck Licence Plate Number], '' as [Truck Fleet Code], '' as [Truck Driver Name], trans.entry_point_name as [Entry Terminal/Direction], trans.entry_datetime as [Start date], trans.entry_datetime as [Start Time], trans.exit_point_name as [Exit Terminal Description], trans.exit_datetime as [End Date], trans.exit_datetime as [End Time],
|
||||
'' as [Eurovignet K-Number], '' as [LKW-Kostenstelle], trans.original_net_amount as [Original Nett Amount], trans.original_vat_amount as [Original VAT Amount], trans.original_gross_amount as [Original Amount], trans.original_currency as [Original Currency],
|
||||
trans.transaction_gross_amount as [Transaction Amount ( EUR )], trans.msts_fee_amount as [Admin Fee Amount ( EUR )], '' as [Fees and Costs Amount ( EUR )], trans.msts_vat_amount as [VAT Amount ( EUR )],trans.total_gross_amount as [Total Amount ( EUR )], '' as [Total Dutch VAT ( EUR )], '' as [Total Foreign VAT ( EUR )], trans.[USteuer_EUR] as [USteuer_EUR]
|
||||
FROM [VERAG].[dbo].[tblMSESettlements] as bills
|
||||
left join [VERAG].[dbo].[tblMSETransactions] as trans on bills.[transaction_id] = trans.[transaction_id]
|
||||
left join [VERAG].[dbo].[tblMSECustomers] as cust on cust.partner_customer_number = trans.partner_haulier_id
|
||||
left join [VERAG].[dbo].[tblMSEInvoices] as inv on inv.[invoice_id] = bills.[invoice_number] and inv.customer_number = cust.[customer_id] and trans.transaction_country = inv.country
|
||||
where (trans.transaction_gross_amount <> 0 or [msts_fee_amount] <> 0) ", "FMZOLL")
|
||||
|
||||
dt_CSV_selected.ParentRelations.Clear()
|
||||
dt_CSV_selected.ChildRelations.Clear()
|
||||
dt_CSV_selected.Constraints.Clear()
|
||||
|
||||
|
||||
For Each csv As DataRow In dt_CSV_selected.Rows
|
||||
|
||||
Dim teststring As String = csv.Item(2)
|
||||
|
||||
Dim fn As String = dir
|
||||
fn &= "\"
|
||||
fn &= teststring & "_Maut_MSE.csv"
|
||||
Dim outFile As System.IO.StreamWriter = My.Computer.FileSystem.OpenTextFileWriter(fn, False)
|
||||
Dim clmns As String = ""
|
||||
For i = 0 To dt_CSV_selected.Columns.Count - 1
|
||||
clmns &= dt_CSV_selected.Columns(i).ColumnName.ToString().Replace(";", ", ") & ";"
|
||||
Next
|
||||
outFile.WriteLine(clmns)
|
||||
For i = 0 To dt_CSV_selected.Rows.Count - 1
|
||||
clmns = ""
|
||||
For j = 0 To dt_CSV_selected.Columns.Count - 1
|
||||
clmns &= dt_CSV_selected.Rows(i)(j).ToString.Replace(";", ", ") & ";"
|
||||
Next
|
||||
outFile.WriteLine(clmns)
|
||||
Next
|
||||
outFile.Close()
|
||||
Next
|
||||
|
||||
|
||||
Dim dirAnhang = "C:\Users\d.breimaier\Desktop\MSE_ARCHIV\" & IIf(VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM, "Test", "") & Now.ToShortDateString
|
||||
If Directory.Exists(dirAnhang) Then 'Directory.Delete(dirAnhang, True)
|
||||
For Each f In Directory.GetFiles(dirAnhang)
|
||||
File.Delete(f)
|
||||
Next
|
||||
Else
|
||||
Directory.CreateDirectory(dirAnhang)
|
||||
End If
|
||||
|
||||
For Each f In Directory.GetFiles(dir)
|
||||
File.Copy(f, dirAnhang & "\" & (New FileInfo(f)).Name)
|
||||
Next
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user