plose, etc.
This commit is contained in:
@@ -44,6 +44,17 @@ Public Class cPLOSE_Inv_Data
|
||||
Me.plInv_Id = plInv_Id
|
||||
LOAD()
|
||||
End Sub
|
||||
|
||||
Sub New(plInv_Dateiname, plInv_PLOSEKundennummer, plInv_SupplierRechnungsNr, plInv_SupplierRechnungsDatum)
|
||||
|
||||
Me.plInv_Dateiname = plInv_Dateiname
|
||||
Me.plInv_PLOSEKundennummer = plInv_PLOSEKundennummer
|
||||
Me.plInv_SupplierRechnungsNr = plInv_SupplierRechnungsNr
|
||||
Me.plInv_SupplierRechnungsDatum = plInv_SupplierRechnungsDatum
|
||||
LOADINVOICESWITHOUTPDF()
|
||||
|
||||
|
||||
End Sub
|
||||
Function getParameterList(Optional withPrimaryKey As Boolean = True) As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
|
||||
Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
|
||||
|
||||
@@ -143,6 +154,38 @@ Public Class cPLOSE_Inv_Data
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub LOADINVOICESWITHOUTPDF()
|
||||
Try
|
||||
hasEntry = False
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand("SELECT * FROM tblPLOSE_Inv_Data WHERE plInv_PLOSEKundennummer=@plInv_PLOSEKundennummer AND plInv_SupplierRechnungsNr=@plInv_SupplierRechnungsNr AND plInv_SupplierRechnungsDatum=@plInv_SupplierRechnungsDatum AND plInv_Datensatztyp = 'PDF' and plInv_PdfFileName is null ", conn)
|
||||
'cmd.Parameters.AddWithValue("@plInv_Dateiname", plInv_Dateiname)
|
||||
cmd.Parameters.AddWithValue("@plInv_PLOSEKundennummer", plInv_PLOSEKundennummer)
|
||||
cmd.Parameters.AddWithValue("@plInv_SupplierRechnungsNr", plInv_SupplierRechnungsNr)
|
||||
cmd.Parameters.AddWithValue("@plInv_SupplierRechnungsDatum", plInv_SupplierRechnungsDatum)
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
If dr.Read Then
|
||||
For Each li In getParameterList()
|
||||
Dim propInfo As PropertyInfo = Me.GetType.GetProperty(li.Scalarvariable)
|
||||
|
||||
If dr.Item(li.Text) Is DBNull.Value Then
|
||||
propInfo.SetValue(Me, Nothing)
|
||||
Else
|
||||
propInfo.SetValue(Me, dr.Item(li.Text))
|
||||
End If
|
||||
|
||||
Next
|
||||
hasEntry = True
|
||||
End If
|
||||
dr.Close()
|
||||
End Using
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Function getUpdateCmd() As String
|
||||
Try
|
||||
|
||||
@@ -1158,6 +1158,10 @@
|
||||
<Project>{50e8e49b-4fd9-4dd4-b159-bdc2b7d0e94f}</Project>
|
||||
<Name>DAKOSY_Worker_lib</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\MDM_Worker\MDM_Worker_lib.vbproj">
|
||||
<Project>{2E4DBC09-E57B-4AC5-8554-6117D71F993B}</Project>
|
||||
<Name>MDM_Worker_lib</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\TELOTEK_Worker_lib\TELOTEC_Worker_lib.vbproj">
|
||||
<Project>{5b947a66-009a-4bb6-b925-f84a01045095}</Project>
|
||||
<Name>TELOTEC_Worker_lib</Name>
|
||||
|
||||
12
UID/usrctlProcedures.Designer.vb
generated
12
UID/usrctlProcedures.Designer.vb
generated
@@ -182,6 +182,7 @@ Partial Class usrctlProcedures
|
||||
Me.Button57 = New System.Windows.Forms.Button()
|
||||
Me.Button58 = New System.Windows.Forms.Button()
|
||||
Me.Button59 = New System.Windows.Forms.Button()
|
||||
Me.Button60 = New System.Windows.Forms.Button()
|
||||
Me.tbTRStat.SuspendLayout()
|
||||
Me.TabPage3.SuspendLayout()
|
||||
Me.TabPage1.SuspendLayout()
|
||||
@@ -824,6 +825,7 @@ Partial Class usrctlProcedures
|
||||
'
|
||||
'TabPage6
|
||||
'
|
||||
Me.TabPage6.Controls.Add(Me.Button60)
|
||||
Me.TabPage6.Controls.Add(Me.Label23)
|
||||
Me.TabPage6.Controls.Add(Me.Button54)
|
||||
Me.TabPage6.Controls.Add(Me.Label19)
|
||||
@@ -1728,6 +1730,15 @@ Partial Class usrctlProcedures
|
||||
Me.Button59.Text = "Firmenlogo in DB"
|
||||
Me.Button59.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button60
|
||||
'
|
||||
Me.Button60.Location = New System.Drawing.Point(336, 63)
|
||||
Me.Button60.Name = "Button60"
|
||||
Me.Button60.Size = New System.Drawing.Size(106, 49)
|
||||
Me.Button60.TabIndex = 74
|
||||
Me.Button60.Text = "Plose PDF-Zuweisung"
|
||||
Me.Button60.UseVisualStyleBackColor = True
|
||||
'
|
||||
'usrctlProcedures
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -1977,4 +1988,5 @@ Partial Class usrctlProcedures
|
||||
Friend WithEvents Button57 As Button
|
||||
Friend WithEvents Button58 As Button
|
||||
Friend WithEvents Button59 As Button
|
||||
Friend WithEvents Button60 As Button
|
||||
End Class
|
||||
|
||||
@@ -123,4 +123,10 @@
|
||||
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -16,6 +16,7 @@ Imports DAKOSY_Worker
|
||||
Imports DAKOSY_Worker.FreierVerkehrAktVeredelUmwandlung_004
|
||||
Imports GrapeCity
|
||||
Imports itextsharp.text.pdf
|
||||
Imports MDM_Worker
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports Newtonsoft.Json.Linq
|
||||
Imports PdfSharp.Drawing
|
||||
@@ -5044,6 +5045,79 @@ OPTION (MAXRECURSION 1000);", "AVISO") '
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
Private Sub Button60_Click(sender As Object, e As EventArgs) Handles Button60.Click
|
||||
|
||||
Dim cnt = 0
|
||||
|
||||
Dim sql As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
Dim kdnr_tmp = ""
|
||||
Try
|
||||
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = cbxMDM_Testsystem.Checked
|
||||
|
||||
Dim fd As New OpenFileDialog
|
||||
If fd.ShowDialog = DialogResult.OK Then
|
||||
If fd.FileName.ToLower.EndsWith(".csv") Then
|
||||
|
||||
Using MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser(fd.FileName, Encoding.Default)
|
||||
MyReader.TextFieldType = FileIO.FieldType.Delimited
|
||||
MyReader.SetDelimiters(";")
|
||||
Dim currentRow As String()
|
||||
While Not MyReader.EndOfData
|
||||
Try
|
||||
currentRow = MyReader.ReadFields()
|
||||
|
||||
'If currentRow.Length > 2 Then
|
||||
|
||||
|
||||
If currentRow.Length > 2 Then
|
||||
If Not (currentRow(0).Trim() = "PloseCode") Then
|
||||
If currentRow.Length > 15 Then
|
||||
|
||||
|
||||
If isleernothing(currentRow(0)) IsNot Nothing AndAlso IsNumeric(currentRow(0)) AndAlso
|
||||
isleernothing(currentRow(7)) IsNot Nothing AndAlso IsDate(currentRow(7)) AndAlso
|
||||
isleernothing(currentRow(8)) IsNot Nothing AndAlso (currentRow(8) <> "") AndAlso
|
||||
isleernothing(currentRow(14)) IsNot Nothing AndAlso (currentRow(14) <> "") Then
|
||||
|
||||
Dim plInv_SupplierRechnungsDatum = sql.isleernothingDateFormatstring(currentRow(7))
|
||||
|
||||
|
||||
Dim ploseInv As New cPLOSE_Inv_Data(fd.SafeFileName, currentRow(0), currentRow(8), plInv_SupplierRechnungsDatum)
|
||||
|
||||
If ploseInv.hasEntry Then
|
||||
ploseInv.plInv_PdfFileName = currentRow(14)
|
||||
ploseInv.SAVE()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
cnt += 1
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(kdnr_tmp & " " & ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
End While
|
||||
End Using
|
||||
End If
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MessageBox.Show("Datei nicht vorhanden.")
|
||||
Finally
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
'Private Sub Button26_Click(sender As Object, e As EventArgs)
|
||||
' For Each d In System.IO.Directory.GetDirectories("\\192.168.0.91\Datenarchiv\DAKOSY\ECHTSYSTEM\Nachrichtendaten_Ablage\2019")
|
||||
' Dim fi As New FileInfo(d)
|
||||
@@ -5065,6 +5139,14 @@ OPTION (MAXRECURSION 1000);", "AVISO") '
|
||||
' Next
|
||||
|
||||
'End Sub
|
||||
|
||||
Function isleernothingDateFormatstring(o) As Object
|
||||
If o Is Nothing Then Return o
|
||||
If o.ToString = "" Then Return Nothing
|
||||
If IsDate(o) Then Return CDate(o).ToShortDateString
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -4102,8 +4102,6 @@ Public Class cWorker_NCTS
|
||||
'End If
|
||||
' NCTS.LOADByBezugsNr(bezugsNr, False) ' Falls schon ein DS mit dieser Bezugsnummer vorhanden ist.
|
||||
|
||||
|
||||
|
||||
If readNCTS_Ueberlassungsmeldung009 <> "" And MRN <> "" Then 'BEZUGSNR vorhanden
|
||||
Dim STATUS As DAKOSY_Worker.cDakosy_Statusmeldungen = FORM.getStatusCheckTransID(NCTS.Transaktion.IOReferenz, NCTS.Transaktion.IODatumZeit)
|
||||
STATUS.dySt_BezugsNr = readNCTS_Ueberlassungsmeldung009
|
||||
@@ -4179,7 +4177,7 @@ Public Class cWorker_NCTS
|
||||
|
||||
If saveVerwahrung Then
|
||||
'saveVerwahrungsAusgang(MRN, posErledigung, NCTS, sendMail, testlauf)
|
||||
cWorker_Verwahrung.saveVerwahrungsAusgang(MRN, posErledigung, "", zp, sendMail, testlauf, STATUS.dySt_id, True, "T1")
|
||||
cWorker_Verwahrung.saveVerwahrungsAusgang(MRN, posErledigung, "", zp, sendMail, testlauf, -1, True, "T1")
|
||||
End If
|
||||
|
||||
|
||||
|
||||
@@ -895,7 +895,7 @@ Anzeige:
|
||||
|
||||
Dim gs_row As Array = Nothing
|
||||
|
||||
gs_row = dtGesamtsicherheit.Select("gs_posSubNr = " & SUMA_POSNr & " AND isnull(gsp_MRNNr,'') <> ''")
|
||||
gs_row = dtGesamtsicherheit.Select("gs_posSubNr = " & SUMA_POSNr & " AND isnull(gsp_MRNNr,'') = ''")
|
||||
|
||||
If gs_row.Length = 0 Then
|
||||
Continue For
|
||||
|
||||
Reference in New Issue
Block a user