MS GerneratorID
This commit is contained in:
@@ -54,6 +54,9 @@
|
|||||||
<setting name="YDistance" serializeAs="String">
|
<setting name="YDistance" serializeAs="String">
|
||||||
<value>720</value>
|
<value>720</value>
|
||||||
</setting>
|
</setting>
|
||||||
|
<setting name="GEN_ID" serializeAs="String">
|
||||||
|
<value>01</value>
|
||||||
|
</setting>
|
||||||
</WISAG_PM_REPORT.My.MySettings>
|
</WISAG_PM_REPORT.My.MySettings>
|
||||||
</applicationSettings>
|
</applicationSettings>
|
||||||
</configuration>
|
</configuration>
|
||||||
12
WISAG_PM_REPORT/Form1.Designer.vb
generated
12
WISAG_PM_REPORT/Form1.Designer.vb
generated
@@ -31,6 +31,7 @@ Partial Class Form1
|
|||||||
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
|
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
|
||||||
Me.ToolStripStatusLabel1 = New System.Windows.Forms.ToolStripStatusLabel()
|
Me.ToolStripStatusLabel1 = New System.Windows.Forms.ToolStripStatusLabel()
|
||||||
Me.ToolStripStatusLabel2 = New System.Windows.Forms.ToolStripStatusLabel()
|
Me.ToolStripStatusLabel2 = New System.Windows.Forms.ToolStripStatusLabel()
|
||||||
|
Me.tsiGENKey = New System.Windows.Forms.ToolStripStatusLabel()
|
||||||
Me.TimerMinute = New System.Windows.Forms.Timer(Me.components)
|
Me.TimerMinute = New System.Windows.Forms.Timer(Me.components)
|
||||||
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
|
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
|
||||||
Me.ToolStripLabel1 = New System.Windows.Forms.ToolStripLabel()
|
Me.ToolStripLabel1 = New System.Windows.Forms.ToolStripLabel()
|
||||||
@@ -188,7 +189,7 @@ Partial Class Form1
|
|||||||
'
|
'
|
||||||
'StatusStrip1
|
'StatusStrip1
|
||||||
'
|
'
|
||||||
Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripStatusLabel1, Me.ToolStripStatusLabel2})
|
Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripStatusLabel1, Me.ToolStripStatusLabel2, Me.tsiGENKey})
|
||||||
Me.StatusStrip1.Location = New System.Drawing.Point(0, 779)
|
Me.StatusStrip1.Location = New System.Drawing.Point(0, 779)
|
||||||
Me.StatusStrip1.Name = "StatusStrip1"
|
Me.StatusStrip1.Name = "StatusStrip1"
|
||||||
Me.StatusStrip1.Size = New System.Drawing.Size(1007, 22)
|
Me.StatusStrip1.Size = New System.Drawing.Size(1007, 22)
|
||||||
@@ -207,6 +208,13 @@ Partial Class Form1
|
|||||||
Me.ToolStripStatusLabel2.Size = New System.Drawing.Size(116, 17)
|
Me.ToolStripStatusLabel2.Size = New System.Drawing.Size(116, 17)
|
||||||
Me.ToolStripStatusLabel2.Text = "Timer: 3 min; 06-23h"
|
Me.ToolStripStatusLabel2.Text = "Timer: 3 min; 06-23h"
|
||||||
'
|
'
|
||||||
|
'tsiGENKey
|
||||||
|
'
|
||||||
|
Me.tsiGENKey.Image = CType(resources.GetObject("tsiGENKey.Image"), System.Drawing.Image)
|
||||||
|
Me.tsiGENKey.Name = "tsiGENKey"
|
||||||
|
Me.tsiGENKey.Size = New System.Drawing.Size(136, 17)
|
||||||
|
Me.tsiGENKey.Text = "ToolStripStatusLabel3"
|
||||||
|
'
|
||||||
'TimerMinute
|
'TimerMinute
|
||||||
'
|
'
|
||||||
Me.TimerMinute.Enabled = True
|
Me.TimerMinute.Enabled = True
|
||||||
@@ -229,6 +237,7 @@ Partial Class Form1
|
|||||||
'
|
'
|
||||||
'txtDocID
|
'txtDocID
|
||||||
'
|
'
|
||||||
|
Me.txtDocID.Font = New System.Drawing.Font("Segoe UI", 9.0!)
|
||||||
Me.txtDocID.Name = "txtDocID"
|
Me.txtDocID.Name = "txtDocID"
|
||||||
Me.txtDocID.Size = New System.Drawing.Size(100, 25)
|
Me.txtDocID.Size = New System.Drawing.Size(100, 25)
|
||||||
'
|
'
|
||||||
@@ -1391,4 +1400,5 @@ Partial Class Form1
|
|||||||
Friend WithEvents VWCUST_STAMPTableAdapter As MyDatasetTableAdapters.VWCUST_STAMPTableAdapter
|
Friend WithEvents VWCUST_STAMPTableAdapter As MyDatasetTableAdapters.VWCUST_STAMPTableAdapter
|
||||||
Friend WithEvents ToolStripButton6 As ToolStripButton
|
Friend WithEvents ToolStripButton6 As ToolStripButton
|
||||||
Friend WithEvents ToolStripStatusLabel2 As ToolStripStatusLabel
|
Friend WithEvents ToolStripStatusLabel2 As ToolStripStatusLabel
|
||||||
|
Friend WithEvents tsiGENKey As ToolStripStatusLabel
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -132,13 +132,21 @@
|
|||||||
<metadata name="StatusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="StatusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>829, 17</value>
|
<value>829, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="tsiGENKey.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||||
|
xAAADsQBlSsOGwAAAIhJREFUOE+lkUEOABEMRZ3NXuImjsxiZjb2th01JUgzNCQP+dWXQAHAEWwogQ0l
|
||||||
|
sKGEb/oZKSWb8RkgcG+xthTgwRgjOOdAa13APWZYawIys/TNvSTX/CCYD/UYY+C+nkLNsOdIEEIYBVXS
|
||||||
|
r8jWFejBWmNdM3uPWAUzlK+/8QQ2lMCGEthwH1AvkxW67ZxkSbQAAAAASUVORK5CYII=
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
<metadata name="TimerMinute.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="TimerMinute.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>946, 17</value>
|
<value>946, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="ToolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="ToolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>1067, 17</value>
|
<value>1067, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
|
||||||
<data name="ToolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="ToolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ Public Class Form1
|
|||||||
Next
|
Next
|
||||||
Me.TimerMinute.Start()
|
Me.TimerMinute.Start()
|
||||||
txtDocID.Text = My.Settings.MyDocID
|
txtDocID.Text = My.Settings.MyDocID
|
||||||
|
tsiGENKey.Text = "Generator-ID: " & My.Settings.GEN_ID
|
||||||
End Sub
|
End Sub
|
||||||
Dim Run_Active As Boolean = False
|
Dim Run_Active As Boolean = False
|
||||||
Private Sub TimerMinute_Tick(sender As Object, e As EventArgs) Handles TimerMinute.Tick
|
Private Sub TimerMinute_Tick(sender As Object, e As EventArgs) Handles TimerMinute.Tick
|
||||||
@@ -50,14 +51,25 @@ Public Class Form1
|
|||||||
Try
|
Try
|
||||||
Dim oDT As DataTable = MySQLSDB.GetDatatable(My.Settings.oSQLGetDocId)
|
Dim oDT As DataTable = MySQLSDB.GetDatatable(My.Settings.oSQLGetDocId)
|
||||||
If Not IsNothing(oDT) Then
|
If Not IsNothing(oDT) Then
|
||||||
|
Dim oDocID As Long
|
||||||
If oDT.Rows.Count > 0 Then
|
If oDT.Rows.Count > 0 Then
|
||||||
|
For Each oRow As DataRow In oDT.Rows
|
||||||
|
oDocID = oRow.Item(0).ToString
|
||||||
|
Dim oInsert = $"INSERT INTO TBCUST_PM_RPT_2BCREATED (DocID,GEN_ID) VALUES ({oDocID},'{My.Settings.GEN_ID}')"
|
||||||
|
MySQLSDB.ExecuteNonQuery(oInsert)
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
Run_Active = True
|
Run_Active = True
|
||||||
For Each oRow As DataRow In oDT.Rows
|
For Each oRow As DataRow In oDT.Rows
|
||||||
Dim oSQL = $"select count(*) from VWCUST_RPTPM_INV_RPT_STAMP_CHECK WHERE docID = {oRow.Item(0).ToString}"
|
oDocID = oRow.Item(0).ToString
|
||||||
|
Dim oSQL = $"select count(*) from VWCUST_RPTPM_INV_RPT_STAMP_CHECK WHERE docID = {oDocID.ToString}"
|
||||||
If MySQLSDB.GetScalarValue(oSQL) >= 1 Then
|
If MySQLSDB.GetScalarValue(oSQL) >= 1 Then
|
||||||
Create_Report(oRow.Item(0).ToString, 0)
|
Create_Report(oDocID.ToString, 0)
|
||||||
Else
|
Else
|
||||||
Logger.Info($"ATTENTION - No FinalFreigabe for DocID: {oRow.Item(0).ToString}")
|
Logger.Info($"ATTENTION - No FinalFreigabe for DocID: {oDocID.ToString}")
|
||||||
|
Dim oDELETE = $"DELETE FROM TBCUST_PM_RPT_2BCREATED WHERE DocID = {oDocID} AND GEN_ID = '{My.Settings.GEN_ID}'"
|
||||||
|
MySQLSDB.ExecuteNonQuery(oDELETE)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
@@ -74,62 +86,17 @@ Public Class Form1
|
|||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Sub Create_Report(DocID As String, ReportOption As Integer)
|
Sub Create_Report(pDocID As String, ReportOption As Integer)
|
||||||
MyFreigabebericht = ""
|
MyFreigabebericht = ""
|
||||||
MyStempel = ""
|
MyStempel = ""
|
||||||
MyOriginStamped = ""
|
MyOriginStamped = ""
|
||||||
Logger.Info($"Trying to create report for DocID: {DocID}...")
|
Logger.Info($"Trying to create report for DocID: {pDocID}...")
|
||||||
Dim errortext As String
|
Dim errortext As String
|
||||||
Try
|
Try
|
||||||
If DEBUG = True Then
|
If DEBUG = True Then
|
||||||
DocumentViewer1.DocumentSource = Nothing
|
DocumentViewer1.DocumentSource = Nothing
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Me.MyDataset.VWCUST_RPTPM_UNION.Clear()
|
|
||||||
' VWCUST_RPTPM_UNIONTableAdapter.Connection.ConnectionString = My.Settings.CONF_SQLSERVER
|
|
||||||
|
|
||||||
|
|
||||||
' Me.VWCUST_RPTPM_UNIONTableAdapter.Fill(Me.MyDataset.VWCUST_RPTPM_UNION, DocID)
|
|
||||||
' Logger.Debug($"---VWCUST_RPTPM_UNION.Rows.Count = [{MyDataset.VWCUST_RPTPM_UNION.Rows.Count}]!---")
|
|
||||||
' If Me.MyDataset.VWCUST_RPTPM_UNION.Rows.Count = 0 Then
|
|
||||||
' Logger.Debug($"no rows for UnionView VWCUST_RPTPM_UNION for DocID {DocID}")
|
|
||||||
' Logger.Debug("My.Settings.CONF_SQLSERVER: " & My.Settings.CONF_SQLSERVER)
|
|
||||||
' Dim oSQL = $"SELECT GroupTypeID, GroupType, DOC_ID, KreditorNummer, KreditorName_Lang, KreditorName, RechnungNr, Referenz, Nettobetrag, Bruttobetrag, Zahlungsziel, Mandant, [Mandant Name], Kostenstelle, [Erhalten wann], Belegdatum,
|
|
||||||
' FG_Email, FG_Freigabe, FG_Wann, WHO, [WHEN], DELEGATION
|
|
||||||
'FROM VWCUST_RPTPM_UNION
|
|
||||||
'WHERE (DOC_ID = {DocID}) AND (LEN(RechnungNr) > 0)"
|
|
||||||
' Dim oCHECKDT As DataTable = MySQLSDB.GetDatatable(oSQL)
|
|
||||||
' Dim oMsg
|
|
||||||
' If oCHECKDT.Rows.Count <> 0 Then
|
|
||||||
' Logger.Debug("Now trying to add rows from regular select row by row...")
|
|
||||||
' Try
|
|
||||||
' For Each oRow As DataRow In oCHECKDT.Rows
|
|
||||||
' MyDataset.VWCUST_RPTPM_UNION.ImportRow(oRow)
|
|
||||||
' Next
|
|
||||||
' MyDataset.VWCUST_RPTPM_UNION.AcceptChanges()
|
|
||||||
' Logger.Debug($"Added {MyDataset.VWCUST_RPTPM_UNION.Rows.Count} rows!!")
|
|
||||||
' Catch ex As Exception
|
|
||||||
' Logger.Debug($"Ups: Unexpected error in Adding rows row by row: {ex.Message}")
|
|
||||||
' Logger.Warn($"Unexpected error in Adding rows row by row: {ex.Message}")
|
|
||||||
' End Try
|
|
||||||
|
|
||||||
' If Me.MyDataset.VWCUST_RPTPM_UNION.Rows.Count <> 0 Then
|
|
||||||
' oMsg = $"...BUT REGULAR SELECT [{oSQL}] returned {oCHECKDT.Rows.Count} rows!!!!"
|
|
||||||
' Logger.Warn(oMsg)
|
|
||||||
' End If
|
|
||||||
' Else
|
|
||||||
' Logger.Warn($"no rows for UnionView VWCUST_RPTPM_UNION for DocID {DocID}")
|
|
||||||
' Logger.Debug("My.Settings.CONF_SQLSERVER: " & My.Settings.CONF_SQLSERVER)
|
|
||||||
' End If
|
|
||||||
' If DEBUG = True And Me.MyDataset.VWCUST_RPTPM_UNION.Rows.Count = 0 Then
|
|
||||||
' If oCHECKDT.Rows.Count <> 0 Then
|
|
||||||
' MsgBox($"No rows for UnionView VWCUST_RPTPM_UNION for DocID {DocID}! " & vbNewLine & oMsg)
|
|
||||||
' Else
|
|
||||||
' MsgBox($"No rows for UnionView VWCUST_RPTPM_UNION for DocID {DocID}")
|
|
||||||
' End If
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
If DEBUG = True Then
|
If DEBUG = True Then
|
||||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in 1:")
|
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error in 1:")
|
||||||
@@ -140,14 +107,14 @@ Public Class Form1
|
|||||||
Try
|
Try
|
||||||
Dim report As New XtraReport2()
|
Dim report As New XtraReport2()
|
||||||
report.ReportPrintOptions.PrintOnEmptyDataSource = False
|
report.ReportPrintOptions.PrintOnEmptyDataSource = False
|
||||||
report.FilterString = "DocID = " + DocID
|
report.FilterString = "DocID = " + pDocID
|
||||||
'report.ObjectDataSource1.Parameters(0).Value = Convert.ToInt64(TextBox1.Text)
|
'report.ObjectDataSource1.Parameters(0).Value = Convert.ToInt64(TextBox1.Text)
|
||||||
report.CreateDocument(False)
|
report.CreateDocument(False)
|
||||||
If DEBUG = True Then
|
If DEBUG = True Then
|
||||||
DocumentViewer1.DocumentSource = report
|
DocumentViewer1.DocumentSource = report
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim oMyErgebnisbericht As String = Path.Combine(My.Settings.CONCAT_TEMPFolder, DocID & "_ERPT.pdf")
|
Dim oMyErgebnisbericht As String = Path.Combine(My.Settings.CONCAT_TEMPFolder, pDocID & "_ERPT.pdf")
|
||||||
If File.Exists(oMyErgebnisbericht) Then
|
If File.Exists(oMyErgebnisbericht) Then
|
||||||
Try
|
Try
|
||||||
File.Delete(oMyErgebnisbericht)
|
File.Delete(oMyErgebnisbericht)
|
||||||
@@ -166,7 +133,7 @@ Public Class Form1
|
|||||||
End If
|
End If
|
||||||
MyFreigabebericht = oMyErgebnisbericht
|
MyFreigabebericht = oMyErgebnisbericht
|
||||||
Dim oOriginFile As String
|
Dim oOriginFile As String
|
||||||
Dim osql = $"select dbo.FNDD_GET_WINDREAM_FILE_PATH ({DocID},1)"
|
Dim osql = $"select dbo.FNDD_GET_WINDREAM_FILE_PATH ({pDocID},1)"
|
||||||
oOriginFile = MySQLSDB.GetScalarValue(osql)
|
oOriginFile = MySQLSDB.GetScalarValue(osql)
|
||||||
If File.Exists(oOriginFile) = False Then
|
If File.Exists(oOriginFile) = False Then
|
||||||
Logger.Warn($"File {oOriginFile} is not existing. Check the pathconfiguration!")
|
Logger.Warn($"File {oOriginFile} is not existing. Check the pathconfiguration!")
|
||||||
@@ -176,17 +143,17 @@ Public Class Form1
|
|||||||
If Not IsNothing(oOriginFile) Then
|
If Not IsNothing(oOriginFile) Then
|
||||||
If File.Exists(My.Settings.Path2PDFTK) Then
|
If File.Exists(My.Settings.Path2PDFTK) Then
|
||||||
|
|
||||||
If Create_MyStempel(DEBUG, DocID) = True Then
|
If Create_MyStempel(DEBUG, pDocID) = True Then
|
||||||
'Jetzt Stempeln des OriginakBeleges mit dem Stamp-Report
|
'Jetzt Stempeln des OriginakBeleges mit dem Stamp-Report
|
||||||
Dim oStampedResult = CreateStampedPDF(oOriginFile, DocID)
|
Dim oStampedResult = CreateStampedPDF(oOriginFile, pDocID)
|
||||||
|
|
||||||
If oStampedResult <> "" Then
|
If oStampedResult <> "" Then
|
||||||
If Concat_Files(DocID, oOriginFile) = True Then
|
If Concat_Files(pDocID, oOriginFile) = True Then
|
||||||
If DEBUG Then
|
If DEBUG Then
|
||||||
MsgBox($"The ResultReport has been created: {MyEndResult}", MsgBoxStyle.Information)
|
MsgBox($"The ResultReport has been created: {MyEndResult}", MsgBoxStyle.Information)
|
||||||
End If
|
End If
|
||||||
If DEBUG = False Then
|
If DEBUG = False Then
|
||||||
Dim oInsert = $"INSERT INTO TBCUST_PM_RPT_CREATED (DocID) VALUES ({Convert.ToInt64(DocID)})"
|
Dim oInsert = $"INSERT INTO TBCUST_PM_RPT_CREATED (DocID) VALUES ({Convert.ToInt64(pDocID)})"
|
||||||
MySQLSDB.ExecuteNonQuery(oInsert)
|
MySQLSDB.ExecuteNonQuery(oInsert)
|
||||||
End If
|
End If
|
||||||
Logger.Info($"Concatted file [{oStampedResult}] created!")
|
Logger.Info($"Concatted file [{oStampedResult}] created!")
|
||||||
@@ -208,6 +175,8 @@ Public Class Form1
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
Dim oUpdate = $"DELETE FROM TBCUST_PM_RPT_2BCREATED WHERE DocID = {pDocID} AND GEN_ID = '{My.Settings.GEN_ID}'"
|
||||||
|
MySQLSDB.ExecuteNonQuery(oUpdate)
|
||||||
errortext = "ex.message: " & ex.Message & vbNewLine & "ex.StackTrace: " & ex.StackTrace.ToString & vbNewLine & "ex.InnerException: " & ex.InnerException.Message
|
errortext = "ex.message: " & ex.Message & vbNewLine & "ex.StackTrace: " & ex.StackTrace.ToString & vbNewLine & "ex.InnerException: " & ex.InnerException.Message
|
||||||
If DEBUG = True Then
|
If DEBUG = True Then
|
||||||
MsgBox(errortext, MsgBoxStyle.Critical, "Error in 2:")
|
MsgBox(errortext, MsgBoxStyle.Critical, "Error in 2:")
|
||||||
@@ -216,9 +185,9 @@ Public Class Form1
|
|||||||
Logger.Error(ex)
|
Logger.Error(ex)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
Private Function Create_MyStempel(istest As Boolean, DocID As String)
|
Private Function Create_MyStempel(istest As Boolean, pDocID As String)
|
||||||
MyStempel = ""
|
MyStempel = ""
|
||||||
Logger.Info($"Trying to create Stampreport for DocID: {DocID}...")
|
Logger.Info($"Trying to create Stampreport for DocID: {pDocID}...")
|
||||||
Dim errortext As String
|
Dim errortext As String
|
||||||
Try
|
Try
|
||||||
If istest = True Then
|
If istest = True Then
|
||||||
@@ -236,14 +205,14 @@ Public Class Form1
|
|||||||
Try
|
Try
|
||||||
Dim myReport As New RptStampIcon()
|
Dim myReport As New RptStampIcon()
|
||||||
myReport.ReportPrintOptions.PrintOnEmptyDataSource = False
|
myReport.ReportPrintOptions.PrintOnEmptyDataSource = False
|
||||||
myReport.FilterString = "DocID = " + DocID
|
myReport.FilterString = "DocID = " + pDocID
|
||||||
'report.ObjectDataSource1.Parameters(0).Value = Convert.ToInt64(TextBox1.Text)
|
'report.ObjectDataSource1.Parameters(0).Value = Convert.ToInt64(TextBox1.Text)
|
||||||
myReport.CreateDocument(False)
|
myReport.CreateDocument(False)
|
||||||
If istest = True Then
|
If istest = True Then
|
||||||
DocumentViewer1.DocumentSource = myReport
|
DocumentViewer1.DocumentSource = myReport
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim oTempStempel As String = Path.Combine(My.Settings.CONCAT_TEMPFolder, DocID & "_Stamp.jpg")
|
Dim oTempStempel As String = Path.Combine(My.Settings.CONCAT_TEMPFolder, pDocID & "_Stamp.jpg")
|
||||||
If File.Exists(oTempStempel) Then
|
If File.Exists(oTempStempel) Then
|
||||||
Try
|
Try
|
||||||
File.Delete(oTempStempel)
|
File.Delete(oTempStempel)
|
||||||
@@ -264,9 +233,9 @@ Public Class Form1
|
|||||||
|
|
||||||
If File.Exists(oTempStempel) Then
|
If File.Exists(oTempStempel) Then
|
||||||
MyStempel = oTempStempel
|
MyStempel = oTempStempel
|
||||||
Logger.Info($"Stampreport created for DocID: {DocID}!")
|
Logger.Info($"Stampreport created for DocID: {pDocID}!")
|
||||||
If istest = True Then
|
If istest = True Then
|
||||||
MsgBox($"Stampreport [{oTempStempel}] created for DocID [{DocID}]!", MsgBoxStyle.Information)
|
MsgBox($"Stampreport [{oTempStempel}] created for DocID [{pDocID}]!", MsgBoxStyle.Information)
|
||||||
End If
|
End If
|
||||||
Return True
|
Return True
|
||||||
Else
|
Else
|
||||||
@@ -276,6 +245,8 @@ Public Class Form1
|
|||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
errortext = "ex.message: " & ex.Message & vbNewLine & "ex.StackTrace: " & ex.StackTrace.ToString & vbNewLine & "ex.InnerException: " & ex.InnerException.Message
|
errortext = "ex.message: " & ex.Message & vbNewLine & "ex.StackTrace: " & ex.StackTrace.ToString & vbNewLine & "ex.InnerException: " & ex.InnerException.Message
|
||||||
|
Dim oUpdate = $"DELETE FROM TBCUST_PM_RPT_2BCREATED WHERE DocID = {pDocID} AND GEN_ID = '{My.Settings.GEN_ID}'"
|
||||||
|
MySQLSDB.ExecuteNonQuery(oUpdate)
|
||||||
If istest = True Then
|
If istest = True Then
|
||||||
MsgBox(errortext, MsgBoxStyle.Critical, "Error in Create_StampReport:")
|
MsgBox(errortext, MsgBoxStyle.Critical, "Error in Create_StampReport:")
|
||||||
Clipboard.SetText(errortext)
|
Clipboard.SetText(errortext)
|
||||||
@@ -284,9 +255,9 @@ Public Class Form1
|
|||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
Private Function CreateStampedPDF(oOriginFile As String, DocID As Integer)
|
Private Function CreateStampedPDF(oOriginFile As String, pDocID As Integer)
|
||||||
Try
|
Try
|
||||||
Logger.Info($"Trying to create stamp on OriginWMFile for DocID: {DocID}...")
|
Logger.Info($"Trying to create stamp on OriginWMFile for DocID: {pDocID}...")
|
||||||
Logger.Debug($"Now in CreateStampedPDF")
|
Logger.Debug($"Now in CreateStampedPDF")
|
||||||
Dim myProcess As New Process
|
Dim myProcess As New Process
|
||||||
Dim ProcID
|
Dim ProcID
|
||||||
|
|||||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.0.0")>
|
<Assembly: AssemblyVersion("2.1.0")>
|
||||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
|
|||||||
11
WISAG_PM_REPORT/My Project/Settings.Designer.vb
generated
11
WISAG_PM_REPORT/My Project/Settings.Designer.vb
generated
@@ -15,7 +15,7 @@ Option Explicit On
|
|||||||
Namespace My
|
Namespace My
|
||||||
|
|
||||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0"), _
|
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0"), _
|
||||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
Partial Friend NotInheritable Class MySettings
|
Partial Friend NotInheritable Class MySettings
|
||||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||||
@@ -164,6 +164,15 @@ Namespace My
|
|||||||
Return CType(Me("YDistance"),Integer)
|
Return CType(Me("YDistance"),Integer)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Configuration.DefaultSettingValueAttribute("01")> _
|
||||||
|
Public ReadOnly Property GEN_ID() As String
|
||||||
|
Get
|
||||||
|
Return CType(Me("GEN_ID"),String)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
End Class
|
End Class
|
||||||
End Namespace
|
End Namespace
|
||||||
|
|
||||||
|
|||||||
@@ -40,5 +40,8 @@
|
|||||||
<Setting Name="YDistance" Type="System.Int32" Scope="Application">
|
<Setting Name="YDistance" Type="System.Int32" Scope="Application">
|
||||||
<Value Profile="(Default)">720</Value>
|
<Value Profile="(Default)">720</Value>
|
||||||
</Setting>
|
</Setting>
|
||||||
|
<Setting Name="GEN_ID" Type="System.String" Scope="Application">
|
||||||
|
<Value Profile="(Default)">01</Value>
|
||||||
|
</Setting>
|
||||||
</Settings>
|
</Settings>
|
||||||
</SettingsFile>
|
</SettingsFile>
|
||||||
Reference in New Issue
Block a user