Improve frmConfig, Fix missing loop in ApplyItemFunctionsForExport, Add support for SQL function
This commit is contained in:
@@ -528,7 +528,7 @@ Namespace Winline
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
Public Function GetDocuments(pMandator As Mandator, pTemplate As Template, pDocumentType As Integer, pOptions As GetDocumentArgs) As List(Of Document)
|
||||
Public Function GetDocuments(pMandator As Mandator, pTemplate As Template, pDocumentType As Integer, pOptions As GetDocumentArgs) As List(Of ExportDocument)
|
||||
Try
|
||||
Dim oYear As Integer = Config.GetWinLineYear()
|
||||
|
||||
@@ -615,7 +615,7 @@ Namespace Winline
|
||||
{oDateToConstraint}
|
||||
T.[mesocomp] = '{pMandator.Id}' AND T.[mesoyear] = {oYear}"
|
||||
Dim oTable As DataTable = Database.GetDatatable(oSql)
|
||||
Dim oDocuments As New List(Of Document)
|
||||
Dim oDocuments As New List(Of ExportDocument)
|
||||
|
||||
For Each oRow As DataRow In oTable.Rows
|
||||
Try
|
||||
@@ -639,7 +639,7 @@ Namespace Winline
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Async Function ExecuteFinalSQL(pDocument As Document, pTemplate As Template, pMandator As Mandator) As Task(Of Boolean)
|
||||
Public Async Function ExecuteFinalSQL(pDocument As ExportDocument, pTemplate As Template, pMandator As Mandator) As Task(Of Boolean)
|
||||
Try
|
||||
Dim oSql As String = Patterns.ReplaceForExport(pTemplate, pDocument, pMandator, pTemplate.FinalSQL)
|
||||
Return Await Database.ExecuteNonQueryAsync(oSql)
|
||||
@@ -650,7 +650,7 @@ Namespace Winline
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function GetDocumentFromDataRow(pDataRow As DataRow) As Document
|
||||
Private Function GetDocumentFromDataRow(pDataRow As DataRow) As ExportDocument
|
||||
Dim oAccountNumber = pDataRow.Item("ACCOUNT_NUMBER")
|
||||
Dim oRunningNumber As String = pDataRow.Item("RUNNING_NUMBER")
|
||||
Dim oDocumentType As Integer = pDataRow.Item("DOCUMENT_TYPE")
|
||||
@@ -694,7 +694,7 @@ Namespace Winline
|
||||
|
||||
End Select
|
||||
|
||||
Dim oDocument As New Document With {
|
||||
Dim oDocument As New ExportDocument With {
|
||||
.Account = oAccount,
|
||||
.RunningNumber = oRunningNumber,
|
||||
.Number = oDocumentNumber,
|
||||
|
||||
Reference in New Issue
Block a user