Compare commits
10 Commits
f67368c1d9
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e3b08038a | ||
|
|
7c683cf13e | ||
|
|
6eedcc687f | ||
|
|
62708c02ef | ||
|
|
4a6a8ded7c | ||
|
|
25e9713c2c | ||
|
|
a0e5b4aa0b | ||
|
|
dc4955db17 | ||
|
|
34c8ecbee5 | ||
|
|
c1fa500f36 |
@@ -9,6 +9,7 @@ Imports MultiTool.Common.Winline.Entities
|
||||
Imports MultiTool.Common.Constants
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DevExpress.Utils.CommonDialogs
|
||||
Imports DigitalData.Modules.Base
|
||||
|
||||
Namespace Documents
|
||||
Public Class DocumentLoader
|
||||
@@ -98,8 +99,8 @@ Namespace Documents
|
||||
oDocument = LoadDocumentData(oDocument, pTemplate, TemplateConfig)
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Logger.Error(ex)
|
||||
Throw ex
|
||||
|
||||
End Try
|
||||
|
||||
@@ -107,8 +108,8 @@ Namespace Documents
|
||||
oDocument = Await MatchDataFromWinLine(oDocument, Winline.Mandators, pMandator, pTemplate)
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Logger.Error(ex)
|
||||
Throw ex
|
||||
|
||||
End Try
|
||||
|
||||
@@ -116,8 +117,8 @@ Namespace Documents
|
||||
oDocument = MarkRequiredFields(oDocument)
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
Logger.Error(ex)
|
||||
Throw ex
|
||||
|
||||
End Try
|
||||
|
||||
@@ -542,7 +543,7 @@ Namespace Documents
|
||||
|
||||
If IsNothing(oReferencedField) = False Then
|
||||
Dim oRawValue = oReferencedField.Value?.GetValue(oSubKey)
|
||||
Dim oValue As String = Utils.NotNull(oRawValue, String.Empty)
|
||||
Dim oValue As String = ObjectEx.NotNull(oRawValue, String.Empty)
|
||||
|
||||
If oValue <> String.Empty Then
|
||||
oField.Value.SetExternalValue(oValue)
|
||||
|
||||
@@ -63,18 +63,10 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Filesystem, Version=1.3.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\DDModules\Filesystem\bin\Debug\DigitalData.Modules.Filesystem.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Interfaces, Version=1.7.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\DDModules\Interfaces\bin\Debug\DigitalData.Modules.Interfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Language, Version=1.6.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\DDModules\Language\bin\Debug\DigitalData.Modules.Language.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Logging, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
|
||||
@@ -12,7 +12,7 @@ Imports System.Runtime.InteropServices
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("MultiTool.Common")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2023")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2024")>
|
||||
<Assembly: AssemblyTrademark("1.0.0.0")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Imports DigitalData.Modules.Language
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports MultiTool.Common.Winline.WinlineData
|
||||
|
||||
Namespace Templates
|
||||
@@ -95,8 +95,8 @@ Namespace Templates
|
||||
|
||||
|
||||
Public Function GetParameter(pName As String) As String
|
||||
Dim oParam1 As String = Utils.NotNull(Parameter1, String.Empty)
|
||||
Dim oParam2 As String = Utils.NotNull(Parameter2, String.Empty)
|
||||
Dim oParam1 As String = ObjectEx.NotNull(Parameter1, String.Empty)
|
||||
Dim oParam2 As String = ObjectEx.NotNull(Parameter2, String.Empty)
|
||||
|
||||
Dim oParamValue1 = Parameters.TryGet(oParam1, pName)
|
||||
Dim oParamValue2 = Parameters.TryGet(oParam2, pName)
|
||||
|
||||
@@ -7,6 +7,7 @@ Imports MultiTool.Common.Constants
|
||||
Imports MultiTool.Common.Templates
|
||||
Imports MultiTool.Common.Exceptions
|
||||
Imports MultiTool.Common.Documents
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace Winline
|
||||
Public Class WinlineData
|
||||
@@ -89,7 +90,8 @@ Namespace Winline
|
||||
[c075] -- EAN
|
||||
FROM [{pMandator.Server}].[{pMandator.Database}].[dbo].[v021]
|
||||
WHERE
|
||||
mesocomp = '{pMandator.Id}' AND mesoyear = {oYear}"
|
||||
c038 IS NULL -- Nur Aktive Artikel
|
||||
AND mesocomp = '{pMandator.Id}' AND mesoyear = {oYear}"
|
||||
|
||||
Dim oTable = Await Database.GetDatatableAsync(oSQL)
|
||||
Dim oArticles As New List(Of Article)
|
||||
@@ -435,7 +437,11 @@ Namespace Winline
|
||||
@pResultType = 'CalcPricing';
|
||||
SET NOCOUNT OFF;
|
||||
"
|
||||
Dim oTable As DataTable = Await Database.GetDatatableAsync(oSQL)
|
||||
|
||||
Dim oTable As DataTable
|
||||
Using oConnection As SqlConnection = Database.GetConnection()
|
||||
oTable = Await Database.GetDatatableWithConnectionObjectAsync(oSQL, oConnection, MSSQLServer.TransactionMode.NoTransaction)
|
||||
End Using
|
||||
|
||||
If oTable.Rows.Count = 0 Then
|
||||
Logger.Debug("Price for article [{0}] and Account [{1}] was not found in Mandator: [{2}]", pArticle, pAccountNumber, pMandator.Id)
|
||||
@@ -531,7 +537,7 @@ Namespace Winline
|
||||
FROM [{pMandator.Database}].[dbo].[v021]
|
||||
WHERE
|
||||
[c075] = '{pEAN}'
|
||||
AND [c038] IS NULL -- Aktiv
|
||||
AND [c038] IS NULL -- Nur Aktive Artikel
|
||||
AND [mesocomp] = '{pMandator.Id}' AND [mesoyear] = {oYear}"
|
||||
Dim oTable As DataTable = Database.GetDatatable(oSQL)
|
||||
|
||||
@@ -636,6 +642,7 @@ Namespace Winline
|
||||
[c123] -- Ersatzartikelnummer
|
||||
FROM [{pMandator.Database}].[dbo].[v021]
|
||||
WHERE [c011] = '{pArticleNumber}'
|
||||
AND c038 IS NULL -- Nur Aktive Artikel
|
||||
AND [mesocomp] = '{pMandator.Id}' AND [mesoyear] = {oYear}"
|
||||
Dim oTable As DataTable = Database.GetDatatable(oSQL)
|
||||
|
||||
|
||||
@@ -112,14 +112,6 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\DDModules\Database\bin\Debug\DigitalData.Modules.Database.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Filesystem, Version=1.3.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\DDModules\Filesystem\bin\Debug\DigitalData.Modules.Filesystem.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Language, Version=1.6.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\DDModules\Language\bin\Debug\DigitalData.Modules.Language.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.Modules.Logging, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
|
||||
@@ -12,8 +12,8 @@ Imports System.Runtime.InteropServices
|
||||
<Assembly: AssemblyDescription("WebService Multitool für WinLine")>
|
||||
<Assembly: AssemblyCompany("Digital Data")>
|
||||
<Assembly: AssemblyProduct("WebService Multitool")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2023")>
|
||||
<Assembly: AssemblyTrademark("1.4.3.0")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2024")>
|
||||
<Assembly: AssemblyTrademark("1.4.4.3")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' indem Sie "*" wie unten gezeigt eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.4.3.0")>
|
||||
<Assembly: AssemblyVersion("1.4.4.3")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
|
||||
@@ -17,6 +17,7 @@ Public Class frmConfig
|
||||
Private BindingSource As BindingSource = TBEDIXMLITEMSBindingSource
|
||||
Private View As GridView = GridViewItems
|
||||
Private Logger As Logger
|
||||
Private FormLoading As Boolean = True
|
||||
|
||||
|
||||
Private ReadOnly Property Config As Common.Config
|
||||
@@ -49,7 +50,6 @@ Public Class frmConfig
|
||||
Logger.Debug("Connection String: [{0}]", oConnectionString)
|
||||
|
||||
Logger.Debug("Setting default values")
|
||||
' Default Values
|
||||
DS_DD_ECM.TBMT_CONFIG.ADDED_WHOColumn.DefaultValue = Environment.UserName
|
||||
DS_DD_ECM.TBMT_CONFIG.CHANGED_WHOColumn.DefaultValue = Environment.UserName
|
||||
DS_DD_ECM.TBMT_TEMPLATE_ITEMS.ADDED_WHOColumn.DefaultValue = Environment.UserName
|
||||
@@ -57,13 +57,15 @@ Public Class frmConfig
|
||||
|
||||
Logger.Debug("Initializing Tables Adapter")
|
||||
TBMT_TABLESTableAdapter.Connection.ConnectionString = oConnectionString
|
||||
TBMT_TABLESTableAdapter.Fill(DS_DD_ECM.TBMT_TABLES)
|
||||
|
||||
Logger.Debug("Initializing Templates Adapter")
|
||||
TBMT_TEMPLATE_ITEMSTableAdapter.Connection.ConnectionString = oConnectionString
|
||||
|
||||
Logger.Debug("Initializing Config Adapter")
|
||||
TBMT_CONFIGTableAdapter.Connection.ConnectionString = oConnectionString
|
||||
|
||||
Logger.Debug("Loading Data from Adapters")
|
||||
TBMT_TABLESTableAdapter.Fill(DS_DD_ECM.TBMT_TABLES)
|
||||
TBMT_CONFIGTableAdapter.Fill(DS_DD_ECM.TBMT_CONFIG)
|
||||
TBMT_CONFIGTableAdapter.FillGeneral(TBMT_CONFIG_GENERAL)
|
||||
|
||||
@@ -71,6 +73,10 @@ Public Class frmConfig
|
||||
LoadGeneralConfig(TBMT_CONFIG_GENERAL)
|
||||
|
||||
BindingSource = TBEDIXMLITEMSBindingSource
|
||||
|
||||
FormLoading = False
|
||||
|
||||
GridViewItems.FocusedRowHandle = GridControl.InvalidRowHandle
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
FormHelper.ShowError(ex, "Laden des Formulars")
|
||||
@@ -191,19 +197,28 @@ Public Class frmConfig
|
||||
|
||||
Private Sub GridViewTables_FocusedRowChanged(sender As Object, e As Views.Base.FocusedRowChangedEventArgs) Handles GridViewTables.FocusedRowChanged
|
||||
Try
|
||||
If FormLoading Then
|
||||
Logger.Debug("Form still loading. Exiting.")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If GridViewTables.FocusedRowHandle < 0 Then
|
||||
Logger.Debug("No row selected. Exiting.")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim oRow As DataRow = GridViewTables.GetDataRow(GridViewTables.FocusedRowHandle)
|
||||
|
||||
If oRow Is Nothing Then
|
||||
Logger.Debug("Invalid row handle. Exiting.")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim oTableId = oRow.Item("GUID")
|
||||
Logger.Debug("Loading Items for Table [{0}]", oTableId)
|
||||
TBMT_TEMPLATE_ITEMSTableAdapter.Fill(DS_DD_ECM.TBMT_TEMPLATE_ITEMS, oTableId)
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
FormHelper.ShowError(ex, "Laden der Tabelle")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -5,8 +5,8 @@ Imports MultiTool.Common.Winline
|
||||
Imports MultiTool.Common.Winline.Entities
|
||||
Imports MultiTool.Common.Templates
|
||||
Imports MultiTool.Common.Constants
|
||||
Imports DigitalData.Modules.Language
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DevExpress.XtraEditors.Repository
|
||||
Imports DevExpress.XtraEditors.Controls
|
||||
@@ -167,7 +167,7 @@ Public Class frmRowEditor
|
||||
End If
|
||||
|
||||
Dim oFieldValue As FieldValue = oField.Value
|
||||
Dim oValueFromGrid As String = Utils.NotNull(oRow.Item(COL_VALUE_FINAL), String.Empty)
|
||||
Dim oValueFromGrid As String = ObjectEx.NotNull(oRow.Item(COL_VALUE_FINAL), String.Empty)
|
||||
|
||||
' Do the dirtiest date validation of all times
|
||||
If oField.Value.DataType = ColumnType.Date And oValueFromGrid.Length > 0 Then
|
||||
@@ -293,7 +293,7 @@ Public Class frmRowEditor
|
||||
Private Sub GridView1_CustomDrawCell(sender As Object, e As DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs) Handles GridView1.CustomDrawCell
|
||||
Dim oDataRow As DataRow = GridView1.GetDataRow(e.RowHandle)
|
||||
Dim oKey As String = oDataRow.Item(COL_KEY)
|
||||
Dim oValue As String = Utils.NotNull(oDataRow.Item(COL_VALUE_FINAL), String.Empty)
|
||||
Dim oValue As String = ObjectEx.NotNull(oDataRow.Item(COL_VALUE_FINAL), String.Empty)
|
||||
Dim oColumn = _Table.Columns.
|
||||
Where(Function(c) c.Name = oKey).
|
||||
SingleOrDefault()
|
||||
|
||||
Reference in New Issue
Block a user