add forms, prepare webservices call

This commit is contained in:
Jonathan Jenne 2020-09-14 17:08:43 +02:00
parent c9bd8da4a6
commit 82ec7c9ecb
22 changed files with 932 additions and 153 deletions

View File

@ -1,22 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<configSections> <configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="WinLineArtikelnummerGenerator.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> <section name="WinLineArtikelnummerGenerator.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false"/>
</sectionGroup> </sectionGroup>
</configSections> </configSections>
<connectionStrings> <connectionStrings>
<add name="WinLineArtikelnummerGenerator.My.MySettings.MyConnectionString" <add name="WinLineArtikelnummerGenerator.My.MySettings.MyConnectionString" connectionString="Data Source=SDD-VMP04-SQL17\MEDACOM;Initial Catalog=CWLDATEN_MEDS;User ID=sa;Password=dd" providerName="System.Data.SqlClient"/>
connectionString="Data Source=SDD-VMP04-SQL17\MEDACOM;Initial Catalog=CWLDATEN_MEDS;User ID=sa;Password=dd"
providerName="System.Data.SqlClient" />
</connectionStrings> </connectionStrings>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
</startup> </startup>
<userSettings> <userSettings>
<WinLineArtikelnummerGenerator.My.MySettings> <WinLineArtikelnummerGenerator.My.MySettings>
<setting name="ConnectionString" serializeAs="String"> <setting name="ConnectionString" serializeAs="String">
<value /> <value/>
</setting> </setting>
</WinLineArtikelnummerGenerator.My.MySettings> </WinLineArtikelnummerGenerator.My.MySettings>
</userSettings> </userSettings>

View File

@ -0,0 +1,12 @@
Namespace My
' Für MyApplication sind folgende Ereignisse verfügbar:
' Startup: Wird beim Starten der Anwendung noch vor dem Erstellen des Startformulars ausgelöst.
' Shutdown: Wird nach dem Schließen aller Anwendungsformulare ausgelöst. Dieses Ereignis wird nicht ausgelöst, wenn die Anwendung mit einem Fehler beendet wird.
' UnhandledException: Wird bei einem Ausnahmefehler ausgelöst.
' StartupNextInstance: Wird beim Starten einer Einzelinstanzanwendung ausgelöst, wenn die Anwendung bereits aktiv ist.
' NetworkAvailabilityChanged: Wird beim Herstellen oder Trennen der Netzwerkverbindung ausgelöst.
Partial Friend Class MyApplication
Public ConfigManager As ConfigManager(Of Config)
Public LogConfig As LogConfig
End Class
End Namespace

View File

@ -1,5 +1,26 @@
Imports DigitalData.Modules.Config.ConfigAttributes Imports DigitalData.Modules.Config.ConfigAttributes
Public Class Config Public Class Config
Public Property ConnectionString As String Public Property ConnectionString As String = ""
Public Property WinLine_WebService As New WebServiceConfig
Public Enum ActionCode
CHECK_ONLY = 0
IMPORT = 1
End Enum
Public Class WebServiceConfig
Public Property Server As String = ""
Public Property Username As String = ""
Public Property Password As String = ""
Public Property Mandator As String = ""
Public Property ActionCode As ActionCode = ActionCode.IMPORT
Public Property ArticleTemplateName As String = ""
Public Property ArticleTemplateType As Integer = 30
Public Property PriceTemplateName As String = ""
Public Property PriceTemplateType As Integer = 5
End Class
End Class End Class

View File

@ -1,9 +1,18 @@
Public Class ProductGroup Public Class ProductGroup
Public Property Id As Integer Public Property Guid As Integer
Public Property Vendor As String Public Property GroupId As Integer
Public Property Code As String
Public Property Name As String Public Property Name As String
Public ReadOnly Property GroupString As String
Get
Return GroupId.ToString.PadLeft(2, "0")
End Get
End Property
Public Overrides Function ToString() As String Public Overrides Function ToString() As String
Return $"{Id.ToString.PadLeft(2, "0")} - {Name}" Return $"{GroupId.ToString.PadLeft(2, "0")} - {Name}"
End Function End Function
End Class End Class

View File

@ -1,9 +1,17 @@
Public Class ProductVersion Public Class ProductVersion
Public Property Id As Integer Public Property Guid As Integer
Public Property Code As String
Public Property GroupId As Integer
Public Property VersionId As Integer
Public Property Name As String Public Property Name As String
Public Property Part As Integer
Public ReadOnly Property VersionString As String
Get
Return VersionId.ToString.PadLeft(2, "0")
End Get
End Property
Public Overrides Function ToString() As String Public Overrides Function ToString() As String
Return $"{Id.ToString.PadLeft(2, "0")} - {Name}" Return $"{VersionId.ToString.PadLeft(2, "0")} - {Name}"
End Function End Function
End Class End Class

View File

@ -1,8 +1,11 @@
Public Class Vendor Public Class Vendor
Public Property Guid As Integer
Public Property Code As String Public Property Code As String
Public Property Name As String Public Property Name As String
Public Property WinlineName As String
Public Property WinlineNumber As String
Public Overrides Function ToString() As String Public Overrides Function ToString() As String
Return $"{Code} - {Name}" Return $"{Code} - {Name} ({WinlineNumber.Trim} | {WinlineName.Trim})"
End Function End Function
End Class End Class

View File

@ -76,6 +76,7 @@ Public Class ConfigManager(Of T)
''' <param name="ForceUserConfig">Override values from ComputerConfig with UserConfig</param> ''' <param name="ForceUserConfig">Override values from ComputerConfig with UserConfig</param>
Public Sub New(LogConfig As LogConfig, UserConfigPath As String, ComputerConfigPath As String, Optional ApplicationStartupPath As String = "", Optional ForceUserConfig As Boolean = False) Public Sub New(LogConfig As LogConfig, UserConfigPath As String, ComputerConfigPath As String, Optional ApplicationStartupPath As String = "", Optional ForceUserConfig As Boolean = False)
_LogConfig = LogConfig _LogConfig = LogConfig
_Logger = LogConfig.GetLogger() _Logger = LogConfig.GetLogger()
_File = New File(_LogConfig) _File = New File(_LogConfig)

View File

@ -1,10 +1,10 @@
'------------------------------------------------------------------------------ '------------------------------------------------------------------------------
' <auto-generated> ' <auto-generated>
' This code was generated by a tool. ' Dieser Code wurde von einem Tool generiert.
' Runtime Version:4.0.30319.42000 ' Laufzeitversion:4.0.30319.42000
' '
' Changes to this file may cause incorrect behavior and will be lost if ' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
' the code is regenerated. ' der Code erneut generiert wird.
' </auto-generated> ' </auto-generated>
'------------------------------------------------------------------------------ '------------------------------------------------------------------------------
@ -14,10 +14,10 @@ Option Explicit On
Namespace My Namespace My
'NOTE: This file is auto-generated; do not modify it directly. To make changes, 'HINWEIS: Diese Datei wird automatisch generiert und darf nicht direkt bearbeitet werden. Wenn Sie Änderungen vornehmen möchten
' or if you encounter build errors in this file, go to the Project Designer ' oder in dieser Datei Buildfehler auftreten, wechseln Sie zum Projekt-Designer.
' (go to Project Properties or double-click the My Project node in ' (Wechseln Sie dazu zu den Projekteigenschaften, oder doppelklicken Sie auf den Knoten "Mein Projekt" im
' Solution Explorer), and make changes on the Application tab. ' Projektmappen-Explorer). Nehmen Sie auf der Registerkarte "Anwendung" entsprechende Änderungen vor.
' '
Partial Friend Class MyApplication Partial Friend Class MyApplication
@ -32,7 +32,7 @@ Namespace My
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _ <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Protected Overrides Sub OnCreateMainForm() Protected Overrides Sub OnCreateMainForm()
Me.MainForm = Global.WinLineArtikelnummerGenerator.frmMain Me.MainForm = Global.WinLineArtikelnummerGenerator.Form1
End Sub End Sub
End Class End Class
End Namespace End Namespace

View File

@ -1,27 +1,28 @@
'------------------------------------------------------------------------------ '------------------------------------------------------------------------------
' <auto-generated> ' <auto-generated>
' This code was generated by a tool. ' Dieser Code wurde von einem Tool generiert.
' Runtime Version:4.0.30319.42000 ' Laufzeitversion:4.0.30319.42000
' '
' Changes to this file may cause incorrect behavior and will be lost if ' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
' the code is regenerated. ' der Code erneut generiert wird.
' </auto-generated> ' </auto-generated>
'------------------------------------------------------------------------------ '------------------------------------------------------------------------------
Option Strict On Option Strict On
Option Explicit On Option Explicit On
Imports System
Namespace My.Resources Namespace My.Resources
'This class was auto-generated by the StronglyTypedResourceBuilder 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
'class via a tool like ResGen or Visual Studio. '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
'To add or remove a member, edit your .ResX file then rerun ResGen 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
'with the /str option, or rebuild your VS project. 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
'''<summary> '''<summary>
''' A strongly-typed resource class, for looking up localized strings, etc. ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary> '''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
@ -32,7 +33,7 @@ Namespace My.Resources
Private resourceCulture As Global.System.Globalization.CultureInfo Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary> '''<summary>
''' Returns the cached ResourceManager instance used by this class. ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
'''</summary> '''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
@ -46,15 +47,15 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Overrides the current thread's CurrentUICulture property for all ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
''' resource lookups using this strongly typed resource class. ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
'''</summary> '''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo Friend Property Culture() As Global.System.Globalization.CultureInfo
Get Get
Return resourceCulture Return resourceCulture
End Get End Get
Set(ByVal value As Global.System.Globalization.CultureInfo) Set
resourceCulture = value resourceCulture = value
End Set End Set
End Property End Property

View File

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC-Manifestoptionen
Wenn Sie die Ebene der Benutzerkontensteuerung für Windows ändern möchten, ersetzen Sie den
Knoten "requestedExecutionLevel" wie folgt.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Durch Angabe des Elements "requestedExecutionLevel" wird die Datei- und Registrierungsvirtualisierung deaktiviert.
Entfernen Sie dieses Element, wenn diese Virtualisierung aus Gründen der Abwärtskompatibilität
für die Anwendung erforderlich ist.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Eine Liste der Windows-Versionen, unter denen diese Anwendung getestet
und für die sie entwickelt wurde. Wenn Sie die Auskommentierung der entsprechenden Elemente aufheben,
wird von Windows automatisch die kompatibelste Umgebung ausgewählt. -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
<!-- Windows 10 -->
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
</application>
</compatibility>
<!-- Gibt an, dass die Anwendung mit DPI-Werten kompatibel ist und von Windows nicht automatisch auf höhere
DPI-Werte skaliert wird. WPF-Anwendungen (Windows Presentation Foundation) sind automatisch mit DPI-Werten kompatibel und müssen sich nicht
anmelden. Für Windows Forms-Anwendungen für .NET Framework 4.6, die sich für diese Einstellung anmelden, muss
auch die Einstellung "'EnableWindowsFormsHighDpiAutoResizing" in der "app.config" auf "true" festgelegt werden. -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>
-->
<!-- Designs für allgemeine Windows-Steuerelemente und -Dialogfelder (Windows XP und höher) aktivieren -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>

View File

@ -11,9 +11,10 @@
<AssemblyName>WinLineArtikelnummerGenerator</AssemblyName> <AssemblyName>WinLineArtikelnummerGenerator</AssemblyName>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<MyType>WindowsForms</MyType> <MyType>WindowsForms</MyType>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
@ -47,6 +48,9 @@
<PropertyGroup> <PropertyGroup>
<OptionInfer>On</OptionInfer> <OptionInfer>On</OptionInfer>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<ApplicationManifest>My Project\app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="DevExpress.Data.Desktop.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <Reference Include="DevExpress.Data.Desktop.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<Reference Include="DevExpress.Data.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" /> <Reference Include="DevExpress.Data.v20.1, Version=20.1.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
@ -74,6 +78,9 @@
<HintPath>..\..\DDMonorepo\Modules.Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath> <HintPath>..\..\DDMonorepo\Modules.Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.4.7.4\lib\net45\NLog.dll</HintPath> <HintPath>..\packages\NLog.4.7.4\lib\net45\NLog.dll</HintPath>
</Reference> </Reference>
@ -85,9 +92,13 @@
<Reference Include="System.Deployment" /> <Reference Include="System.Deployment" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" /> <Reference Include="System.IO.Compression" />
<Reference Include="System.Net.Http.Formatting, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" /> <Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" /> <Reference Include="System.ServiceModel" />
<Reference Include="System.Transactions" /> <Reference Include="System.Transactions" />
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
@ -109,7 +120,20 @@
<Import Include="System.Threading.Tasks" /> <Import Include="System.Threading.Tasks" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="ApplicationEvents.vb" />
<Compile Include="Config.vb" /> <Compile Include="Config.vb" />
<Compile Include="frmCreateArticle.Designer.vb">
<DependentUpon>frmCreateArticle.vb</DependentUpon>
</Compile>
<Compile Include="frmCreateArticle.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmWinlineConfig.Designer.vb">
<DependentUpon>frmWinlineConfig.vb</DependentUpon>
</Compile>
<Compile Include="frmWinlineConfig.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Modules\ConfigManager.vb" /> <Compile Include="Modules\ConfigManager.vb" />
<Compile Include="CWLDATEN_MEDSDataSet.Designer.vb"> <Compile Include="CWLDATEN_MEDSDataSet.Designer.vb">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
@ -148,9 +172,15 @@
<Compile Include="Winline.vb" /> <Compile Include="Winline.vb" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="frmCreateArticle.resx">
<DependentUpon>frmCreateArticle.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmMain.resx"> <EmbeddedResource Include="frmMain.resx">
<DependentUpon>frmMain.vb</DependentUpon> <DependentUpon>frmMain.vb</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="frmWinlineConfig.resx">
<DependentUpon>frmWinlineConfig.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="My Project\licenses.licx" /> <EmbeddedResource Include="My Project\licenses.licx" />
<EmbeddedResource Include="My Project\Resources.resx"> <EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator> <Generator>VbMyResourcesResXFileCodeGenerator</Generator>
@ -171,6 +201,7 @@
<None Include="CWLDATEN_MEDSDataSet.xss"> <None Include="CWLDATEN_MEDSDataSet.xss">
<DependentUpon>CWLDATEN_MEDSDataSet.xsd</DependentUpon> <DependentUpon>CWLDATEN_MEDSDataSet.xsd</DependentUpon>
</None> </None>
<None Include="My Project\app.manifest" />
<None Include="My Project\Application.myapp"> <None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator> <Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput> <LastGenOutput>Application.Designer.vb</LastGenOutput>
@ -183,5 +214,8 @@
<None Include="App.config" /> <None Include="App.config" />
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="My Project\DataSources\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
</Project> </Project>

View File

@ -1,25 +1,29 @@
Public Class Winline Imports System.Net
Private _LogConfig As LogConfig
Public Class Winline
Private _Logger As Logger Private _Logger As Logger
Private _Db As Database Private _Db As Database
Public ReadOnly Property NO_RUNNING_NUMBER_FOUND = "NO_RUNNING_NUMBER_FOUND"
Public ReadOnly Property UNKNOWN_ERROR = "UNKNOWN_ERROR"
Public Sub New(LogConfig As LogConfig, Database As Database) Public Sub New(LogConfig As LogConfig, Database As Database)
_LogConfig = LogConfig
_Logger = LogConfig.GetLogger() _Logger = LogConfig.GetLogger()
_Db = Database _Db = Database
End Sub End Sub
Public Function GetVendors() As List(Of Vendor) Public Function GetVendors() As List(Of Vendor)
Try Try
Dim oDatatable As DataTable = _Db.GetDatatable("SELECT * FROM TBDD_ARTICLE_GENERATOR_VENDORS") Dim oDatatable As DataTable = _Db.GetDatatable("SELECT * FROM TBDD_ARTICLE_GENERATOR_VENDORS ORDER BY CODE")
Dim oVendors As New List(Of Vendor) Dim oVendors As New List(Of Vendor)
For Each oRow As DataRow In oDatatable.Rows For Each oRow As DataRow In oDatatable.Rows
Dim oVendor As New Vendor() With { Dim oVendor As New Vendor() With {
.Code = oRow.Item("CODE"), .Code = oRow.Item("CODE"),
.Name = oRow.Item("NAME") .Name = oRow.Item("NAME"),
.Guid = oRow.Item("GUID"),
.WinlineName = oRow.Item("WINLINE_NAME"),
.WinlineNumber = oRow.Item("WINLINE_NUMBER")
} }
oVendors.Add(oVendor) oVendors.Add(oVendor)
@ -39,9 +43,10 @@
For Each oRow As DataRow In oDatatable.Rows For Each oRow As DataRow In oDatatable.Rows
Dim oGroup As New ProductGroup() With { Dim oGroup As New ProductGroup() With {
.Guid = oRow.Item("GUID"),
.Name = oRow.Item("NAME"), .Name = oRow.Item("NAME"),
.Id = oRow.Item("GROUP"), .GroupId = oRow.Item("GROUP"),
.Vendor = oRow.Item("CODE") .Code = oRow.Item("CODE")
} }
oGroups.Add(oGroup) oGroups.Add(oGroup)
@ -56,14 +61,16 @@
Public Function GetVersionsByVendorAndGroup(VendorCode As String, GroupId As String) As List(Of ProductVersion) Public Function GetVersionsByVendorAndGroup(VendorCode As String, GroupId As String) As List(Of ProductVersion)
Try Try
Dim oDatatable = _Db.GetDatatable($"SELECT * FROM TBDD_ARTICLE_GENERATOR_PRODUCTS WHERE VENDOR = '{VendorCode}' AND [GROUP] = {GroupId}") Dim oDatatable = _Db.GetDatatable($"SELECT * FROM TBDD_ARTICLE_GENERATOR_PRODUCTS WHERE CODE = '{VendorCode}' AND [GROUP] = {GroupId}")
Dim oVersions As New List(Of ProductVersion) Dim oVersions As New List(Of ProductVersion)
For Each oRow As DataRow In oDatatable.Rows For Each oRow As DataRow In oDatatable.Rows
Dim oVersion As New ProductVersion() With { Dim oVersion As New ProductVersion() With {
.Id = oRow.Item("VERSION"), .Guid = oRow.Item("GUID"),
.VersionId = oRow.Item("VERSION"),
.GroupId = oRow.Item("GROUP"),
.Name = oRow.Item("NAME"), .Name = oRow.Item("NAME"),
.Part = oRow.Item("PART") .Code = oRow.Item("CODE")
} }
oVersions.Add(oVersion) oVersions.Add(oVersion)
@ -76,36 +83,51 @@
End Try End Try
End Function End Function
Public Function GetVendorIdByCode(VendorCode As String) As String Public Function GetNextRunningNumber(VendorCode As String, GroupId As Integer, VersionId As Integer) As String
Try Try
Return _Db.GetScalarValue($"SELECT SUBSTRING(C000,0,6) C999 FROM T309 WHERE C001 = '{VendorCode}' AND C002 = 1") Dim oGroupCode As String = GroupId.ToString.PadLeft(2, "0")
Catch ex As Exception Dim oVersionCode As String = VersionId.ToString.PadLeft(2, "0")
_Logger.Error(ex) Dim oDbResult = _Db.GetScalarValue($"SELECT MAX(C223) FROM v021 WHERE c010 LIKE '{VendorCode}{oGroupCode}{oVersionCode}___'")
Return Nothing
End Try
End Function
If IsNumeric(oDbResult) Then
Dim oNewRunningNumber = Integer.Parse(oDbResult) + 1
Public Function GetNextRunningNumber(VendorId As Integer, GroupId As Integer, VersionId As Integer) As Integer Return oNewRunningNumber.ToString.PadLeft(3, "0")
Try ElseIf IsNothing(oDbResult) OrElse IsDBNull(oDbResult) Then
VendorId = VendorId.ToString.PadLeft(2) Throw New ApplicationException(NO_RUNNING_NUMBER_FOUND)
GroupId = GroupId.ToString.PadLeft(2)
VersionId = VersionId.ToString.PadLeft(3)
Dim oResult = _Db.GetScalarValue($"SELECT MAX(C223) C999 FROM [CWLDATEN_MEDS].[dbo].[v021] where c078 LIKE '{VendorId}-{GroupId}-{VersionId}-_____-_____'")
If IsNothing(oResult) Then
Return 1
ElseIf IsNumeric(oResult) Then
Return Integer.Parse(oResult) + 1
Else Else
Return Nothing Throw New ApplicationException(UNKNOWN_ERROR)
End If End If
Catch ex As Exception Catch ex As Exception
_Logger.Error(ex) _Logger.Error(ex)
Return Nothing Throw ex
End Try End Try
End Function End Function
Public Function SendWebserviceRequest(XmlData As String)
Try
Dim oWebserviceConfig = My.Application.ConfigManager.Config.WinLine_WebService
Dim oServer As String = oWebserviceConfig.Server
Dim oURI = $"http://{oServer}/ewlservice/import"
Dim oQuery As String = ""
oQuery &= $"User={oWebserviceConfig.Username}"
oQuery &= $"Password={oWebserviceConfig.Password}"
oQuery &= $"Company={oWebserviceConfig.Mandator}"
oQuery &= $"Type={oWebserviceConfig.ArticleTemplateType}"
oQuery &= $"Vorlage={oWebserviceConfig.ArticleTemplateName}"
oQuery &= $"Actioncode={oWebserviceConfig.ActionCode}"
oQuery &= $"byref=0"
oQuery &= $"Data={XmlData}"
oURI &= $"?{oQuery}"
Dim oClient As HttpWebRequest = WebRequest.Create(oURI)
oClient.Method = "POST"
oClient.ContentType = "application/xml"
Catch ex As Exception
End Try
End Function
End Class End Class

View File

@ -0,0 +1,145 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmCreateArticle
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.TextBox2 = New System.Windows.Forms.TextBox()
Me.Label2 = New System.Windows.Forms.Label()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.CheckBox1 = New System.Windows.Forms.CheckBox()
Me.Label3 = New System.Windows.Forms.Label()
Me.Button1 = New System.Windows.Forms.Button()
Me.SuspendLayout()
'
'TextBox1
'
Me.TextBox1.Font = New System.Drawing.Font("Segoe UI", 8.25!)
Me.TextBox1.Location = New System.Drawing.Point(12, 28)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.ReadOnly = True
Me.TextBox1.Size = New System.Drawing.Size(298, 22)
Me.TextBox1.TabIndex = 0
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Font = New System.Drawing.Font("Segoe UI Semibold", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Location = New System.Drawing.Point(12, 9)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(82, 13)
Me.Label1.TabIndex = 1
Me.Label1.Text = "Artikelnummer"
'
'TextBox2
'
Me.TextBox2.Font = New System.Drawing.Font("Segoe UI", 8.25!)
Me.TextBox2.Location = New System.Drawing.Point(12, 72)
Me.TextBox2.Multiline = True
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(298, 105)
Me.TextBox2.TabIndex = 0
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Font = New System.Drawing.Font("Segoe UI Semibold", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label2.Location = New System.Drawing.Point(12, 53)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(108, 13)
Me.Label2.TabIndex = 1
Me.Label2.Text = "Artikelbeschreibung"
'
'GroupBox1
'
Me.GroupBox1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.GroupBox1.Font = New System.Drawing.Font("Segoe UI Semibold", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.GroupBox1.Location = New System.Drawing.Point(485, 12)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(303, 426)
Me.GroupBox1.TabIndex = 2
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Wichtige Informationen"
'
'CheckBox1
'
Me.CheckBox1.AutoSize = True
Me.CheckBox1.Font = New System.Drawing.Font("Segoe UI Semibold", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.CheckBox1.Location = New System.Drawing.Point(15, 223)
Me.CheckBox1.Name = "CheckBox1"
Me.CheckBox1.Size = New System.Drawing.Size(172, 17)
Me.CheckBox1.TabIndex = 3
Me.CheckBox1.Text = "Serienummer Artikel anlegen"
Me.CheckBox1.UseVisualStyleBackColor = True
'
'Label3
'
Me.Label3.Font = New System.Drawing.Font("Segoe UI", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label3.Location = New System.Drawing.Point(12, 180)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(298, 40)
Me.Label3.TabIndex = 4
Me.Label3.Text = "Seriennummer Artikel anlegen" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "Diese Einstellung kann, anders als beim Altsystem, " &
"NICHT mehr im Nachhinein geändert werden!"
'
'Button1
'
Me.Button1.Font = New System.Drawing.Font("Segoe UI", 8.25!)
Me.Button1.Location = New System.Drawing.Point(12, 386)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(298, 52)
Me.Button1.TabIndex = 5
Me.Button1.Text = "Artikel anlegen!"
Me.Button1.UseVisualStyleBackColor = True
'
'frmCreateArticle
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(800, 450)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.CheckBox1)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.TextBox2)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.TextBox1)
Me.Font = New System.Drawing.Font("Segoe UI Semibold", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Name = "frmCreateArticle"
Me.Text = "frmCreateArticle"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents TextBox1 As TextBox
Friend WithEvents Label1 As Label
Friend WithEvents TextBox2 As TextBox
Friend WithEvents Label2 As Label
Friend WithEvents GroupBox1 As GroupBox
Friend WithEvents CheckBox1 As CheckBox
Friend WithEvents Label3 As Label
Friend WithEvents Button1 As Button
End Class

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,3 @@
Public Class frmCreateArticle
End Class

View File

@ -32,6 +32,11 @@ Partial Class frmMain
Me.Label3 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label()
Me.listboxVendors = New System.Windows.Forms.ListBox() Me.listboxVendors = New System.Windows.Forms.ListBox()
Me.Button4 = New System.Windows.Forms.Button() Me.Button4 = New System.Windows.Forms.Button()
Me.Label4 = New System.Windows.Forms.Label()
Me.MenuStrip1 = New System.Windows.Forms.MenuStrip()
Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
Me.EinstellungenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.MenuStrip1.SuspendLayout()
Me.SuspendLayout() Me.SuspendLayout()
' '
'listboxProductGroups 'listboxProductGroups
@ -39,7 +44,7 @@ Partial Class frmMain
Me.listboxProductGroups.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.listboxProductGroups.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.listboxProductGroups.FormattingEnabled = True Me.listboxProductGroups.FormattingEnabled = True
Me.listboxProductGroups.ItemHeight = 17 Me.listboxProductGroups.ItemHeight = 17
Me.listboxProductGroups.Location = New System.Drawing.Point(268, 67) Me.listboxProductGroups.Location = New System.Drawing.Point(507, 72)
Me.listboxProductGroups.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.listboxProductGroups.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
Me.listboxProductGroups.Name = "listboxProductGroups" Me.listboxProductGroups.Name = "listboxProductGroups"
Me.listboxProductGroups.Size = New System.Drawing.Size(250, 242) Me.listboxProductGroups.Size = New System.Drawing.Size(250, 242)
@ -49,7 +54,7 @@ Partial Class frmMain
' '
Me.Label1.AutoSize = True Me.Label1.AutoSize = True
Me.Label1.Font = New System.Drawing.Font("Segoe UI Semibold", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.Font = New System.Drawing.Font("Segoe UI Semibold", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Location = New System.Drawing.Point(9, 18) Me.Label1.Location = New System.Drawing.Point(12, 24)
Me.Label1.Name = "Label1" Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(69, 15) Me.Label1.Size = New System.Drawing.Size(69, 15)
Me.Label1.TabIndex = 1 Me.Label1.TabIndex = 1
@ -59,7 +64,7 @@ Partial Class frmMain
' '
Me.Label2.AutoSize = True Me.Label2.AutoSize = True
Me.Label2.Font = New System.Drawing.Font("Segoe UI Semibold", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.Font = New System.Drawing.Font("Segoe UI Semibold", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label2.Location = New System.Drawing.Point(265, 19) Me.Label2.Location = New System.Drawing.Point(504, 24)
Me.Label2.Name = "Label2" Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(97, 15) Me.Label2.Size = New System.Drawing.Size(97, 15)
Me.Label2.TabIndex = 1 Me.Label2.TabIndex = 1
@ -67,7 +72,7 @@ Partial Class frmMain
' '
'Button1 'Button1
' '
Me.Button1.Location = New System.Drawing.Point(268, 37) Me.Button1.Location = New System.Drawing.Point(507, 42)
Me.Button1.Name = "Button1" Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(140, 23) Me.Button1.Size = New System.Drawing.Size(140, 23)
Me.Button1.TabIndex = 2 Me.Button1.TabIndex = 2
@ -77,7 +82,7 @@ Partial Class frmMain
' '
'Button2 'Button2
' '
Me.Button2.Location = New System.Drawing.Point(12, 37) Me.Button2.Location = New System.Drawing.Point(15, 42)
Me.Button2.Name = "Button2" Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(140, 23) Me.Button2.Size = New System.Drawing.Size(140, 23)
Me.Button2.TabIndex = 2 Me.Button2.TabIndex = 2
@ -90,7 +95,7 @@ Partial Class frmMain
Me.listBoxProductVersion.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.listBoxProductVersion.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.listBoxProductVersion.FormattingEnabled = True Me.listBoxProductVersion.FormattingEnabled = True
Me.listBoxProductVersion.ItemHeight = 17 Me.listBoxProductVersion.ItemHeight = 17
Me.listBoxProductVersion.Location = New System.Drawing.Point(524, 67) Me.listBoxProductVersion.Location = New System.Drawing.Point(763, 72)
Me.listBoxProductVersion.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.listBoxProductVersion.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
Me.listBoxProductVersion.Name = "listBoxProductVersion" Me.listBoxProductVersion.Name = "listBoxProductVersion"
Me.listBoxProductVersion.Size = New System.Drawing.Size(250, 242) Me.listBoxProductVersion.Size = New System.Drawing.Size(250, 242)
@ -98,7 +103,7 @@ Partial Class frmMain
' '
'Button3 'Button3
' '
Me.Button3.Location = New System.Drawing.Point(524, 37) Me.Button3.Location = New System.Drawing.Point(763, 42)
Me.Button3.Name = "Button3" Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(140, 23) Me.Button3.Size = New System.Drawing.Size(140, 23)
Me.Button3.TabIndex = 2 Me.Button3.TabIndex = 2
@ -110,7 +115,7 @@ Partial Class frmMain
' '
Me.Label3.AutoSize = True Me.Label3.AutoSize = True
Me.Label3.Font = New System.Drawing.Font("Segoe UI Semibold", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.Font = New System.Drawing.Font("Segoe UI Semibold", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label3.Location = New System.Drawing.Point(521, 19) Me.Label3.Location = New System.Drawing.Point(760, 24)
Me.Label3.Name = "Label3" Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(90, 15) Me.Label3.Size = New System.Drawing.Size(90, 15)
Me.Label3.TabIndex = 1 Me.Label3.TabIndex = 1
@ -121,26 +126,58 @@ Partial Class frmMain
Me.listboxVendors.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.listboxVendors.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.listboxVendors.FormattingEnabled = True Me.listboxVendors.FormattingEnabled = True
Me.listboxVendors.ItemHeight = 17 Me.listboxVendors.ItemHeight = 17
Me.listboxVendors.Location = New System.Drawing.Point(12, 67) Me.listboxVendors.Location = New System.Drawing.Point(15, 72)
Me.listboxVendors.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.listboxVendors.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
Me.listboxVendors.Name = "listboxVendors" Me.listboxVendors.Name = "listboxVendors"
Me.listboxVendors.Size = New System.Drawing.Size(250, 242) Me.listboxVendors.Size = New System.Drawing.Size(486, 242)
Me.listboxVendors.TabIndex = 0 Me.listboxVendors.TabIndex = 0
' '
'Button4 'Button4
' '
Me.Button4.Location = New System.Drawing.Point(524, 316) Me.Button4.Location = New System.Drawing.Point(760, 349)
Me.Button4.Name = "Button4" Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(250, 41) Me.Button4.Size = New System.Drawing.Size(250, 41)
Me.Button4.TabIndex = 3 Me.Button4.TabIndex = 3
Me.Button4.Text = "Generate" Me.Button4.Text = "Artikelnummer generieren"
Me.Button4.UseVisualStyleBackColor = True Me.Button4.UseVisualStyleBackColor = True
' '
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(12, 318)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(311, 15)
Me.Label4.TabIndex = 4
Me.Label4.Text = "Aufbau: Kürzel - Markenname (Kreditorenummer | Name)"
'
'MenuStrip1
'
Me.MenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem1})
Me.MenuStrip1.Location = New System.Drawing.Point(0, 0)
Me.MenuStrip1.Name = "MenuStrip1"
Me.MenuStrip1.Size = New System.Drawing.Size(1022, 24)
Me.MenuStrip1.TabIndex = 5
Me.MenuStrip1.Text = "MenuStrip1"
'
'ToolStripMenuItem1
'
Me.ToolStripMenuItem1.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.EinstellungenToolStripMenuItem})
Me.ToolStripMenuItem1.Name = "ToolStripMenuItem1"
Me.ToolStripMenuItem1.Size = New System.Drawing.Size(46, 20)
Me.ToolStripMenuItem1.Text = "Datei"
'
'EinstellungenToolStripMenuItem
'
Me.EinstellungenToolStripMenuItem.Name = "EinstellungenToolStripMenuItem"
Me.EinstellungenToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
Me.EinstellungenToolStripMenuItem.Text = "Einstellungen"
'
'frmMain 'frmMain
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 15.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 15.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(793, 430) Me.ClientSize = New System.Drawing.Size(1022, 402)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.Button4) Me.Controls.Add(Me.Button4)
Me.Controls.Add(Me.Button2) Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Button3) Me.Controls.Add(Me.Button3)
@ -151,10 +188,14 @@ Partial Class frmMain
Me.Controls.Add(Me.listBoxProductVersion) Me.Controls.Add(Me.listBoxProductVersion)
Me.Controls.Add(Me.listboxProductGroups) Me.Controls.Add(Me.listboxProductGroups)
Me.Controls.Add(Me.listboxVendors) Me.Controls.Add(Me.listboxVendors)
Me.Controls.Add(Me.MenuStrip1)
Me.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.MainMenuStrip = Me.MenuStrip1
Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4) Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
Me.Name = "frmMain" Me.Name = "frmMain"
Me.Text = "frmMain" Me.Text = "Artikelnummer Generator"
Me.MenuStrip1.ResumeLayout(False)
Me.MenuStrip1.PerformLayout()
Me.ResumeLayout(False) Me.ResumeLayout(False)
Me.PerformLayout() Me.PerformLayout()
@ -169,4 +210,8 @@ Partial Class frmMain
Friend WithEvents Label3 As Label Friend WithEvents Label3 As Label
Friend WithEvents listboxVendors As ListBox Friend WithEvents listboxVendors As ListBox
Friend WithEvents Button4 As Button Friend WithEvents Button4 As Button
Friend WithEvents Label4 As Label
Friend WithEvents MenuStrip1 As MenuStrip
Friend WithEvents ToolStripMenuItem1 As ToolStripMenuItem
Friend WithEvents EinstellungenToolStripMenuItem As ToolStripMenuItem
End Class End Class

View File

@ -117,4 +117,7 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="MenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root> </root>

View File

@ -1,20 +1,15 @@
Public Class frmMain Public Class frmMain
Private _Logger As Logger Private _Logger As Logger
Private _LogConfig As LogConfig
Private _Config As ConfigManager(Of Config)
Private _Database As Database Private _Database As Database
Private _WinLine As Winline Private _WinLine As Winline
Private CurrentVendor As Vendor = Nothing
Private CurrentGroup As ProductGroup = Nothing
Private CurrentVersion As ProductVersion = Nothing
Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
_LogConfig = New LogConfig(LogPath:=LogConfig.PathType.AppData, CompanyName:="Digital Data", ProductName:="WinLineProductNumberGenerator") My.Application.LogConfig = New LogConfig(LogPath:=LogConfig.PathType.AppData, CompanyName:="Digital Data", ProductName:="WinLineProductNumberGenerator")
_Logger = _LogConfig.GetLogger() My.Application.ConfigManager = New ConfigManager(Of Config)(My.Application.LogConfig, Application.UserAppDataPath)
_Config = New ConfigManager(Of Config)(_LogConfig, Application.UserAppDataPath)
_Database = New Database(_LogConfig, _Config) _Logger = My.Application.LogConfig.GetLogger()
_WinLine = New Winline(_LogConfig, _Database) _Database = New Database(My.Application.LogConfig, My.Application.ConfigManager)
_WinLine = New Winline(My.Application.LogConfig, _Database)
listboxVendors.DataSource = Nothing listboxVendors.DataSource = Nothing
@ -24,14 +19,12 @@
End Sub End Sub
Private Sub frmMain_FormClosed(sender As Object, e As FormClosedEventArgs) Handles Me.FormClosed Private Sub frmMain_FormClosed(sender As Object, e As FormClosedEventArgs) Handles Me.FormClosed
_Config.Save() My.Application.ConfigManager.Save()
End Sub End Sub
Private Sub listboxVendors_SelectedIndexChanged(sender As Object, e As EventArgs) Handles listboxVendors.SelectedIndexChanged Private Sub listboxVendors_SelectedIndexChanged(sender As Object, e As EventArgs) Handles listboxVendors.SelectedIndexChanged
If listboxVendors.SelectedItem IsNot Nothing Then If listboxVendors.SelectedItem IsNot Nothing Then
Dim oVendor As Vendor = listboxVendors.SelectedItem Dim oVendor As Vendor = listboxVendors.SelectedItem
CurrentVendor = oVendor
Dim oGroups As List(Of ProductGroup) = _WinLine.GetGroupsByVendor(oVendor.Code) Dim oGroups As List(Of ProductGroup) = _WinLine.GetGroupsByVendor(oVendor.Code)
listboxProductGroups.DataSource = oGroups listboxProductGroups.DataSource = oGroups
@ -42,52 +35,51 @@
Private Sub listboxProductGroups_SelectedIndexChanged(sender As Object, e As EventArgs) Handles listboxProductGroups.SelectedIndexChanged Private Sub listboxProductGroups_SelectedIndexChanged(sender As Object, e As EventArgs) Handles listboxProductGroups.SelectedIndexChanged
If listboxProductGroups.SelectedItem IsNot Nothing Then If listboxProductGroups.SelectedItem IsNot Nothing Then
Dim oGroup As ProductGroup = listboxProductGroups.SelectedItem Dim oGroup As ProductGroup = listboxProductGroups.SelectedItem
CurrentGroup = oGroup Dim oVersions As List(Of ProductVersion) = _WinLine.GetVersionsByVendorAndGroup(oGroup.Code, oGroup.GroupId)
Dim oVersions As List(Of ProductVersion) = _WinLine.GetVersionsByVendorAndGroup(oGroup.Vendor, oGroup.Id)
listBoxProductVersion.DataSource = oVersions listBoxProductVersion.DataSource = oVersions
End If End If
End Sub End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
'Dim oVendor As DataRowView = listboxVendors.SelectedItem() Dim oVendor As Vendor = listboxVendors.SelectedItem()
'Dim oGroup As DataRowView = listboxProductGroups.SelectedItem() Dim oGroup As ProductGroup = listboxProductGroups.SelectedItem()
'Dim oVersion As DataRowView = listBoxProductVersion.SelectedItem() Dim oVersion As ProductVersion = listBoxProductVersion.SelectedItem()
'If oVendor Is Nothing Then If oVendor Is Nothing Then
' MsgBox("Bitte einen Lieferanten auswählen!", MsgBoxStyle.Information, Text) MsgBox("Bitte einen Lieferanten auswählen!", MsgBoxStyle.Information, Text)
' Exit Sub Exit Sub
'End If End If
'If oGroup Is Nothing Then If oGroup Is Nothing Then
' MsgBox("Bitte eine Produkt-Gruppe auswählen!", MsgBoxStyle.Information, Text) MsgBox("Bitte eine Produkt-Gruppe auswählen!", MsgBoxStyle.Information, Text)
' Exit Sub Exit Sub
'End If End If
'If oVersion Is Nothing Then If oVersion Is Nothing Then
' MsgBox("Bitte eine Produkt-Version auswählen!", MsgBoxStyle.Information, Text) MsgBox("Bitte eine Produkt-Version auswählen!", MsgBoxStyle.Information, Text)
' Exit Sub Exit Sub
'End If End If
'Dim oVendorId = CurrentVendor.Id Dim oArticleNumber = $"{oVendor.Code}{oGroup.GroupString}{oVersion.VersionString}"
'Dim oGroupId = CurrentGroup.Id
'Dim oVersionId = CurrentVersion.Id
'Dim oRunningNumber = _WinLine.GetNextRunningNumber(oVendorId, oGroupId, oVersionId)
'MsgBox($"{oVendorId}-{oGroupId}-{oVersionId}-00000-00000") Try
Dim oRunningNumber = _WinLine.GetNextRunningNumber(oVendor.Code, oGroup.GroupId, oVersion.VersionId)
MsgBox($"{oArticleNumber}{oRunningNumber}")
Catch ex As Exception
Select Case ex.Message
Case _WinLine.NO_RUNNING_NUMBER_FOUND
Dim oMessage = $"Für die Artikelnummer [{oArticleNumber}___] wurde im WinLine-System keine Laufende Nummer hinterlegt."
oMessage &= "Diese Nummer ist für die Automatische Artikelnummer-Generierung zwingend notwendig"
MsgBox(oMessage, MsgBoxStyle.Critical, Text)
Case Else
MsgBox("Folgender Fehler ist aufgetreten:" & vbNewLine & vbNewLine & ex.Message, MsgBoxStyle.Critical, Text)
End Select
End Try
End Sub End Sub
Private Sub listBoxProductVersion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles listBoxProductVersion.SelectedIndexChanged Private Sub EinstellungenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles EinstellungenToolStripMenuItem.Click
'If listBoxProductVersion.SelectedIndex >= 0 Then frmWinlineConfig.ShowDialog()
' Dim oVersion As DataRowView = listBoxProductVersion.SelectedItem()
' Dim oVersionId As String = oVersion.Item("C999")
' Dim oVersionName As String = oVersion.Item("C001")
' CurrentVersion = New ProductVersion With {
' .Id = oVersionId,
' .Name = oVersionName
' }
'End If
End Sub End Sub
End Class End Class

View File

@ -0,0 +1,141 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmWinlineConfig
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.txtServer = New System.Windows.Forms.TextBox()
Me.txtMandator = New System.Windows.Forms.TextBox()
Me.txtUsername = New System.Windows.Forms.TextBox()
Me.txtPassword = New System.Windows.Forms.TextBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.GroupBox1.SuspendLayout()
Me.SuspendLayout()
'
'txtServer
'
Me.txtServer.Location = New System.Drawing.Point(9, 32)
Me.txtServer.Name = "txtServer"
Me.txtServer.Size = New System.Drawing.Size(346, 20)
Me.txtServer.TabIndex = 0
'
'txtMandator
'
Me.txtMandator.Location = New System.Drawing.Point(9, 71)
Me.txtMandator.Name = "txtMandator"
Me.txtMandator.Size = New System.Drawing.Size(346, 20)
Me.txtMandator.TabIndex = 1
'
'txtUsername
'
Me.txtUsername.Location = New System.Drawing.Point(9, 110)
Me.txtUsername.Name = "txtUsername"
Me.txtUsername.Size = New System.Drawing.Size(346, 20)
Me.txtUsername.TabIndex = 2
'
'txtPassword
'
Me.txtPassword.Location = New System.Drawing.Point(9, 149)
Me.txtPassword.Name = "txtPassword"
Me.txtPassword.Size = New System.Drawing.Size(346, 20)
Me.txtPassword.TabIndex = 3
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(6, 16)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(79, 13)
Me.Label1.TabIndex = 4
Me.Label1.Text = "Server-Adresse"
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(6, 55)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(49, 13)
Me.Label2.TabIndex = 5
Me.Label2.Text = "Mandant"
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(6, 94)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(49, 13)
Me.Label3.TabIndex = 6
Me.Label3.Text = "Benutzer"
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(6, 133)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(50, 13)
Me.Label4.TabIndex = 7
Me.Label4.Text = "Passwort"
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.Label1)
Me.GroupBox1.Controls.Add(Me.Label4)
Me.GroupBox1.Controls.Add(Me.txtServer)
Me.GroupBox1.Controls.Add(Me.Label3)
Me.GroupBox1.Controls.Add(Me.txtMandator)
Me.GroupBox1.Controls.Add(Me.Label2)
Me.GroupBox1.Controls.Add(Me.txtUsername)
Me.GroupBox1.Controls.Add(Me.txtPassword)
Me.GroupBox1.Location = New System.Drawing.Point(12, 12)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(361, 226)
Me.GroupBox1.TabIndex = 8
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "WinLine WebServices"
'
'frmWinlineConfig
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(800, 450)
Me.Controls.Add(Me.GroupBox1)
Me.Name = "frmWinlineConfig"
Me.Text = "frmWinlineConfig"
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox1.PerformLayout()
Me.ResumeLayout(False)
End Sub
Friend WithEvents txtServer As TextBox
Friend WithEvents txtMandator As TextBox
Friend WithEvents txtUsername As TextBox
Friend WithEvents txtPassword As TextBox
Friend WithEvents Label1 As Label
Friend WithEvents Label2 As Label
Friend WithEvents Label3 As Label
Friend WithEvents Label4 As Label
Friend WithEvents GroupBox1 As GroupBox
End Class

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,23 @@
Public Class frmWinlineConfig
Private Sub frmWinlineConfig_Load(sender As Object, e As EventArgs) Handles MyBase.Load
With My.Application.ConfigManager.Config
If .WinLine_WebService IsNot Nothing Then
.WinLine_WebService = New Config.WebServiceConfig()
End If
txtServer.Text = .WinLine_WebService.Server
txtMandator.Text = .WinLine_WebService.Mandator
txtUsername.Text = .WinLine_WebService.Username
txtPassword.Text = .WinLine_WebService.Password
End With
End Sub
Private Sub frmWinlineConfig_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
With My.Application.ConfigManager.Config
.WinLine_WebService.Server = txtServer.Text
.WinLine_WebService.Mandator = txtMandator.Text
.WinLine_WebService.Username = txtUsername.Text
.WinLine_WebService.Password = txtPassword.Text
End With
End Sub
End Class

View File

@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net472" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net472" />
<package id="NLog" version="4.7.4" targetFramework="net472" /> <package id="NLog" version="4.7.4" targetFramework="net472" />
</packages> </packages>