MDM UST, MSE-API, API-Einstellungen
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
Imports System.Data.SqlClient
|
||||
Imports DocumentFormat.OpenXml.Bibliography
|
||||
|
||||
Public Class SQL
|
||||
Public Const LeerDatum As Date = #12/30/1899#
|
||||
@@ -21,9 +22,20 @@ Public Class SQL
|
||||
|
||||
Public Shared Function GetADMINConnectionString() As String
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then
|
||||
Return My.MySettings.Default.ADMINConnectionString_DEV
|
||||
Try
|
||||
Return My.MySettings.Default.ADMINConnectionString_DEV
|
||||
Catch ex As Exception
|
||||
Return "Data Source=SQLGUIDE01.verag.ost.dmn;Initial Catalog=ADMIN;Integrated Security=false;User ID=AppUser;Password=yp/THDd?xM+pZ$;"
|
||||
|
||||
End Try
|
||||
|
||||
Else
|
||||
Return My.MySettings.Default.ADMINConnectionString_DEV
|
||||
Try
|
||||
Return My.MySettings.Default.ADMINConnectionString_DEV
|
||||
Catch ex As Exception
|
||||
Return "Data Source=SQLGUIDE01.verag.ost.dmn;Initial Catalog=ADMIN;Integrated Security=false;User ID=AppUser;Password=yp/THDd?xM+pZ$;"
|
||||
|
||||
End Try
|
||||
End If
|
||||
End Function
|
||||
Public Shared Function GetFMZOLLConnectionString() As String
|
||||
|
||||
@@ -11,10 +11,9 @@ Imports Spire.Pdf
|
||||
Imports Spire.Pdf.HtmlConverter
|
||||
Imports System.Threading
|
||||
Imports System.Net
|
||||
Imports Spire.Pdf.Tables
|
||||
Imports System.Windows.Forms.VisualStyles
|
||||
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports System.Runtime.InteropServices.ComTypes
|
||||
Imports System.Runtime.DesignerServices
|
||||
|
||||
Public Class cDATENSERVER
|
||||
|
||||
@@ -1249,6 +1248,7 @@ Public Class cFormularManager
|
||||
|
||||
Public Shared Sub PrintViaSpirePDF(PDFFile As String(), Optional printerName As String = "")
|
||||
Try
|
||||
Dim printerPaperSizeA4 As Boolean = False
|
||||
If printerName = "" Then
|
||||
Dim sPrinters As ArrayList
|
||||
|
||||
@@ -1263,9 +1263,22 @@ Public Class cFormularManager
|
||||
|
||||
If VERAG_PROG_ALLGEMEIN.cAllgemein.PRINTER_STANDARD <> String.Empty Then
|
||||
|
||||
For i As Integer = 0 To sPrinters.Count - 1
|
||||
If i.ToString.ToLower.Contains(VERAG_PROG_ALLGEMEIN.cAllgemein.PRINTER_STANDARD.ToLower) Then
|
||||
printerName = i
|
||||
For Each printer In sPrinters
|
||||
|
||||
If printer.ToString.ToLower.Contains(VERAG_PROG_ALLGEMEIN.cAllgemein.PRINTER_STANDARD.ToLower) Then
|
||||
printerName = printer
|
||||
For Each installedPrinter In System.Drawing.Printing.PrinterSettings.InstalledPrinters
|
||||
If printerName = installedPrinter.ToString Then
|
||||
Dim currentInstalledPrinter As New System.Drawing.Printing.PrinterSettings
|
||||
currentInstalledPrinter.PrinterName = printerName
|
||||
For Each sizes In currentInstalledPrinter.PaperSizes
|
||||
If sizes.PaperName = "A4" Then printerPaperSizeA4 = True
|
||||
Exit For
|
||||
Next
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
@@ -1273,14 +1286,35 @@ Public Class cFormularManager
|
||||
If printerName = "" Then
|
||||
Dim oPS As New System.Drawing.Printing.PrinterSettings
|
||||
printerName = oPS.PrinterName
|
||||
For Each sizes In oPS.PaperSizes
|
||||
If sizes.PaperName = "A4" Then printerPaperSizeA4 = True
|
||||
Exit For
|
||||
Next
|
||||
Else
|
||||
If Not printerPaperSizeA4 Then
|
||||
Dim currentInstalledPrinter As New System.Drawing.Printing.PrinterSettings
|
||||
currentInstalledPrinter.PrinterName = printerName
|
||||
For Each sizes In currentInstalledPrinter.PaperSizes
|
||||
If sizes.PaperName = "A4" Then printerPaperSizeA4 = True
|
||||
Exit For
|
||||
Next
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
'Dim docs As Spire.Pdf.PdfDocument() = {New Spire.Pdf.PdfDocument("C:\Users\DEVELOPER1\Desktop\Agrotel.pdf")}
|
||||
|
||||
If printerName = "" Then
|
||||
MsgBox("Drucker konnte nicht ermittelt werden!")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not printerPaperSizeA4 Then
|
||||
MsgBox("Der ermittelte Drucker " & printerName & " unterstützt keinen A4 Ausdrucke!" & vbNewLine & "Vorang wird abgebrochen!")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
VERAG_PROG_ALLGEMEIN.cProgramFunctions.spireLoadLicense()
|
||||
For Each pdfPath In PDFFile
|
||||
Dim doc As New Spire.Pdf.PdfDocument(pdfPath)
|
||||
@@ -1290,7 +1324,14 @@ Public Class cFormularManager
|
||||
doc.PageSettings.Orientation = Spire.Pdf.PdfPageOrientation.Landscape
|
||||
doc.PrintSettings.SelectSinglePageLayout(PdfSinglePageScalingMode.FitSize, True)
|
||||
doc.PrintSettings.PrinterName = printerName
|
||||
doc.Print()
|
||||
|
||||
If doc.PrintSettings.IsValid Then
|
||||
doc.Print()
|
||||
Else
|
||||
MsgBox("Druckereinstellungen ungültig!")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'doc.PrintDocument.DefaultPageSettings.Landscape = True
|
||||
@@ -1485,8 +1526,9 @@ Public Class cFormularManager
|
||||
|
||||
If openFileAfterDownload Then
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End Using
|
||||
End Using
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Public Class cMSEAPI
|
||||
Dim SQL As New SQL
|
||||
Dim apiSettingsloaded As Boolean = False
|
||||
Dim test As Boolean = False
|
||||
Public PDFRECHNUNGENPFAD As String
|
||||
Dim PDFRECHNUNGENPFAD As String = ""
|
||||
|
||||
|
||||
Sub New(program As String)
|
||||
|
||||
Reference in New Issue
Block a user