Compare commits
6 Commits
31e0835914
...
14ac6875c5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
14ac6875c5 | ||
|
|
c74b91713d | ||
|
|
8dba67d3e1 | ||
|
|
ad671443b9 | ||
|
|
3623138fd1 | ||
|
|
85318a3e81 |
@@ -116,6 +116,7 @@ Namespace Documents
|
|||||||
|
|
||||||
|
|
||||||
Private Function IncludeSchema(pDocument As Document, pTemplate As Template) As Document
|
Private Function IncludeSchema(pDocument As Document, pTemplate As Template) As Document
|
||||||
|
Logger.Debug("Adding schema to Document object.")
|
||||||
pDocument.Schema = pTemplate
|
pDocument.Schema = pTemplate
|
||||||
Return pDocument
|
Return pDocument
|
||||||
End Function
|
End Function
|
||||||
@@ -133,8 +134,23 @@ Namespace Documents
|
|||||||
''' </MESOWebService>
|
''' </MESOWebService>
|
||||||
''' </example>
|
''' </example>
|
||||||
Private Function LoadDocumentData(pDocument As Document, pTemplate As Template, pTemplateConfig As TemplateConfig) As Document
|
Private Function LoadDocumentData(pDocument As Document, pTemplate As Template, pTemplateConfig As TemplateConfig) As Document
|
||||||
Dim oText As String = IO.File.ReadAllText(pDocument.FullName)
|
Logger.Debug("Loading file contents")
|
||||||
Dim oDoc = XDocument.Parse(oText)
|
|
||||||
|
Dim oText As String
|
||||||
|
Dim oDoc As XDocument
|
||||||
|
|
||||||
|
Try
|
||||||
|
Logger.Debug("Loading file from fs..")
|
||||||
|
oText = IO.File.ReadAllText(pDocument.FullName)
|
||||||
|
|
||||||
|
Logger.Debug("Parsing file..")
|
||||||
|
oDoc = XDocument.Parse(oText)
|
||||||
|
Catch ex As Exception
|
||||||
|
Logger.Error(ex)
|
||||||
|
Throw ex
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Logger.Debug("File Loaded.")
|
||||||
|
|
||||||
Dim oRootElement As XElement = XmlData.GetElement(oDoc, "MESOWebService")
|
Dim oRootElement As XElement = XmlData.GetElement(oDoc, "MESOWebService")
|
||||||
If oRootElement Is Nothing Then
|
If oRootElement Is Nothing Then
|
||||||
@@ -181,6 +197,8 @@ Namespace Documents
|
|||||||
Where(Function(t) t.Name = oTopLevelElement.Name).
|
Where(Function(t) t.Name = oTopLevelElement.Name).
|
||||||
FirstOrDefault()
|
FirstOrDefault()
|
||||||
|
|
||||||
|
Logger.Debug("Creating fields from [{0}] columns for Table [{1}]", oTable.Columns, oTable.Name)
|
||||||
|
|
||||||
For Each oColumn In oTable.Columns
|
For Each oColumn In oTable.Columns
|
||||||
Dim oSubElement = oSubElements.
|
Dim oSubElement = oSubElements.
|
||||||
Where(Function(e) e.Name = oColumn.Name).
|
Where(Function(e) e.Name = oColumn.Name).
|
||||||
@@ -190,6 +208,8 @@ Namespace Documents
|
|||||||
Dim oRequired = oColumn.IsRequired
|
Dim oRequired = oColumn.IsRequired
|
||||||
Dim oValue = oSubElement.Value.Trim()
|
Dim oValue = oSubElement.Value.Trim()
|
||||||
|
|
||||||
|
Logger.Debug("Creating existing field from Element: [{0}]", oSubElement.Name.ToString)
|
||||||
|
|
||||||
' TODO: Needed when we have time for date times
|
' TODO: Needed when we have time for date times
|
||||||
'If oTemplateField.DataType = Constants.ColumnType.Date Then
|
'If oTemplateField.DataType = Constants.ColumnType.Date Then
|
||||||
' Dim oDate = Date.ParseExact(oValue, "yyyy-MM-dd", CultureInfo.InvariantCulture)
|
' Dim oDate = Date.ParseExact(oValue, "yyyy-MM-dd", CultureInfo.InvariantCulture)
|
||||||
@@ -205,6 +225,8 @@ Namespace Documents
|
|||||||
.SortKey = oColumnSortKey
|
.SortKey = oColumnSortKey
|
||||||
})
|
})
|
||||||
Else
|
Else
|
||||||
|
Logger.Debug("Creating new field from Configuration: [{0}]", oColumn.Name)
|
||||||
|
|
||||||
Dim oColumnError = FieldError.None
|
Dim oColumnError = FieldError.None
|
||||||
If oColumn.Config?.IsRequired Then
|
If oColumn.Config?.IsRequired Then
|
||||||
oColumnError = FieldError.MissingValue
|
oColumnError = FieldError.MissingValue
|
||||||
@@ -542,59 +564,72 @@ Namespace Documents
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SetAccountByGLN(oRow As DocumentRow, pMandator As Mandator, pNumberField As String, pNameField As String, pParams As Dictionary(Of String, String))
|
Private Sub SetAccountByGLN(oRow As DocumentRow, pMandator As Mandator, pNumberField As String, pNameField As String, pParams As Dictionary(Of String, String))
|
||||||
' Try to read the Account number (which is a GLN really) and account Name
|
Try
|
||||||
Dim oNumberItem As DocumentRow.FieldValue = oRow.Fields.GetOrDefault(pNumberField)
|
' Try to read the Account number (which is a GLN really) and account Name
|
||||||
Dim oNameItem As DocumentRow.FieldValue = oRow.Fields.GetOrDefault(pNameField)
|
Dim oNumberItem As DocumentRow.FieldValue = oRow.Fields.GetOrDefault(pNumberField)
|
||||||
Dim oContainsAccountName As Boolean = Not IsNothing(oNameItem)
|
Dim oNameItem As DocumentRow.FieldValue = oRow.Fields.GetOrDefault(pNameField)
|
||||||
|
Dim oContainsAccountName As Boolean = Not IsNothing(oNameItem)
|
||||||
|
|
||||||
If oNumberItem Is Nothing Then
|
If oNumberItem Is Nothing Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Try to find an account that matches the GLN
|
' Try to find an account that matches the GLN
|
||||||
Dim oAlternateField = pParams.GetOrDefault("AltField", String.Empty)
|
Dim oAlternateField = pParams.GetOrDefault("AltField", String.Empty)
|
||||||
Dim oAccount = Winline.TryGetAccount(oNumberItem.Original, pMandator, "c260", oAlternateField)
|
Dim oAccount = Winline.TryGetAccount(oNumberItem.Original, pMandator, "c260", oAlternateField)
|
||||||
|
|
||||||
' If an account was found, set it for External and Final value
|
' If an account was found, set it for External and Final value
|
||||||
If oAccount IsNot Nothing Then
|
If oAccount IsNot Nothing Then
|
||||||
oNumberItem.External = oAccount.Id
|
oNumberItem.External = oAccount.Id
|
||||||
oNumberItem.Final = oAccount.Id
|
oNumberItem.Final = oAccount.Id
|
||||||
|
|
||||||
If oContainsAccountName Then
|
If oContainsAccountName Then
|
||||||
oNameItem.External = oAccount.Name
|
oNameItem.External = oAccount.Name
|
||||||
oNameItem.Final = oAccount.Name
|
oNameItem.Final = oAccount.Name
|
||||||
|
Else
|
||||||
|
' TODO: What to to if name field is missing or not set?
|
||||||
|
'oRow.Fields.Add(pNameField, New DocumentRow.FieldValue() With {
|
||||||
|
' .External = oAccount.Name,
|
||||||
|
' .Final = oAccount.Name
|
||||||
|
'})
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
' TODO: What to to if name field is missing or not set?
|
' If no account was found and the field is required,
|
||||||
'oRow.Fields.Add(pNameField, New DocumentRow.FieldValue() With {
|
' mark it as error. Otherwise, do nothing.
|
||||||
' .External = oAccount.Name,
|
If oNumberItem.IsRequired Then
|
||||||
' .Final = oAccount.Name
|
oNumberItem.Error = FieldError.AccountNotFound
|
||||||
'})
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
Catch ex As Exception
|
||||||
' If no account was found and the field is required,
|
Logger.Error(ex)
|
||||||
' mark it as error. Otherwise, do nothing.
|
Throw ex
|
||||||
If oNumberItem.IsRequired Then
|
End Try
|
||||||
oNumberItem.Error = FieldError.AccountNotFound
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function WrapFileInfo(pFileInfo As FileInfo) As Document
|
Private Function WrapFileInfo(pFileInfo As FileInfo) As Document
|
||||||
|
Logger.Debug("Creating new Document object for file [{0}]", pFileInfo.Name)
|
||||||
Return New Document With {.File = pFileInfo}
|
Return New Document With {.File = pFileInfo}
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function ParseFunctionParamsAsDict(pParams As String) As Dictionary(Of String, String)
|
Private Function ParseFunctionParamsAsDict(pParams As String) As Dictionary(Of String, String)
|
||||||
Dim oParamsDict As New Dictionary(Of String, String)
|
Try
|
||||||
|
Dim oParamsDict As New Dictionary(Of String, String)
|
||||||
|
|
||||||
If pParams <> String.Empty Then
|
If pParams <> String.Empty Then
|
||||||
Dim oParamList = pParams.Split("|").ToList()
|
Dim oParamList = pParams.Split("|").ToList()
|
||||||
For Each oParam In oParamList
|
For Each oParam In oParamList
|
||||||
Dim oParamSplit = oParam.Split("=")
|
Dim oParamSplit = oParam.Split("=")
|
||||||
oParamsDict.Add(oParamSplit(0), oParamSplit(1))
|
If oParamSplit.Count = 2 Then
|
||||||
Next
|
oParamsDict.Add(oParamSplit(0), oParamSplit(1))
|
||||||
End If
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
Return oParamsDict
|
Return oParamsDict
|
||||||
|
Catch ex As Exception
|
||||||
|
Logger.Error(ex)
|
||||||
|
Return New Dictionary(Of String, String)
|
||||||
|
End Try
|
||||||
End Function
|
End Function
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ Public Class ReportGenerator(Of TReport As IReport)
|
|||||||
|
|
||||||
Dim oPositionMapper = oMapperConfig.GetMapper(Of ReportPosition)(New Dictionary(Of String, String) From {
|
Dim oPositionMapper = oMapperConfig.GetMapper(Of ReportPosition)(New Dictionary(Of String, String) From {
|
||||||
{"Artikelnummer", "Text1"},
|
{"Artikelnummer", "Text1"},
|
||||||
{"Lieferantenartikelnummer", "Text2"},
|
{"Positionstext", "Text2"},
|
||||||
{"Bezeichnung", "Text3"},
|
{"Bezeichnung", "Text3"},
|
||||||
{"Menge_bestellt", "Text4"},
|
{"Menge_bestellt", "Text4"},
|
||||||
{"Menge_geliefert", "Text5"},
|
{"Menge_geliefert", "Text5"},
|
||||||
|
|||||||
@@ -219,15 +219,21 @@ Namespace Winline
|
|||||||
Async Function ExportDocumentFromWinline(pDocument As Entities.ExportDocument, pTemplate As Template, pMandator As Mandator, Optional pIsTest As Boolean = False) As Task(Of Boolean)
|
Async Function ExportDocumentFromWinline(pDocument As Entities.ExportDocument, pTemplate As Template, pMandator As Mandator, Optional pIsTest As Boolean = False) As Task(Of Boolean)
|
||||||
Dim oWS = Config
|
Dim oWS = Config
|
||||||
|
|
||||||
|
Logger.Info("Exporting document from Winline")
|
||||||
|
|
||||||
' --- Build all teh filenamez and pathz
|
' --- Build all teh filenamez and pathz
|
||||||
Dim oBaseFileName As String = FileEx.GetDateTimeString()
|
Dim oBaseFileName As String = FileEx.GetDateTimeString()
|
||||||
Dim oFileName = $"{pTemplate.Name}-{oBaseFileName}.xml"
|
Dim oFileName = $"{pTemplate.Name}-{oBaseFileName}.xml"
|
||||||
'Dim oFileName = FileEx.GetFilenameWithPrefix(oBaseFileName, pTemplate.Name, "xml")
|
'Dim oFileName = FileEx.GetFilenameWithPrefix(oBaseFileName, pTemplate.Name, "xml")
|
||||||
|
|
||||||
|
Logger.Info("Filename will be [{0}]", oFileName)
|
||||||
|
|
||||||
' Save the filename to the document
|
' Save the filename to the document
|
||||||
pDocument.FilenameExport = oFileName
|
pDocument.FilenameExport = oFileName
|
||||||
|
|
||||||
RaiseEvent WebServiceProgress(Me, "Dateien schreiben")
|
RaiseEvent WebServiceProgress(Me, "Abfrage vorbereiten")
|
||||||
|
|
||||||
|
Logger.Debug("Preparing WebService call")
|
||||||
|
|
||||||
' --- Prepare URL and HTTP Client
|
' --- Prepare URL and HTTP Client
|
||||||
Dim oTemplateType = 30
|
Dim oTemplateType = 30
|
||||||
@@ -242,6 +248,8 @@ Namespace Winline
|
|||||||
oActionCode = 0
|
oActionCode = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Logger.Debug("This is a test: [{0}]", pIsTest)
|
||||||
|
|
||||||
Dim oURL As String = $"{oWS.BaseUrl}/ewlservice/export?User={oWS.Username}&Password={oWS.Password}&Company={pMandator.Id}&Type={oTemplateType}&Vorlage={oTemplateName}&ActionCode={oActionCode}&Key={oKey}"
|
Dim oURL As String = $"{oWS.BaseUrl}/ewlservice/export?User={oWS.Username}&Password={oWS.Password}&Company={pMandator.Id}&Type={oTemplateType}&Vorlage={oTemplateName}&ActionCode={oActionCode}&Key={oKey}"
|
||||||
Dim oClient As New HttpClient()
|
Dim oClient As New HttpClient()
|
||||||
|
|
||||||
@@ -252,6 +260,8 @@ Namespace Winline
|
|||||||
' --- Bring the action!
|
' --- Bring the action!
|
||||||
Try
|
Try
|
||||||
Dim oResponse As HttpResponseMessage = Await oClient.GetAsync(oURL)
|
Dim oResponse As HttpResponseMessage = Await oClient.GetAsync(oURL)
|
||||||
|
Logger.Info("Request ended with code: [{0}]", oResponse.StatusCode)
|
||||||
|
|
||||||
Await HandleExportResponse(oResponse, pDocument, pTemplate, pMandator, oBaseFileName)
|
Await HandleExportResponse(oResponse, pDocument, pTemplate, pMandator, oBaseFileName)
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
@@ -268,12 +278,14 @@ Namespace Winline
|
|||||||
|
|
||||||
Private Async Function HandleExportResponse(pResponse As HttpResponseMessage, pDocument As Entities.ExportDocument, pTemplate As Template, pMandator As Mandator, pBaseFileName As String) As Task
|
Private Async Function HandleExportResponse(pResponse As HttpResponseMessage, pDocument As Entities.ExportDocument, pTemplate As Template, pMandator As Mandator, pBaseFileName As String) As Task
|
||||||
pResponse.EnsureSuccessStatusCode()
|
pResponse.EnsureSuccessStatusCode()
|
||||||
|
|
||||||
Dim oResponseBody As String = Await pResponse.Content.ReadAsStringAsync()
|
Dim oResponseBody As String = Await pResponse.Content.ReadAsStringAsync()
|
||||||
Dim oContentType = pResponse.Content.Headers.ContentType.MediaType
|
Dim oContentType = pResponse.Content.Headers.ContentType.MediaType
|
||||||
Dim oSerializer = Serializer.GetSerializer(GetType(Templates.Entities.MESOWebServiceResult))
|
Dim oSerializer = Serializer.GetSerializer(GetType(Templates.Entities.MESOWebServiceResult))
|
||||||
|
|
||||||
RaiseEvent WebServiceProgress(Me, "Antwort verarbeiten")
|
RaiseEvent WebServiceProgress(Me, "Antwort verarbeiten")
|
||||||
|
|
||||||
|
Logger.Debug("Postprocessing response.")
|
||||||
oResponseBody = ApplyItemFunctionsForExport(pDocument, pTemplate, pMandator, oResponseBody)
|
oResponseBody = ApplyItemFunctionsForExport(pDocument, pTemplate, pMandator, oResponseBody)
|
||||||
|
|
||||||
Select Case oContentType
|
Select Case oContentType
|
||||||
@@ -300,6 +312,8 @@ Namespace Winline
|
|||||||
oDoc.LoadXml(oResponseBody)
|
oDoc.LoadXml(oResponseBody)
|
||||||
|
|
||||||
For Each oTable In pTemplate.Tables
|
For Each oTable In pTemplate.Tables
|
||||||
|
Logger.Debug("Processing Table [{0}]", oTable.Name)
|
||||||
|
|
||||||
For Each oItem As Template.Column In oTable.Columns
|
For Each oItem As Template.Column In oTable.Columns
|
||||||
Dim oTableName As String = oTable.Name
|
Dim oTableName As String = oTable.Name
|
||||||
Dim oItemName As String = oItem.Name
|
Dim oItemName As String = oItem.Name
|
||||||
@@ -308,17 +322,21 @@ Namespace Winline
|
|||||||
Continue For
|
Continue For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Logger.Debug("Processing item [{0}]", oItemName)
|
||||||
|
|
||||||
Dim oFunction = oItem.Config.Function.Name
|
Dim oFunction = oItem.Config.Function.Name
|
||||||
|
|
||||||
Dim oPath = $"//MESOWebService/{oTableName}/{oItemName}"
|
Dim oPath = $"//MESOWebService/{oTableName}/{oItemName}"
|
||||||
Dim oNodes As XmlNodeList = oDoc.SelectNodes(oPath)
|
Dim oNodes As XmlNodeList = oDoc.SelectNodes(oPath)
|
||||||
|
|
||||||
|
Logger.Debug("Calling function [{0}] on note [{1}]", oFunction, oPath)
|
||||||
|
|
||||||
For Each oNode As XmlNode In oNodes
|
For Each oNode As XmlNode In oNodes
|
||||||
If oItem.Config.Function.Name = "GLN" Then
|
If oItem.Config.Function.Name = "GLN" Then
|
||||||
Dim oGLN = Winline.TryGetGLN(oNode.InnerText, pMandator)
|
Dim oGLN = Winline.TryGetGLN(oNode.InnerText, pMandator)
|
||||||
|
|
||||||
If oGLN Is Nothing Then
|
If oGLN Is Nothing Then
|
||||||
Throw New Exceptions.MissingAttributeException("GLN")
|
Throw New MissingAttributeException("GLN")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
oNode.InnerText = oGLN
|
oNode.InnerText = oGLN
|
||||||
@@ -327,7 +345,11 @@ Namespace Winline
|
|||||||
Dim oEAN = Winline.TryGetEAN(oNode.InnerText, pMandator)
|
Dim oEAN = Winline.TryGetEAN(oNode.InnerText, pMandator)
|
||||||
|
|
||||||
If oEAN Is Nothing Then
|
If oEAN Is Nothing Then
|
||||||
Throw New Exceptions.MissingAttributeException("EAN")
|
' 21.04.2022: Relax the EAN Check
|
||||||
|
' Since it is possible to have articles without a proper EAN in export,
|
||||||
|
' we dont throw here, but leave the original value in case of a failure.
|
||||||
|
' Throw New Exceptions.MissingAttributeException("EAN")
|
||||||
|
Logger.Warn("EAN could not be retrieved for Node {0}. Skipping.", oNode.Name)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
oNode.InnerText = oEAN
|
oNode.InnerText = oEAN
|
||||||
@@ -337,7 +359,7 @@ Namespace Winline
|
|||||||
Dim oValue = Database.GetScalarValue(oSQL)
|
Dim oValue = Database.GetScalarValue(oSQL)
|
||||||
|
|
||||||
If oValue Is Nothing Then
|
If oValue Is Nothing Then
|
||||||
Throw New Exceptions.MissingAttributeException("SQL")
|
Throw New MissingAttributeException("SQL")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
oNode.InnerText = oValue
|
oNode.InnerText = oValue
|
||||||
|
|||||||
@@ -48,6 +48,12 @@ Public Class GridLoader
|
|||||||
.VisibleIndex = oVisibleIndex
|
.VisibleIndex = oVisibleIndex
|
||||||
}
|
}
|
||||||
|
|
||||||
|
' TODO: Correclty format all values, but especially currency and numbers
|
||||||
|
'If oCol.DataType = ColumnType.Decimal Then
|
||||||
|
' oColumn.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric
|
||||||
|
' oColumn.DisplayFormat.FormatString = "c2"
|
||||||
|
'End If
|
||||||
|
|
||||||
oView.Columns.Add(oColumn)
|
oView.Columns.Add(oColumn)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices
|
|||||||
<Assembly: AssemblyCompany("Digital Data")>
|
<Assembly: AssemblyCompany("Digital Data")>
|
||||||
<Assembly: AssemblyProduct("WebService Multitool")>
|
<Assembly: AssemblyProduct("WebService Multitool")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2022")>
|
<Assembly: AssemblyCopyright("Copyright © 2022")>
|
||||||
<Assembly: AssemblyTrademark("1.2.9.1")>
|
<Assembly: AssemblyTrademark("1.2.9.2")>
|
||||||
|
|
||||||
<Assembly: ComVisible(False)>
|
<Assembly: ComVisible(False)>
|
||||||
|
|
||||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' indem Sie "*" wie unten gezeigt eingeben:
|
' indem Sie "*" wie unten gezeigt eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("1.2.9.1")>
|
<Assembly: AssemblyVersion("1.2.9.2")>
|
||||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
|
|||||||
14
MultiTool.Form/Reports/OrderReport.Designer.vb
generated
14
MultiTool.Form/Reports/OrderReport.Designer.vb
generated
@@ -87,9 +87,9 @@ Partial Public Class OrderReport
|
|||||||
Me.XrTableCell18 = New DevExpress.XtraReports.UI.XRTableCell()
|
Me.XrTableCell18 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||||
Me.tableCell46 = New DevExpress.XtraReports.UI.XRTableCell()
|
Me.tableCell46 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||||
Me.XrTableCell8 = New DevExpress.XtraReports.UI.XRTableCell()
|
Me.XrTableCell8 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||||
Me.ObjectDataSource1 = New DevExpress.DataAccess.ObjectBinding.ObjectDataSource(Me.components)
|
|
||||||
Me.GroupFooter1 = New DevExpress.XtraReports.UI.GroupFooterBand()
|
Me.GroupFooter1 = New DevExpress.XtraReports.UI.GroupFooterBand()
|
||||||
Me.label2 = New DevExpress.XtraReports.UI.XRLabel()
|
Me.label2 = New DevExpress.XtraReports.UI.XRLabel()
|
||||||
|
Me.ObjectDataSource1 = New DevExpress.DataAccess.ObjectBinding.ObjectDataSource(Me.components)
|
||||||
CType(Me.XrTable2, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.XrTable2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
CType(Me.XrTable1, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.XrTable1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
CType(Me.table3, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.table3, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
@@ -488,7 +488,7 @@ Partial Public Class OrderReport
|
|||||||
Me.tableCell31.Multiline = True
|
Me.tableCell31.Multiline = True
|
||||||
Me.tableCell31.Name = "tableCell31"
|
Me.tableCell31.Name = "tableCell31"
|
||||||
Me.tableCell31.StyleName = "DetailCaption2"
|
Me.tableCell31.StyleName = "DetailCaption2"
|
||||||
Me.tableCell31.Text = "Artikelnummer" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "Lieferant"
|
Me.tableCell31.Text = "Positionstext"
|
||||||
Me.tableCell31.Weight = 0.13529574805877542R
|
Me.tableCell31.Weight = 0.13529574805877542R
|
||||||
'
|
'
|
||||||
'XrTableCell13
|
'XrTableCell13
|
||||||
@@ -688,11 +688,6 @@ Partial Public Class OrderReport
|
|||||||
Me.XrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight
|
Me.XrTableCell8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight
|
||||||
Me.XrTableCell8.Weight = 0.089263976911086243R
|
Me.XrTableCell8.Weight = 0.089263976911086243R
|
||||||
'
|
'
|
||||||
'ObjectDataSource1
|
|
||||||
'
|
|
||||||
Me.ObjectDataSource1.DataSource = GetType(MultiTool.Common.Report.ReportSource)
|
|
||||||
Me.ObjectDataSource1.Name = "ObjectDataSource1"
|
|
||||||
'
|
|
||||||
'GroupFooter1
|
'GroupFooter1
|
||||||
'
|
'
|
||||||
Me.GroupFooter1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.label2})
|
Me.GroupFooter1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.label2})
|
||||||
@@ -711,6 +706,11 @@ Partial Public Class OrderReport
|
|||||||
Me.label2.StylePriority.UseBackColor = False
|
Me.label2.StylePriority.UseBackColor = False
|
||||||
Me.label2.StylePriority.UseBorders = False
|
Me.label2.StylePriority.UseBorders = False
|
||||||
'
|
'
|
||||||
|
'ObjectDataSource1
|
||||||
|
'
|
||||||
|
Me.ObjectDataSource1.DataSource = GetType(MultiTool.Common.Report.ReportSource)
|
||||||
|
Me.ObjectDataSource1.Name = "ObjectDataSource1"
|
||||||
|
'
|
||||||
'OrderReport
|
'OrderReport
|
||||||
'
|
'
|
||||||
Me.Bands.AddRange(New DevExpress.XtraReports.UI.Band() {Me.TopMargin, Me.BottomMargin, Me.ReportHeader, Me.Detail, Me.DetailReport})
|
Me.Bands.AddRange(New DevExpress.XtraReports.UI.Band() {Me.TopMargin, Me.BottomMargin, Me.ReportHeader, Me.Detail, Me.DetailReport})
|
||||||
|
|||||||
@@ -215,6 +215,7 @@ Public Class frmExportMain
|
|||||||
|
|
||||||
If oDocuments Is Nothing Then
|
If oDocuments Is Nothing Then
|
||||||
FormHelper.ShowWarning("There was an error in the Query.")
|
FormHelper.ShowWarning("There was an error in the Query.")
|
||||||
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
GridControlDocuments.DataSource = oDocuments
|
GridControlDocuments.DataSource = oDocuments
|
||||||
|
|||||||
@@ -282,9 +282,21 @@ Public Class frmImportMain
|
|||||||
' Generate the report
|
' Generate the report
|
||||||
Dim oReport = ReportGenerator.GenerateReport(oDocument, CurrentTemplate)
|
Dim oReport = ReportGenerator.GenerateReport(oDocument, CurrentTemplate)
|
||||||
Dim oFilePath = ReportGenerator.GetReportFilePath(oDocument, CurrentTemplate)
|
Dim oFilePath = ReportGenerator.GetReportFilePath(oDocument, CurrentTemplate)
|
||||||
|
Dim oFileInfo = New FileInfo(oFilePath)
|
||||||
|
|
||||||
' Export it to pdf
|
' Export it to pdf
|
||||||
oReport.ExportToPdf(oFilePath)
|
oReport.ExportToPdf(oFilePath)
|
||||||
|
|
||||||
|
Dim oMessage = $"Die Datei wurde im Verzeichnis '{oFileInfo.Directory}' abgelegt. Möchten Sie die Datei jetzt öffnen?"
|
||||||
|
Dim oResult = MsgBox(oMessage, MsgBoxStyle.Question Or MsgBoxStyle.YesNo, Text)
|
||||||
|
|
||||||
|
If oResult = MsgBoxResult.Yes Then
|
||||||
|
Try
|
||||||
|
Process.Start(oFilePath)
|
||||||
|
Catch ex As Exception
|
||||||
|
FormHelper.ShowError(ex, "Export Report")
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Async Sub btnTestTransferFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnTestTransferFile.ItemClick
|
Private Async Sub btnTestTransferFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnTestTransferFile.ItemClick
|
||||||
@@ -739,6 +751,9 @@ Public Class frmImportMain
|
|||||||
WebService.RaiseWebServiceProgress("Bericht erzeugen")
|
WebService.RaiseWebServiceProgress("Bericht erzeugen")
|
||||||
|
|
||||||
' Generate the report
|
' Generate the report
|
||||||
|
|
||||||
|
' TODO: Call GetReportFilePath in GenerateReport to better control
|
||||||
|
' when filename is generated and use it as placeholder
|
||||||
Dim oReport = ReportGenerator.GenerateReport(pDocument, CurrentTemplate)
|
Dim oReport = ReportGenerator.GenerateReport(pDocument, CurrentTemplate)
|
||||||
Dim oFilePath = ReportGenerator.GetReportFilePath(pDocument, CurrentTemplate)
|
Dim oFilePath = ReportGenerator.GetReportFilePath(pDocument, CurrentTemplate)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user