Projektdateien hinzufügen.
This commit is contained in:
parent
a62b344d7f
commit
b1c64c75b9
25
BNSOnWeb.sln
Normal file
25
BNSOnWeb.sln
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.5.33516.290
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "BNSOnWeb", "BNSOnWeb\BNSOnWeb.vbproj", "{189C7524-C87A-43A5-A2E5-DC3FADF6BA61}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{189C7524-C87A-43A5-A2E5-DC3FADF6BA61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{189C7524-C87A-43A5-A2E5-DC3FADF6BA61}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{189C7524-C87A-43A5-A2E5-DC3FADF6BA61}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{189C7524-C87A-43A5-A2E5-DC3FADF6BA61}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {FF4776D9-4422-4288-A5E9-1FB6E312FF70}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
22
BNSOnWeb/App.config
Normal file
22
BNSOnWeb/App.config
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<startup>
|
||||||
|
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
|
||||||
|
</startup>
|
||||||
|
<runtime>
|
||||||
|
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||||
|
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</assemblyBinding>
|
||||||
|
</runtime>
|
||||||
|
</configuration>
|
||||||
163
BNSOnWeb/BNSOnWeb.vbproj
Normal file
163
BNSOnWeb/BNSOnWeb.vbproj
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{189C7524-C87A-43A5-A2E5-DC3FADF6BA61}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<StartupObject>
|
||||||
|
</StartupObject>
|
||||||
|
<RootNamespace>BNSOnWeb</RootNamespace>
|
||||||
|
<AssemblyName>BNSOnWeb</AssemblyName>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<MyType>Windows</MyType>
|
||||||
|
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||||
|
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||||
|
<Deterministic>true</Deterministic>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<DefineDebug>true</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DocumentationFile>BNSOnWeb.xml</DocumentationFile>
|
||||||
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<DefineDebug>false</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DocumentationFile>BNSOnWeb.xml</DocumentationFile>
|
||||||
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionExplicit>On</OptionExplicit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionCompare>Binary</OptionCompare>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionStrict>Off</OptionStrict>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<OptionInfer>On</OptionInfer>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Import Include="Microsoft.VisualBasic" />
|
||||||
|
<Import Include="System" />
|
||||||
|
<Import Include="System.Collections" />
|
||||||
|
<Import Include="System.Collections.Generic" />
|
||||||
|
<Import Include="System.Drawing" />
|
||||||
|
<Import Include="System.Diagnostics" />
|
||||||
|
<Import Include="System.Linq" />
|
||||||
|
<Import Include="System.Xml.Linq" />
|
||||||
|
<Import Include="System.Threading.Tasks" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="DigitalDataController.vb" />
|
||||||
|
<Compile Include="Helpers.vb" />
|
||||||
|
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||||
|
<Compile Include="My Project\Application.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Application.myapp</DependentUpon>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="My Project\Resources.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="My Project\Settings.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="My Project\Resources.resx">
|
||||||
|
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||||
|
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="My Project\Application.myapp">
|
||||||
|
<Generator>MyApplicationCodeGenerator</Generator>
|
||||||
|
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<None Include="My Project\Settings.settings">
|
||||||
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
<CustomToolNamespace>My</CustomToolNamespace>
|
||||||
|
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||||
|
</None>
|
||||||
|
<None Include="App.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="Interop.WINDREAMLib">
|
||||||
|
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WINDREAMLib.dll</HintPath>
|
||||||
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Interop.WMCNNCTDLLLib">
|
||||||
|
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WMCNNCTDLLLib.dll</HintPath>
|
||||||
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Interop.WMOBRWSLib">
|
||||||
|
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WMOBRWSLib.dll</HintPath>
|
||||||
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Interop.WMOTOOLLib">
|
||||||
|
<HintPath>P:\Visual Studio Projekte\Bibliotheken\windream\Interop.WMOTOOLLib.dll</HintPath>
|
||||||
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Swashbuckle.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd1bb07a5ac7c7bc, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>D:\ProgramFiles\windream\windream Web Service SDK\Libraries\3rdParty\Swashbuckle.Core.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.ServiceModel" />
|
||||||
|
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>D:\ProgramFiles\windream\windream Web Service SDK\Libraries\3rdParty\System.Web.Http.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
<Reference Include="Windream.WebService, Version=8.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>D:\ProgramFiles\windream\windream Web Service SDK\Libraries\Windream\Windream.WebService.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Windream.WebService.DTO, Version=8.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>D:\ProgramFiles\windream\windream Web Service SDK\Libraries\Windream\Windream.WebService.DTO.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Windream.WebService.DTO.Impl, Version=8.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>D:\ProgramFiles\windream\windream Web Service SDK\Libraries\Windream\Windream.WebService.DTO.Impl.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Windream.WebService.Impl, Version=8.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>D:\ProgramFiles\windream\windream Web Service SDK\Libraries\Windream\Windream.WebService.Impl.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Windream.WebService.Logging, Version=8.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>D:\ProgramFiles\windream\windream Web Service SDK\Libraries\Windream\Windream.WebService.Logging.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Windream.WebService.WebAPI, Version=8.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>D:\ProgramFiles\windream\windream Web Service SDK\Libraries\Windream\Windream.WebService.WebAPI.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="config.xml">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
|
</Project>
|
||||||
216
BNSOnWeb/DigitalDataController.vb
Normal file
216
BNSOnWeb/DigitalDataController.vb
Normal file
@ -0,0 +1,216 @@
|
|||||||
|
Imports System.Data
|
||||||
|
Imports System.Data.SqlClient
|
||||||
|
Imports System.Net
|
||||||
|
Imports System.Net.Http
|
||||||
|
Imports System.Net.Http.Headers
|
||||||
|
Imports System.Web.Http
|
||||||
|
Imports System.Xml
|
||||||
|
Imports Windream.WebService.Logging
|
||||||
|
Imports Windream.WebService.WebAPI.PlugIns
|
||||||
|
Imports WINDREAMLib
|
||||||
|
Imports WMCNNCTDLLLib
|
||||||
|
Imports WMOBRWSLib
|
||||||
|
|
||||||
|
Public Class DigitalDataController
|
||||||
|
Inherits PlugInBaseController
|
||||||
|
|
||||||
|
Private _session As IWMSession6
|
||||||
|
Private ReadOnly _helper As Helpers
|
||||||
|
Private ReadOnly _logger As ILogging
|
||||||
|
Private ReadOnly _config As XmlDocument
|
||||||
|
|
||||||
|
Public Overrides ReadOnly Property RoutesSettings As IEnumerable(Of RouteSettings)
|
||||||
|
Get
|
||||||
|
Return New List(Of RouteSettings) From {
|
||||||
|
New RouteSettings("DigitalDataController", "DigitalData/{action}/{id}", New With {
|
||||||
|
.id = RouteParameter.Optional, .controller = "DigitalData"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub New(pLogger As ILogging)
|
||||||
|
_logger = pLogger
|
||||||
|
_logger.Write("[INIT] Digital Data Controller wird geladen")
|
||||||
|
|
||||||
|
_helper = New Helpers(_logger)
|
||||||
|
_config = _helper.GetConfig()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function GetConnectionString()
|
||||||
|
Return _config?.DocumentElement.SelectSingleNode("/config/connectionString").InnerText
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' A simple example of a http-get service method implementation.
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="docId">windream Document-ID</param>
|
||||||
|
''' <param name="userId">windream User-ID</param>
|
||||||
|
''' <remarks>This method creates a nice greeting.</remarks>
|
||||||
|
<HttpGet>
|
||||||
|
Public Function BNSDownload(<FromUri> docId As Integer, <FromUri> userId As String) As HttpResponseMessage
|
||||||
|
Dim DT As New DataTable("DDRESULT")
|
||||||
|
Dim Domain, Username, Password As String
|
||||||
|
|
||||||
|
_logger.Write($"[REQUEST] Anfrage von Benutzer-ID {userId} für Dokument-ID {docId}")
|
||||||
|
|
||||||
|
Try
|
||||||
|
Using oConnection As New SqlConnection(GetConnectionString())
|
||||||
|
Using oAdapter As New SqlDataAdapter($"SELECT DOMAIN, USERNAME, PW FROM TBDD_WEBSERVICE_USER_EX WHERE USERNAME_LINK = '{userId}'", oConnection)
|
||||||
|
oAdapter.Fill(DT)
|
||||||
|
End Using
|
||||||
|
End Using
|
||||||
|
|
||||||
|
'DT = _database.GetDatatable($"SELECT DOMAIN, USERNAME, PW FROM TBDD_WEBSERVICE_USER_EX WHERE USERNAME_LINK = '{userId}'")
|
||||||
|
Catch ex As Exception
|
||||||
|
_logger.Write("[DATABASE] Fehler beim Zugriff auf die Datenbank ")
|
||||||
|
_logger.WriteError(ex)
|
||||||
|
|
||||||
|
Return CreateResponseMessage(Request, HttpStatusCode.InternalServerError)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
If DT.Rows.Count = 0 Then
|
||||||
|
_logger.Write($"[DATABASE] BenutzerID {userId} wurde nicht in der Datenbank gefunden.")
|
||||||
|
Return CreateResponseMessage(Request, $"Benutzer {userId} wurde nicht gefunden", HttpStatusCode.Unauthorized)
|
||||||
|
Else
|
||||||
|
Dim oRow As DataRow = DT.Rows.Item(0)
|
||||||
|
|
||||||
|
Domain = oRow.Item("DOMAIN")
|
||||||
|
Username = oRow.Item("USERNAME")
|
||||||
|
Password = oRow.Item("PW")
|
||||||
|
|
||||||
|
_logger.Write($"[DATABASE] BenutzerID {userId} wurde gefunden.")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim loggedIn As Boolean = CreateSessionForUser(Username, Password, Domain)
|
||||||
|
|
||||||
|
If Not loggedIn Then
|
||||||
|
Return CreateResponseMessage(Request, $"Session für Benutzer {userId} konnte nicht aufgebaut werden. Weitere Informationen im Log", HttpStatusCode.BadRequest)
|
||||||
|
End If
|
||||||
|
Dim WMDoc As IWMObject7
|
||||||
|
Dim WMStream As IWMStream
|
||||||
|
Dim fileContent As Byte()
|
||||||
|
|
||||||
|
Try
|
||||||
|
WMDoc = _session.GetWMObjectById(WMEntity.WMEntityDocument, docId)
|
||||||
|
Catch ex As Exception
|
||||||
|
_logger.Write("[WINDREAM/GetWMObjectById] Ein Fehler beim Zugriff auf Windream ist aufgetreten ")
|
||||||
|
_logger.WriteError(ex)
|
||||||
|
_logger.Write($"[WINDREAM/Session] Session für Benutzer {Username} wird geschlossen")
|
||||||
|
_session.Logout()
|
||||||
|
|
||||||
|
Return CreateResponseMessage(Request, "Document not found", HttpStatusCode.NotFound)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Try
|
||||||
|
WMStream = WMDoc.OpenStream("BinaryObject", WMObjectStreamOpenMode.WMObjectStreamOpenModeRead)
|
||||||
|
fileContent = WMStream.Read(WMStream.GetSize())
|
||||||
|
Catch ex As Exception
|
||||||
|
_logger.Write("[WINDREAM/OpenStream] Ein Fehler beim Zugriff auf Windream ist aufgetreten")
|
||||||
|
_logger.WriteError(ex)
|
||||||
|
_logger.Write($"[WINDREAM/Session] Session für Benutzer {Username} wird geschlossen")
|
||||||
|
_session.Logout()
|
||||||
|
|
||||||
|
Return CreateResponseMessage(Request, HttpStatusCode.InternalServerError)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
_logger.Write($"[WINDREAM/Session] Session für Benutzer {Username} wird geschlossen")
|
||||||
|
_session.Logout()
|
||||||
|
|
||||||
|
' Gibt die Datei zum Download zurück
|
||||||
|
Return CreateFileResponseMessage(fileContent, WMDoc.aName)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function CreateFileResponseMessage(data As Byte(), filename As String) As HttpResponseMessage
|
||||||
|
_logger.Write($"[WINDREAM/Download] Datei {filename} wird für Download zur Verfügung gestellt")
|
||||||
|
Dim Res = New HttpResponseMessage With {
|
||||||
|
.StatusCode = HttpStatusCode.OK,
|
||||||
|
.Content = New ByteArrayContent(data)
|
||||||
|
}
|
||||||
|
Res.Content.Headers.ContentType = New MediaTypeHeaderValue("application/octet-stream")
|
||||||
|
Res.Content.Headers.ContentDisposition = New ContentDispositionHeaderValue("attachment") With {
|
||||||
|
.FileName = filename
|
||||||
|
}
|
||||||
|
Return Res
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function CreateSessionForUser(username As String, password As String, domain As String)
|
||||||
|
Dim WMServerBrowser As New ServerBrowser()
|
||||||
|
Dim DMSServer As String
|
||||||
|
Dim Connect As IWMConnect2
|
||||||
|
Dim Session As IWMSession6
|
||||||
|
Dim User As WMOTOOLLib.WMUserIdentity
|
||||||
|
|
||||||
|
Try
|
||||||
|
'' Get the current Windream Server
|
||||||
|
DMSServer = WMServerBrowser.GetCurrentServer()
|
||||||
|
Catch ex As Exception
|
||||||
|
_logger.Write($"[WINDREAM/ServerBrowser] DMS Server konnte nicht ausgelesen werden.")
|
||||||
|
_logger.WriteError(ex)
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Try
|
||||||
|
' Create a User Object for Session
|
||||||
|
User = New WMOTOOLLib.WMUserIdentity With {
|
||||||
|
.aDomain = domain,
|
||||||
|
.aPassword = password,
|
||||||
|
.aUserName = username,
|
||||||
|
.aServerName = DMSServer
|
||||||
|
}
|
||||||
|
Catch ex As Exception
|
||||||
|
_logger.Write($"[WINDREAM/User] User Objekt konnte nicht erstellt werden.")
|
||||||
|
_logger.WriteError(ex)
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
_logger.Write("[WINDREAM/Session] Session wird aufgebaut")
|
||||||
|
_logger.Write($"[WINDREAM/Session] Username: {username}")
|
||||||
|
_logger.Write($"[WINDREAM/Session] Passwort: {password}")
|
||||||
|
_logger.Write($"[WINDREAM/Session] Domäne: {domain}")
|
||||||
|
_logger.Write($"[WINDREAM/Session] Windream Server: {DMSServer}")
|
||||||
|
|
||||||
|
Try
|
||||||
|
' Create Connect Object for Session
|
||||||
|
Connect = New WMConnect With {
|
||||||
|
.ModuleId = 9
|
||||||
|
}
|
||||||
|
Catch ex As Exception
|
||||||
|
_logger.Write($"[WINDREAM/Connect] Connect Objekt konnte nicht erstellt werden.")
|
||||||
|
_logger.WriteError(ex)
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
Try
|
||||||
|
Session = Connect.Login(User)
|
||||||
|
_logger.Write($"[WINDREAM/Session] Session wurde aufgebaut")
|
||||||
|
|
||||||
|
If Session.aLoggedin Then
|
||||||
|
_session = Session
|
||||||
|
|
||||||
|
_logger.Write($"[WINDREAM/Session] Benutzer {username} ist eingeloggt")
|
||||||
|
Return True
|
||||||
|
Else
|
||||||
|
_logger.Write($"[WINDREAM/Session] Fehler beim Aufbau der Session. Benutzer {username} ist nicht eingeloggt!")
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
_logger.Write($"[WINDREAM/Session] Fehler bei Login von Benutzer {username}!")
|
||||||
|
_logger.WriteError(ex)
|
||||||
|
|
||||||
|
If Not IsNothing(Session) AndAlso Session.aLoggedin Then
|
||||||
|
_session = Session
|
||||||
|
_logger.Write($"[WINDREAM/Session] Benutzer {username} ist eingeloggt")
|
||||||
|
Return True
|
||||||
|
Else
|
||||||
|
_logger.Write($"[WINDREAM/Session] Fehler beim Aufbau der Session. Benutzer {username} ist nicht eingeloggt!")
|
||||||
|
_logger.WriteError(ex)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
39
BNSOnWeb/Helpers.vb
Normal file
39
BNSOnWeb/Helpers.vb
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
Imports System.Reflection
|
||||||
|
Imports System.Xml
|
||||||
|
Imports Windream.WebService.Logging
|
||||||
|
|
||||||
|
Public Class Helpers
|
||||||
|
Private _logger As ILogging
|
||||||
|
|
||||||
|
Public Sub New(pLogger As ILogging)
|
||||||
|
_logger = pLogger
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function GetPluginPath() As String
|
||||||
|
Dim s = Assembly.GetExecutingAssembly().CodeBase
|
||||||
|
s = New Uri(s).AbsolutePath
|
||||||
|
s = Uri.UnescapeDataString(s)
|
||||||
|
s = IO.Path.GetFullPath(s)
|
||||||
|
s = IO.Path.GetDirectoryName(s)
|
||||||
|
|
||||||
|
Return s
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function GetConfig() As XmlDocument
|
||||||
|
Dim path As String = GetPluginPath()
|
||||||
|
Dim configFile = path & "\config.xml"
|
||||||
|
|
||||||
|
_logger.Write($"[CONFIG] Lade Konfigurations Datei {configFile}", LogLevel.DEBUG)
|
||||||
|
|
||||||
|
If IO.File.Exists(configFile) Then
|
||||||
|
Dim Doc As New XmlDocument()
|
||||||
|
Doc.Load(configFile)
|
||||||
|
|
||||||
|
Return Doc
|
||||||
|
Else
|
||||||
|
_logger.Write($"[CONFIG] Konfigurations Datei {configFile} wurde NICHT gefunden!")
|
||||||
|
|
||||||
|
Return Nothing
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
13
BNSOnWeb/My Project/Application.Designer.vb
generated
Normal file
13
BNSOnWeb/My Project/Application.Designer.vb
generated
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' Dieser Code wurde von einem Tool generiert.
|
||||||
|
' Laufzeitversion:4.0.30319.42000
|
||||||
|
'
|
||||||
|
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
' der Code erneut generiert wird.
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
11
BNSOnWeb/My Project/Application.myapp
Normal file
11
BNSOnWeb/My Project/Application.myapp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<MySubMain>true</MySubMain>
|
||||||
|
<MainForm>Form1</MainForm>
|
||||||
|
<SingleInstance>false</SingleInstance>
|
||||||
|
<ShutdownMode>0</ShutdownMode>
|
||||||
|
<EnableVisualStyles>true</EnableVisualStyles>
|
||||||
|
<AuthenticationMode>0</AuthenticationMode>
|
||||||
|
<ApplicationType>0</ApplicationType>
|
||||||
|
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||||
|
</MyApplicationData>
|
||||||
35
BNSOnWeb/My Project/AssemblyInfo.vb
Normal file
35
BNSOnWeb/My Project/AssemblyInfo.vb
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
Imports System
|
||||||
|
Imports System.Reflection
|
||||||
|
Imports System.Runtime.InteropServices
|
||||||
|
|
||||||
|
' Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||||
|
' Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||||
|
' die einer Assembly zugeordnet sind.
|
||||||
|
|
||||||
|
' Werte der Assemblyattribute überprüfen
|
||||||
|
|
||||||
|
<Assembly: AssemblyTitle("WindowsApp1")>
|
||||||
|
<Assembly: AssemblyDescription("")>
|
||||||
|
<Assembly: AssemblyCompany("")>
|
||||||
|
<Assembly: AssemblyProduct("WindowsApp1")>
|
||||||
|
<Assembly: AssemblyCopyright("Copyright © 2020")>
|
||||||
|
<Assembly: AssemblyTrademark("")>
|
||||||
|
|
||||||
|
<Assembly: ComVisible(False)>
|
||||||
|
|
||||||
|
'Die folgende GUID wird für die typelib-ID verwendet, wenn dieses Projekt für COM verfügbar gemacht wird.
|
||||||
|
<Assembly: Guid("2993e1e8-9abd-4cd6-8328-09b5128a52ab")>
|
||||||
|
|
||||||
|
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||||
|
'
|
||||||
|
' Hauptversion
|
||||||
|
' Nebenversion
|
||||||
|
' Buildnummer
|
||||||
|
' Revision
|
||||||
|
'
|
||||||
|
' Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||||
|
' indem Sie "*" wie unten gezeigt eingeben:
|
||||||
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
|
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||||
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
63
BNSOnWeb/My Project/Resources.Designer.vb
generated
Normal file
63
BNSOnWeb/My Project/Resources.Designer.vb
generated
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' Dieser Code wurde von einem Tool generiert.
|
||||||
|
' Laufzeitversion:4.0.30319.42000
|
||||||
|
'
|
||||||
|
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
' der Code erneut generiert wird.
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
|
Imports System
|
||||||
|
|
||||||
|
Namespace My.Resources
|
||||||
|
|
||||||
|
'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||||
|
'-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||||
|
'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||||
|
'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||||
|
'''<summary>
|
||||||
|
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||||
|
'''</summary>
|
||||||
|
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
|
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||||
|
Friend Module Resources
|
||||||
|
|
||||||
|
Private resourceMan As Global.System.Resources.ResourceManager
|
||||||
|
|
||||||
|
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||||
|
'''</summary>
|
||||||
|
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||||
|
Get
|
||||||
|
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||||
|
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("BNSOnWeb.Resources", GetType(Resources).Assembly)
|
||||||
|
resourceMan = temp
|
||||||
|
End If
|
||||||
|
Return resourceMan
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||||
|
''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||||
|
'''</summary>
|
||||||
|
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||||
|
Get
|
||||||
|
Return resourceCulture
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
resourceCulture = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
End Module
|
||||||
|
End Namespace
|
||||||
117
BNSOnWeb/My Project/Resources.resx
Normal file
117
BNSOnWeb/My Project/Resources.resx
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
<?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.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: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" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
</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" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
73
BNSOnWeb/My Project/Settings.Designer.vb
generated
Normal file
73
BNSOnWeb/My Project/Settings.Designer.vb
generated
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' Dieser Code wurde von einem Tool generiert.
|
||||||
|
' Laufzeitversion:4.0.30319.42000
|
||||||
|
'
|
||||||
|
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||||
|
' der Code erneut generiert wird.
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
|
||||||
|
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
|
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0"), _
|
||||||
|
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Partial Friend NotInheritable Class MySettings
|
||||||
|
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||||
|
|
||||||
|
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||||
|
|
||||||
|
#Region "Automatische My.Settings-Speicherfunktion"
|
||||||
|
#If _MyType = "WindowsForms" Then
|
||||||
|
Private Shared addedHandler As Boolean
|
||||||
|
|
||||||
|
Private Shared addedHandlerLockObject As New Object
|
||||||
|
|
||||||
|
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
|
||||||
|
If My.Application.SaveMySettingsOnExit Then
|
||||||
|
My.Settings.Save()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
#End If
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
Public Shared ReadOnly Property [Default]() As MySettings
|
||||||
|
Get
|
||||||
|
|
||||||
|
#If _MyType = "WindowsForms" Then
|
||||||
|
If Not addedHandler Then
|
||||||
|
SyncLock addedHandlerLockObject
|
||||||
|
If Not addedHandler Then
|
||||||
|
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||||
|
addedHandler = True
|
||||||
|
End If
|
||||||
|
End SyncLock
|
||||||
|
End If
|
||||||
|
#End If
|
||||||
|
Return defaultInstance
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
|
||||||
|
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||||
|
Friend Module MySettingsProperty
|
||||||
|
|
||||||
|
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||||
|
Friend ReadOnly Property Settings() As Global.BNSOnWeb.My.MySettings
|
||||||
|
Get
|
||||||
|
Return Global.BNSOnWeb.My.MySettings.Default
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
End Module
|
||||||
|
End Namespace
|
||||||
7
BNSOnWeb/My Project/Settings.settings
Normal file
7
BNSOnWeb/My Project/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||||
|
<Profiles>
|
||||||
|
<Profile Name="(Default)" />
|
||||||
|
</Profiles>
|
||||||
|
<Settings />
|
||||||
|
</SettingsFile>
|
||||||
4
BNSOnWeb/config.xml
Normal file
4
BNSOnWeb/config.xml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<config>
|
||||||
|
<connectionString>Data Source=dub1sql202;Initial Catalog=DD_ECM;Persist Security Info=True;User ID=sa;Password=dd</connectionString>
|
||||||
|
</config>
|
||||||
Loading…
x
Reference in New Issue
Block a user