Initial commit
This commit is contained in:
32
BMS/BMSService/AssemblyInfo.vb
Normal file
32
BMS/BMSService/AssemblyInfo.vb
Normal file
@@ -0,0 +1,32 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' General Information about an assembly is controlled through the following
|
||||
' set of attributes. Change these attribute values to modify the information
|
||||
' associated with an assembly.
|
||||
|
||||
' Review the values of the assembly attributes
|
||||
|
||||
<Assembly: AssemblyTitle("BMS Service")>
|
||||
<Assembly: AssemblyDescription("Handles start and watch jobs over the BMS programs")>
|
||||
<Assembly: AssemblyCompany("Zubler & Partner")>
|
||||
<Assembly: AssemblyProduct("BMS Service")>
|
||||
<Assembly: AssemblyCopyright("")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: CLSCompliant(True)>
|
||||
|
||||
'The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
<Assembly: Guid("45063487-0CB3-470D-B394-444EA2CEF66D")>
|
||||
|
||||
' Version information for an assembly consists of the following four values:
|
||||
'
|
||||
' Major Version
|
||||
' Minor Version
|
||||
' Build Number
|
||||
' Revision
|
||||
'
|
||||
' You can specify all the values or you can default the Build and Revision Numbers
|
||||
' by using the '*' as shown below:
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.*")>
|
||||
109
BMS/BMSService/BMSService.resx
Normal file
109
BMS/BMSService/BMSService.resx
Normal file
@@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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 forserialized 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="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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="$this.Name">
|
||||
<value>BMSService</value>
|
||||
</data>
|
||||
</root>
|
||||
61
BMS/BMSService/BMSService.sln
Normal file
61
BMS/BMSService/BMSService.sln
Normal file
@@ -0,0 +1,61 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "BMSService", "BMSService.vbproj", "{36BEB3BE-ABB4-4843-B6BB-588F5A9DF6C6}"
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Common", "..\Common\Common.vbproj", "{A1E2756A-4E32-40BB-B449-9BDA1C15DE84}"
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DataAccess", "..\DataAccess\DataAccess.vbproj", "{21B54F51-D2B2-459E-895C-540AD4A8704F}"
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ZpCryptography", "..\ZpCryptography\ZpCryptography.vbproj", "{290C31E0-49C7-4E85-A39F-CA496BE678B6}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SourceCodeControl) = preSolution
|
||||
SccNumberOfProjects = 4
|
||||
SccProjectUniqueName0 = BMSService.vbproj
|
||||
SccProjectName0 = \u0022$/BMS/BMSService\u0022,\u0020ZSCAAAAA
|
||||
SccLocalPath0 = .
|
||||
SccProvider0 = MSSCCI:Microsoft\u0020Visual\u0020SourceSafe
|
||||
CanCheckoutShared = false
|
||||
SccProjectUniqueName1 = ..\\Common\\Common.vbproj
|
||||
SccProjectName1 = \u0022$/BMS/Common\u0022,\u0020LTCAAAAA
|
||||
SccLocalPath1 = ..\\Common
|
||||
SccProvider1 = MSSCCI:Microsoft\u0020Visual\u0020SourceSafe
|
||||
CanCheckoutShared = false
|
||||
SccProjectUniqueName2 = ..\\DataAccess\\DataAccess.vbproj
|
||||
SccProjectName2 = \u0022$/BMS/DataAccess\u0022,\u0020STCAAAAA
|
||||
SccLocalPath2 = ..\\DataAccess
|
||||
SccProvider2 = MSSCCI:Microsoft\u0020Visual\u0020SourceSafe
|
||||
CanCheckoutShared = false
|
||||
SccProjectUniqueName3 = ..\\ZpCryptography\\ZpCryptography.vbproj
|
||||
SccProjectName3 = \u0022$/BMS/ZpCryptography\u0022,\u0020PUCAAAAA
|
||||
SccLocalPath3 = ..\\ZpCryptography
|
||||
SccProvider3 = MSSCCI:Microsoft\u0020Visual\u0020SourceSafe
|
||||
CanCheckoutShared = false
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{36BEB3BE-ABB4-4843-B6BB-588F5A9DF6C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{36BEB3BE-ABB4-4843-B6BB-588F5A9DF6C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{36BEB3BE-ABB4-4843-B6BB-588F5A9DF6C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{36BEB3BE-ABB4-4843-B6BB-588F5A9DF6C6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A1E2756A-4E32-40BB-B449-9BDA1C15DE84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A1E2756A-4E32-40BB-B449-9BDA1C15DE84}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A1E2756A-4E32-40BB-B449-9BDA1C15DE84}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A1E2756A-4E32-40BB-B449-9BDA1C15DE84}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{21B54F51-D2B2-459E-895C-540AD4A8704F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{21B54F51-D2B2-459E-895C-540AD4A8704F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{21B54F51-D2B2-459E-895C-540AD4A8704F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{21B54F51-D2B2-459E-895C-540AD4A8704F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{290C31E0-49C7-4E85-A39F-CA496BE678B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{290C31E0-49C7-4E85-A39F-CA496BE678B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{290C31E0-49C7-4E85-A39F-CA496BE678B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{290C31E0-49C7-4E85-A39F-CA496BE678B6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
BIN
BMS/BMSService/BMSService.suo
Normal file
BIN
BMS/BMSService/BMSService.suo
Normal file
Binary file not shown.
352
BMS/BMSService/BMSService.vb
Normal file
352
BMS/BMSService/BMSService.vb
Normal file
@@ -0,0 +1,352 @@
|
||||
#Region "Includes"
|
||||
|
||||
Imports System.ServiceProcess
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Xml
|
||||
|
||||
Imports Common.Common
|
||||
|
||||
#End Region
|
||||
|
||||
Public Class BMSService
|
||||
Inherits System.ServiceProcess.ServiceBase
|
||||
|
||||
#Region "Members"
|
||||
|
||||
Private m_TimerStarter As System.Threading.Timer
|
||||
Private m_TimerWatcher As System.Threading.Timer
|
||||
Private m_EventLog As EventLog
|
||||
Private m_StartJobs As DataSet
|
||||
Private m_WatchJobs As DataSet
|
||||
Private m_Common As Common.Common
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Component Designer generated code "
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
' This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
|
||||
' Add any initialization after the InitializeComponent() call
|
||||
|
||||
End Sub
|
||||
|
||||
'UserService overrides dispose to clean up the component list.
|
||||
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing Then
|
||||
If Not (components Is Nothing) Then
|
||||
components.Dispose()
|
||||
End If
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
' The main entry point for the process
|
||||
<MTAThread()> _
|
||||
Shared Sub Main()
|
||||
' Dim ServicesToRun() As System.ServiceProcess.ServiceBase
|
||||
|
||||
' More than one NT Service may run within the same process. To add
|
||||
' another service to this process, change the following line to
|
||||
' create a second service object. For example,
|
||||
'
|
||||
' ServicesToRun = New System.ServiceProcess.ServiceBase () {New Service1, New MySecondUserService}
|
||||
'
|
||||
' ServicesToRun = New System.ServiceProcess.ServiceBase() {New BMSService}
|
||||
|
||||
' System.ServiceProcess.ServiceBase.Run(ServicesToRun)
|
||||
|
||||
'-----------------
|
||||
'DEBUG check don't work in windows service manager...
|
||||
#If DEBUG Then
|
||||
Dim service As New BMSService
|
||||
service.StartService()
|
||||
System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite)
|
||||
#Else
|
||||
Dim ServicesToRun() As System.ServiceProcess.ServiceBase
|
||||
ServicesToRun = New System.ServiceProcess.ServiceBase() {New BMSService}
|
||||
System.ServiceProcess.ServiceBase.Run(ServicesToRun)
|
||||
#End If
|
||||
|
||||
End Sub
|
||||
|
||||
'Required by the Component Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
' NOTE: The following procedure is required by the Component Designer
|
||||
' It can be modified using the Component Designer.
|
||||
' Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
||||
'
|
||||
'BMSService
|
||||
'
|
||||
Me.ServiceName = "BMS Serivce"
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Service Start / Stopp"
|
||||
|
||||
Protected Overrides Sub OnStart(ByVal args() As String)
|
||||
StartService()
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnStop()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Private Methods"
|
||||
|
||||
'Occures ever time the timer elapses
|
||||
Sub TimeElapsedStarter(ByVal stateInfo As Object)
|
||||
Try
|
||||
'Load and execute starter Jobs
|
||||
m_StartJobs.Clear()
|
||||
DataAccess.Job.LoadJobs(m_Common, JobType.StartJob, m_StartJobs)
|
||||
ExecuteStartJobs()
|
||||
Catch ex As Exception
|
||||
WriteEventLog("Fehler: " & ex.Message & Environment.NewLine & Environment.NewLine & ex.StackTrace, EventLogEntryType.Error)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Occures ever time the timer elapses
|
||||
Sub TimeElapsedWatcher(ByVal stateInfo As Object)
|
||||
Try
|
||||
'Load and execute starter Jobs
|
||||
m_WatchJobs.Clear()
|
||||
DataAccess.Job.LoadJobs(m_Common, JobType.WatchJob, m_WatchJobs)
|
||||
ExecuteWatchJobs()
|
||||
Catch ex As Exception
|
||||
WriteEventLog("Fehler: " & ex.Message & Environment.NewLine & Environment.NewLine & ex.StackTrace, EventLogEntryType.Error)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Initializes all the service start stuff...
|
||||
Private Sub StartService()
|
||||
Try
|
||||
m_EventLog = New EventLog
|
||||
m_Common = New Common.Common
|
||||
|
||||
'Cannot use System.Timers.Timer due a Bug (http://support.microsoft.com/default.aspx?scid=kb;en-us;842793)
|
||||
Dim autoEvent As New System.Threading.AutoResetEvent(False)
|
||||
Dim timerStarterDelegate As System.Threading.TimerCallback = AddressOf TimeElapsedStarter
|
||||
Dim timerWatcherDelegate As System.Threading.TimerCallback = AddressOf TimeElapsedWatcher
|
||||
|
||||
m_TimerStarter = New System.Threading.Timer(timerStarterDelegate, autoEvent, 1000, m_Common.StartJobInterval)
|
||||
m_TimerWatcher = New System.Threading.Timer(timerWatcherDelegate, autoEvent, m_Common.WatchJobInterval, m_Common.WatchJobInterval)
|
||||
|
||||
m_StartJobs = New DataSet
|
||||
m_WatchJobs = New DataSet
|
||||
|
||||
Catch ex As Exception
|
||||
WriteEventLog("Fehler: " & ex.Message & Environment.NewLine & Environment.NewLine & ex.StackTrace, EventLogEntryType.Error)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Executes all watch jobs
|
||||
Private Sub ExecuteWatchJobs()
|
||||
'Check if there are any jobs
|
||||
If m_WatchJobs.Tables.Count > 0 And m_WatchJobs.Tables.Item(0).Rows.Count > 0 Then
|
||||
Dim dt As DataTable
|
||||
Dim dsFailedJobs As New DataSet
|
||||
Dim startTime As New DateTime, endTime As New DateTime
|
||||
|
||||
dt = m_WatchJobs.Tables.Item(0)
|
||||
|
||||
Dim dr As DataRow
|
||||
|
||||
For Each dr In dt.Rows
|
||||
'Check if job is in valid date range
|
||||
If dr.Item("DatumStart") <= DateTime.Now And CType(dr.Item("DatumEnde"), Date).AddDays(1) >= DateTime.Now Then
|
||||
|
||||
ConvertToDateTime(dr.Item("ZeitVon"), dr.Item("ZeitBis"), startTime, endTime)
|
||||
|
||||
If startTime <= DateTime.Now And endTime >= DateTime.Now Then
|
||||
'job seems to be in his valid datetime range...
|
||||
Dim lastRunStart As DateTime
|
||||
If dr("LastRunStart") Is DBNull.Value Then
|
||||
'use dummy date if the job never run before
|
||||
lastRunStart = New DateTime(1)
|
||||
Else
|
||||
lastRunStart = CDate(dr("LastRunStart"))
|
||||
End If
|
||||
|
||||
'get all failed starter jobs
|
||||
dsFailedJobs.Clear()
|
||||
DataAccess.Job.GetFailedStartJobs(m_Common, dr("ProgrammId"), dsFailedJobs)
|
||||
SendNotifications(dsFailedJobs, "Das Programm ##PROG_NAME## hat nicht innerhalb der Zeitspanne von " & m_Common.MaximalStartDuration.ToString() & " Minuten die Start() Methode der BMS-Dll aufgerufen. Möglicherweise konnte das Programm nicht gestartet werden.", JobType.StartJob)
|
||||
|
||||
'check for failed execution jobs
|
||||
dsFailedJobs.Clear()
|
||||
DataAccess.Job.GetFailedExecJobs(m_Common, dr("ProgrammId"), dsFailedJobs)
|
||||
If dsFailedJobs.Tables.Count > 0 And dsFailedJobs.Tables(0).Rows.Count > 0 Then
|
||||
SendNotifications(dsFailedJobs, "Das Programm ##PROG_NAME## konnte nicht innerhalb der vordefinierten Laufzeit von " & dsFailedJobs.Tables(0).Rows(0)("MaxLaufzeit").ToString() & " Minuten ausgeführt werden.", JobType.WatchJob)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Executes all starter jobs
|
||||
Private Sub ExecuteStartJobs()
|
||||
'Check if there are any jobs
|
||||
If m_StartJobs.Tables.Count > 0 And m_StartJobs.Tables.Item(0).Rows.Count > 0 Then
|
||||
Dim dt As DataTable
|
||||
Dim startTime As New DateTime, endTime As New DateTime
|
||||
|
||||
dt = m_StartJobs.Tables.Item(0)
|
||||
|
||||
Dim dr As DataRow
|
||||
|
||||
For Each dr In dt.Rows
|
||||
If dr("RunJob") Then
|
||||
'RunJob has to run as fast as possible
|
||||
If Not dr("IsRunning") Then
|
||||
'job isn't already running
|
||||
Dim job As New Job(m_Common, dr("JobId"), dr("Beschreibung"), dr("ProgrammId"), CType(dr("JobTypId"), JobType), CType(dr("JobStartTypId"), JobStartType))
|
||||
If Not dr("ParentProgrammId") Is DBNull.Value Then
|
||||
Dim parentProgrammId As Integer = dr("ParentProgrammId")
|
||||
'job has a relation to another job, validate if parent job is currently executing...
|
||||
If Not DataAccess.Job.CheckIsRunning(m_Common.DSN, parentProgrammId) Then
|
||||
'parent job is not running, -> run job
|
||||
'NachLetzterAusfuerung False, cause no one cares about next start time on RunJobs
|
||||
job.Launch(True, False)
|
||||
End If
|
||||
Else
|
||||
'run job
|
||||
job.Launch(True, False)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
'Check if job is in valid date range
|
||||
If dr.Item("DatumStart") <= DateTime.Now And CType(dr.Item("DatumEnde"), Date).AddDays(1) >= DateTime.Now Then
|
||||
|
||||
ConvertToDateTime(dr.Item("ZeitVon"), dr.Item("ZeitBis"), startTime, endTime)
|
||||
|
||||
If startTime <= DateTime.Now And endTime >= DateTime.Now Then
|
||||
If dr("NextStartDate") < DateTime.Now Then
|
||||
'interval has elapsed (should already be checked in GetJobs SP...)
|
||||
If Not dr("IsRunning") Then
|
||||
'job isn't already running
|
||||
Dim job As New Job(m_Common, dr("JobId"), dr("Beschreibung"), dr("ProgrammId"), CType(dr("JobTypId"), JobType), CType(dr("JobStartTypId"), JobStartType))
|
||||
If Not dr("ParentProgrammId") Is DBNull.Value Then
|
||||
Dim parentProgrammId As Integer = dr("ParentProgrammId")
|
||||
'job has a relation to another job, validate if parent job is currently executing...
|
||||
If Not DataAccess.Job.CheckIsRunning(m_Common.DSN, parentProgrammId) Then
|
||||
'parent job is not running, -> run job
|
||||
job.Launch(False, dr("NachLetzterAusfuerung"))
|
||||
End If
|
||||
Else
|
||||
'run job
|
||||
job.Launch(False, dr("NachLetzterAusfuerung"))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Sends notifications to the pre-definied receivers (file or mail)
|
||||
Private Sub SendNotifications(ByVal ds As DataSet, ByVal message As String, ByVal jobType As JobType)
|
||||
Dim drFailed As DataRow
|
||||
Dim dsNotifications As New DataSet
|
||||
Dim hasNotiLimitReached As Boolean
|
||||
|
||||
hasNotiLimitReached = False
|
||||
|
||||
If ds.Tables.Count > 0 Then
|
||||
If ds.Tables(0).Rows.Count > 0 Then
|
||||
For Each drFailed In ds.Tables(0).Rows
|
||||
|
||||
'check if we already reached the limits for sending start/satch notifications
|
||||
If jobType = jobType.WatchJob Then
|
||||
If drFailed("NotiCounter") >= m_Common.MaxWatcherNotifications Then
|
||||
hasNotiLimitReached = True
|
||||
Else
|
||||
hasNotiLimitReached = False
|
||||
End If
|
||||
Else
|
||||
If drFailed("NotiCounter") >= m_Common.MaxStarterNotifications Then
|
||||
hasNotiLimitReached = True
|
||||
Else
|
||||
hasNotiLimitReached = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not hasNotiLimitReached Then
|
||||
'get all notifications to a programm
|
||||
dsNotifications.Clear()
|
||||
DataAccess.Job.GetNotifications(m_Common, CInt(drFailed("ProgrammId")), dsNotifications)
|
||||
If dsNotifications.Tables.Count > 0 Then
|
||||
'seems to have rows in a table...
|
||||
DataAccess.Job.SendNotification(m_Common, CInt(drFailed("ProgrammId")), dsNotifications, message, drFailed("JobId"), jobType)
|
||||
End If
|
||||
End If
|
||||
|
||||
If drFailed("NachLetzterAusfuerung") Then
|
||||
DataAccess.Job.SetJobLastRun(m_Common.DSN, drFailed("JobId"), LastRun.End)
|
||||
If Not drFailed("RunJob") Then
|
||||
'calc next start exec time if its not a run job
|
||||
DataAccess.Job.SetNextExecDateTime(m_Common.DSN, drFailed("JobId"))
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Helper Methods"
|
||||
|
||||
'Converts the times from database to a datetime datatyp for better handling
|
||||
Private Sub ConvertToDateTime(ByVal startTime As String, ByVal endTime As String, ByRef startDateTime As DateTime, ByRef endDateTime As DateTime)
|
||||
Try
|
||||
Dim houres As Integer, minutes As Integer
|
||||
|
||||
'let's parse some time stuff to get start and end time in a better datatype...
|
||||
houres = Left(startTime, 2)
|
||||
minutes = Right(startTime, 2)
|
||||
|
||||
startDateTime = DateTime.Today.AddHours(houres)
|
||||
startDateTime = startDateTime.AddMinutes(minutes)
|
||||
|
||||
houres = Left(endTime, 2)
|
||||
minutes = Right(endTime, 2)
|
||||
|
||||
endDateTime = DateTime.Today.AddHours(houres)
|
||||
endDateTime = endDateTime.AddMinutes(minutes)
|
||||
|
||||
'if endtime is less, endtime is on next day
|
||||
'Ex: Start 23:15; End 02:45
|
||||
If endDateTime < startDateTime Then
|
||||
endTime = endDateTime.AddDays(1)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Writes an message to windows event log
|
||||
Private Sub WriteEventLog(ByVal errorMessage As String, ByVal eventLogType As EventLogEntryType)
|
||||
Try
|
||||
m_Common.Log(Common.Common.SERVICE_DISPLAY_NAME, "Quelle: " & SERVICE_DISPLAY_NAME & Environment.NewLine & "Meldung: " & errorMessage, eventLogType)
|
||||
Catch ex As Exception
|
||||
System.Diagnostics.EventLog.WriteEntry(SERVICE_DISPLAY_NAME, errorMessage, eventLogType)
|
||||
System.Diagnostics.EventLog.WriteEntry(SERVICE_DISPLAY_NAME, ex.Message + Environment.NewLine + ex.StackTrace, EventLogEntryType.Error)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
7
BMS/BMSService/BMSService.vbdoc
Normal file
7
BMS/BMSService/BMSService.vbdoc
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<!-- VBdocman .NET config file for current project.-->
|
||||
<!-- Example: <add key="settingName" value="settingValue"/> -->
|
||||
</appSettings>
|
||||
</configuration>
|
||||
163
BMS/BMSService/BMSService.vbproj
Normal file
163
BMS/BMSService/BMSService.vbproj
Normal file
@@ -0,0 +1,163 @@
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{36BEB3BE-ABB4-4843-B6BB-588F5A9DF6C6}</ProjectGuid>
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>EDKB10</AssemblyName>
|
||||
<AssemblyOriginatorKeyFile>
|
||||
</AssemblyOriginatorKeyFile>
|
||||
<AssemblyOriginatorKeyMode>None</AssemblyOriginatorKeyMode>
|
||||
<DefaultClientScript>JScript</DefaultClientScript>
|
||||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
<RootNamespace>BMSService</RootNamespace>
|
||||
<StartupObject>BMSService.BMSService</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<MyType>Console</MyType>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationVersion>2.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DocumentationFile>EDKB10.xml</DocumentationFile>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<Optimize>false</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DocumentationFile>EDKB10.xml</DocumentationFile>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>
|
||||
</DefineConstants>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
<Optimize>true</Optimize>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>false</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
||||
<WarningLevel>1</WarningLevel>
|
||||
<NoWarn>42016,42017,42018,42019,42032</NoWarn>
|
||||
<DebugType>none</DebugType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System">
|
||||
<Name>System</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Configuration.Install">
|
||||
<Name>System.Configuration.Install</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Data">
|
||||
<Name>System.Data</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.ServiceProcess">
|
||||
<Name>System.ServiceProcess</Name>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml">
|
||||
<Name>System.XML</Name>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AssemblyInfo.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="BMSService.vb">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Job.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ProjectInstaller.vb">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Content Include="bms_settings.xml" />
|
||||
<EmbeddedResource Include="BMSService.resx">
|
||||
<DependentUpon>BMSService.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Job.resx">
|
||||
<DependentUpon>Job.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ProjectInstaller.resx">
|
||||
<DependentUpon>ProjectInstaller.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Common\Common.vbproj">
|
||||
<Project>{A1E2756A-4E32-40BB-B449-9BDA1C15DE84}</Project>
|
||||
<Name>Common</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\DataAccess\DataAccess.vbproj">
|
||||
<Project>{21B54F51-D2B2-459E-895C-540AD4A8704F}</Project>
|
||||
<Name>DataAccess</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="My Project\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
70
BMS/BMSService/BMSService.vbproj.user
Normal file
70
BMS/BMSService/BMSService.vbproj.user
Normal file
@@ -0,0 +1,70 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<LastOpenVersion>7.10.3077</LastOpenVersion>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ReferencePath>
|
||||
</ReferencePath>
|
||||
<CopyProjectDestinationFolder>
|
||||
</CopyProjectDestinationFolder>
|
||||
<CopyProjectUncPath>
|
||||
</CopyProjectUncPath>
|
||||
<CopyProjectOption>0</CopyProjectOption>
|
||||
<ProjectView>ProjectFiles</ProjectView>
|
||||
<ProjectTrust>0</ProjectTrust>
|
||||
<PublishUrlHistory>publish\</PublishUrlHistory>
|
||||
<InstallUrlHistory>
|
||||
</InstallUrlHistory>
|
||||
<SupportUrlHistory>
|
||||
</SupportUrlHistory>
|
||||
<UpdateUrlHistory>
|
||||
</UpdateUrlHistory>
|
||||
<BootstrapperUrlHistory>
|
||||
</BootstrapperUrlHistory>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<FallbackCulture>de-DE</FallbackCulture>
|
||||
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<EnableASPDebugging>false</EnableASPDebugging>
|
||||
<EnableASPXDebugging>false</EnableASPXDebugging>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
|
||||
<RemoteDebugEnabled>false</RemoteDebugEnabled>
|
||||
<RemoteDebugMachine>
|
||||
</RemoteDebugMachine>
|
||||
<StartAction>Project</StartAction>
|
||||
<StartArguments>
|
||||
</StartArguments>
|
||||
<StartPage>
|
||||
</StartPage>
|
||||
<StartProgram>
|
||||
</StartProgram>
|
||||
<StartURL>
|
||||
</StartURL>
|
||||
<StartWorkingDirectory>
|
||||
</StartWorkingDirectory>
|
||||
<StartWithIE>false</StartWithIE>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<EnableASPDebugging>false</EnableASPDebugging>
|
||||
<EnableASPXDebugging>false</EnableASPXDebugging>
|
||||
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
|
||||
<EnableSQLServerDebugging>false</EnableSQLServerDebugging>
|
||||
<RemoteDebugEnabled>false</RemoteDebugEnabled>
|
||||
<RemoteDebugMachine>
|
||||
</RemoteDebugMachine>
|
||||
<StartAction>Project</StartAction>
|
||||
<StartArguments>
|
||||
</StartArguments>
|
||||
<StartPage>
|
||||
</StartPage>
|
||||
<StartProgram>
|
||||
</StartProgram>
|
||||
<StartURL>
|
||||
</StartURL>
|
||||
<StartWorkingDirectory>
|
||||
</StartWorkingDirectory>
|
||||
<StartWithIE>false</StartWithIE>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
10
BMS/BMSService/BMSService.vbproj.vspscc
Normal file
10
BMS/BMSService/BMSService.vbproj.vspscc
Normal file
@@ -0,0 +1,10 @@
|
||||
""
|
||||
{
|
||||
"FILE_VERSION" = "9237"
|
||||
"ENLISTMENT_CHOICE" = "NEVER"
|
||||
"PROJECT_FILE_RELATIVE_PATH" = "relative:BMSService"
|
||||
"NUMBER_OF_EXCLUDED_FILES" = "0"
|
||||
"ORIGINAL_PROJECT_FILE_PATH" = ""
|
||||
"NUMBER_OF_NESTED_PROJECTS" = "0"
|
||||
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
|
||||
}
|
||||
42
BMS/BMSService/Job.resx
Normal file
42
BMS/BMSService/Job.resx
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<root>
|
||||
<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="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" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</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>1.0.0.0</value>
|
||||
</resheader>
|
||||
<resheader name="Reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="Writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
179
BMS/BMSService/Job.vb
Normal file
179
BMS/BMSService/Job.vb
Normal file
@@ -0,0 +1,179 @@
|
||||
|
||||
#Region "Includes"
|
||||
|
||||
Imports System.Data.SqlClient
|
||||
Imports Common.Common
|
||||
|
||||
#End Region
|
||||
|
||||
Public Class Job
|
||||
|
||||
#Region "Members"
|
||||
|
||||
Private m_JobId As Integer
|
||||
Private m_Description As String
|
||||
Private m_ProgrammId As Integer
|
||||
Private m_JobType As JobType
|
||||
Private m_JobStartType As JobStartType
|
||||
Private m_Common As Common.Common
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Constructor"
|
||||
|
||||
Public Sub New(ByVal common As Common.Common, ByVal jobId As Integer, ByVal description As String, ByVal programmId As Integer, ByVal jobType As JobType, ByVal jobStartType As JobStartType)
|
||||
m_Common = common
|
||||
|
||||
m_JobId = jobId
|
||||
m_Description = description
|
||||
m_ProgrammId = programmId
|
||||
m_JobType = jobType
|
||||
m_JobStartType = jobStartType
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
|
||||
Public ReadOnly Property JobId() As Integer
|
||||
Get
|
||||
Return m_JobId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Description() As String
|
||||
Get
|
||||
Return m_Description
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ProgrammId() As Integer
|
||||
Get
|
||||
Return m_ProgrammId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property JobType() As JobType
|
||||
Get
|
||||
Return m_JobType
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property JobStartType() As JobStartType
|
||||
Get
|
||||
Return m_JobStartType
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Public Methods"
|
||||
|
||||
'Launches a start or a watch job'
|
||||
Public Sub Launch(ByVal isRunJob As Boolean, ByVal isNachLetzterAusfuerung As Boolean)
|
||||
Try
|
||||
'insert start datetime into db, used to check, if the job really started
|
||||
'batch has to call bmsDll.Start() method...
|
||||
DataAccess.Job.SetJobLastRun(m_Common.DSN, m_JobId, LastRun.Start)
|
||||
|
||||
'log some infos into eventlog
|
||||
m_Common.Log(SERVICE_DISPLAY_NAME, "Starter launched Job " + m_JobId.ToString() + " (" + m_Description + ")")
|
||||
|
||||
'reset calculated bit
|
||||
DataAccess.Job.SetNextStartDateCalculated(m_Common.DSN, m_JobId, True)
|
||||
|
||||
If Not isRunJob And Not isNachLetzterAusfuerung Then
|
||||
'just calculate next start time if its not a runjob (job that has to execute as fast as possible)
|
||||
DataAccess.Job.SetNextExecDateTime(m_Common.DSN, m_JobId)
|
||||
End If
|
||||
|
||||
Select Case m_JobType
|
||||
Case JobType.StartJob
|
||||
Select Case m_JobStartType
|
||||
Case JobStartType.Executable
|
||||
StartExe()
|
||||
Case JobStartType.SqlQuery
|
||||
StartSqlQuery()
|
||||
Case JobStartType.WindowsService
|
||||
StartService()
|
||||
Case Else
|
||||
Throw New Exception("Unbekannter Job Start Typ """ & m_JobStartType.ToString() & """ ist unbekannt")
|
||||
End Select
|
||||
Case Else
|
||||
Throw New Exception("Unbekannter Job Typ """ & m_JobType.ToString() & """")
|
||||
End Select
|
||||
|
||||
Catch ex As Exception
|
||||
Dim exModified As New Exception("Der Job JobId: " + m_JobId.ToString() + " (" + m_Description + ") konnte nicht gestartet werden." + Environment.NewLine + ex.Message, ex)
|
||||
Throw exModified
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "private Methods"
|
||||
|
||||
'Starts an executable. But before, it gets all start parameters from db it needs
|
||||
Private Sub StartExe()
|
||||
Try
|
||||
Dim programmPath As String = ""
|
||||
|
||||
DataAccess.Job.GetStartParameter(m_Common.DSN, m_JobId, StartParameterType.FilePath, programmPath)
|
||||
process.Start(programmPath)
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Starts a service. But before, it gets all start parameters from db it needs
|
||||
Private Sub StartService()
|
||||
Try
|
||||
Dim serviceName As String = "", machineName As String = ""
|
||||
|
||||
DataAccess.Job.GetStartParameter(m_Common.DSN, m_JobId, StartParameterType.ServiceName, serviceName)
|
||||
DataAccess.Job.GetStartParameter(m_Common.DSN, m_JobId, StartParameterType.ServerName, machineName)
|
||||
|
||||
Dim serviceController As New System.ServiceProcess.ServiceController(serviceName, machineName)
|
||||
|
||||
If Not serviceController.Status = ServiceProcess.ServiceControllerStatus.Running Then
|
||||
serviceController.Start()
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Starts a sql query. But before, it gets all start parameters from db it needs
|
||||
Private Sub StartSqlQuery()
|
||||
Dim sqlConn As New SqlConnection
|
||||
Try
|
||||
Dim connectionString As String = "", sqlQuery As String = ""
|
||||
|
||||
DataAccess.Job.GetStartParameter(m_Common.DSN, m_JobId, StartParameterType.ConnectionString, connectionString)
|
||||
DataAccess.Job.GetStartParameter(m_Common.DSN, m_JobId, StartParameterType.SQLQuery, sqlQuery)
|
||||
|
||||
Dim sqlCom As New SqlCommand
|
||||
|
||||
sqlConn.ConnectionString = connectionString
|
||||
sqlConn.Open()
|
||||
|
||||
sqlCom.CommandType = CommandType.Text
|
||||
sqlCom.Connection = sqlConn
|
||||
|
||||
sqlCom.CommandText = sqlQuery
|
||||
sqlCom.ExecuteNonQuery()
|
||||
|
||||
sqlConn.Close()
|
||||
Catch ex As Exception
|
||||
If sqlConn.State = ConnectionState.Open Then
|
||||
sqlConn.Close()
|
||||
End If
|
||||
Throw ex
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
127
BMS/BMSService/ProjectInstaller.resx
Normal file
127
BMS/BMSService/ProjectInstaller.resx
Normal file
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
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">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</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 forserialized 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="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>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ServiceProcessInstaller.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="ServiceProcessInstaller.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="ServiceProcessInstaller.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</data>
|
||||
<data name="ServiceInstaller.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="ServiceInstaller.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="ServiceInstaller.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>188, 17</value>
|
||||
</data>
|
||||
<data name="$this.Name">
|
||||
<value>ProjectInstaller</value>
|
||||
</data>
|
||||
<data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Assembly</value>
|
||||
</data>
|
||||
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
</root>
|
||||
60
BMS/BMSService/ProjectInstaller.vb
Normal file
60
BMS/BMSService/ProjectInstaller.vb
Normal file
@@ -0,0 +1,60 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Configuration.Install
|
||||
|
||||
<RunInstaller(True)> Public Class ProjectInstaller
|
||||
Inherits System.Configuration.Install.Installer
|
||||
|
||||
#Region " Component Designer generated code "
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
|
||||
'Add any initialization after the InitializeComponent() call
|
||||
|
||||
End Sub
|
||||
|
||||
'Installer overrides dispose to clean up the component list.
|
||||
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing Then
|
||||
If Not (components Is Nothing) Then
|
||||
components.Dispose()
|
||||
End If
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Component Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Component Designer
|
||||
'It can be modified using the Component Designer.
|
||||
'Do not modify it using the code editor.
|
||||
Friend WithEvents ServiceProcessInstaller As System.ServiceProcess.ServiceProcessInstaller
|
||||
Friend WithEvents ServiceInstaller As System.ServiceProcess.ServiceInstaller
|
||||
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
|
||||
Me.ServiceProcessInstaller = New System.ServiceProcess.ServiceProcessInstaller
|
||||
Me.ServiceInstaller = New System.ServiceProcess.ServiceInstaller
|
||||
'
|
||||
'ServiceProcessInstaller
|
||||
'
|
||||
Me.ServiceProcessInstaller.Account = System.ServiceProcess.ServiceAccount.LocalSystem
|
||||
Me.ServiceProcessInstaller.Password = Nothing
|
||||
Me.ServiceProcessInstaller.Username = Nothing
|
||||
'
|
||||
'ServiceInstaller
|
||||
'
|
||||
Me.ServiceInstaller.DisplayName = "EDKB10"
|
||||
Me.ServiceInstaller.ServiceName = "BMSService"
|
||||
'
|
||||
'ProjectInstaller
|
||||
'
|
||||
Me.Installers.AddRange(New System.Configuration.Install.Installer() {Me.ServiceProcessInstaller, Me.ServiceInstaller})
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
BIN
BMS/BMSService/bin/Common.dll
Normal file
BIN
BMS/BMSService/bin/Common.dll
Normal file
Binary file not shown.
22
BMS/BMSService/bin/Common.xml
Normal file
22
BMS/BMSService/bin/Common.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>
|
||||
Common
|
||||
</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="M:Common.Settings.GetSettingValue(System.String)">
|
||||
<summary>Gets the first matching value of a property</summary>
|
||||
<param name="propertyName"></param>
|
||||
<returns></returns>
|
||||
</member><member name="M:Common.Settings.SetSettingsValue(System.String,System.String)">
|
||||
<summary>Sets the first matching value of a property</summary>
|
||||
<param name="xpath"></param>
|
||||
<param name="value"></param>
|
||||
</member><member name="M:Common.Settings.GetDecryptedDSN">
|
||||
<summary>Return the descripted dsn string</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
BIN
BMS/BMSService/bin/DataAccess.dll
Normal file
BIN
BMS/BMSService/bin/DataAccess.dll
Normal file
Binary file not shown.
11
BMS/BMSService/bin/DataAccess.xml
Normal file
11
BMS/BMSService/bin/DataAccess.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>
|
||||
DataAccess
|
||||
</name>
|
||||
</assembly>
|
||||
<members>
|
||||
|
||||
</members>
|
||||
</doc>
|
||||
BIN
BMS/BMSService/bin/EDKB10.exe
Normal file
BIN
BMS/BMSService/bin/EDKB10.exe
Normal file
Binary file not shown.
BIN
BMS/BMSService/bin/EDKB10.vshost.exe
Normal file
BIN
BMS/BMSService/bin/EDKB10.vshost.exe
Normal file
Binary file not shown.
11
BMS/BMSService/bin/EDKB10.xml
Normal file
11
BMS/BMSService/bin/EDKB10.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>
|
||||
EDKB10
|
||||
</name>
|
||||
</assembly>
|
||||
<members>
|
||||
|
||||
</members>
|
||||
</doc>
|
||||
21
BMS/BMSService/bin/InstallUtil.InstallLog
Normal file
21
BMS/BMSService/bin/InstallUtil.InstallLog
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
Eine transaktive Installation wird ausgeführt.
|
||||
|
||||
Die Installationsphase wird gestartet.
|
||||
Die Protokolldatei enthält den Fortschritt der Assembly E:\Software-Projekte\EDOKA\Tools\BMS\BMSService\bin\EDKB10.exe.
|
||||
Die Datei befindet sich in E:\Software-Projekte\EDOKA\Tools\BMS\BMSService\bin\EDKB10.InstallLog.
|
||||
|
||||
Die Installationsphase ist abgeschlossen, und die Commitphase beginnt.
|
||||
Die Protokolldatei enthält den Fortschritt der Assembly E:\Software-Projekte\EDOKA\Tools\BMS\BMSService\bin\EDKB10.exe.
|
||||
Die Datei befindet sich in E:\Software-Projekte\EDOKA\Tools\BMS\BMSService\bin\EDKB10.InstallLog.
|
||||
|
||||
Die Commitphase wurde erfolgreich abgeschlossen.
|
||||
|
||||
Die transaktive Installation ist abgeschlossen.
|
||||
|
||||
|
||||
Die Deinstallation wurde gestartet.
|
||||
Die Protokolldatei enthält den Fortschritt der Assembly E:\Software-Projekte\EDOKA\Tools\BMS\BMSService\bin\EDKB10.exe.
|
||||
Die Datei befindet sich in E:\Software-Projekte\EDOKA\Tools\BMS\BMSService\bin\EDKB10.InstallLog.
|
||||
|
||||
Die Deinstallation ist abgeschlossen.
|
||||
BIN
BMS/BMSService/bin/ZpCryptography.dll
Normal file
BIN
BMS/BMSService/bin/ZpCryptography.dll
Normal file
Binary file not shown.
11
BMS/BMSService/bin/ZpCryptography.xml
Normal file
11
BMS/BMSService/bin/ZpCryptography.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>
|
||||
ZpCryptography
|
||||
</name>
|
||||
</assembly>
|
||||
<members>
|
||||
|
||||
</members>
|
||||
</doc>
|
||||
1
BMS/BMSService/bin/bms_conn.cfg
Normal file
1
BMS/BMSService/bin/bms_conn.cfg
Normal file
@@ -0,0 +1 @@
|
||||
¹µÈ¦rȽ¹¿¸ª‰¿Çx…½³»É·¥¹u¨À¦¾·¼‘–’¥¾©¿È®¿Àeŏɯ®ÆÎn»»´‰’¦¾»ºË´ÄÀÁ¸®É®»ºe»¬’ĦµÀ³¸mȮƱ‚†xŽŠºÅºÀd¶¹‚¿€Â©ÈÇ˴Ĺ‹Á
|
||||
46
BMS/BMSService/bin/bms_settings.xml
Normal file
46
BMS/BMSService/bin/bms_settings.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<root>
|
||||
<config>
|
||||
<!-- The maximum duration a start job can take before a starter error occures -->
|
||||
<MaximumStartDuration>1</MaximumStartDuration>
|
||||
|
||||
<!-- Check interval in minutes for starter -->
|
||||
<StartJobInterval>2</StartJobInterval>
|
||||
|
||||
<!-- Check interval in minutes for watcher -->
|
||||
<WatchJobInterval>2</WatchJobInterval>
|
||||
|
||||
<!-- The number of Starter-Errors notifications should be activated until the job runs successful next time -->
|
||||
<MaxStarterNotifications>2</MaxStarterNotifications>
|
||||
|
||||
<!-- The number of Watch-Errors notifications should be activated until the job runs successful next time -->
|
||||
<MaxWatcherNotifications>3</MaxWatcherNotifications>
|
||||
|
||||
<!-- Name of the system event log where service should write his entries -->
|
||||
<EventLogName>BMS</EventLogName>
|
||||
|
||||
<!-- The target where messages should be written to.
|
||||
Valid log targets are:
|
||||
- 1: System EventLog
|
||||
- 2: Database EventLog table
|
||||
-->
|
||||
<LogTarget>1</LogTarget>
|
||||
|
||||
<!-- Mail Server to send eMails from BMS -->
|
||||
<MailServer>tkbdev01</MailServer>
|
||||
|
||||
<!-- Mail sender name -->
|
||||
<MailFrom>info@shub.ch</MailFrom>
|
||||
|
||||
<!-- Mail Server authentication method.
|
||||
Valid methods are:
|
||||
- 0: Anonymous
|
||||
- 1: Basic Authentication (clear text authentication!)
|
||||
-->
|
||||
<MailServerAuth>
|
||||
<Method>0</Method>
|
||||
<UserName>mailUser</UserName>
|
||||
<Password>mailPassword</Password>
|
||||
</MailServerAuth>
|
||||
</config>
|
||||
</root>
|
||||
46
BMS/BMSService/bin/bms_settings.xml.bak
Normal file
46
BMS/BMSService/bin/bms_settings.xml.bak
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<root>
|
||||
<config>
|
||||
<!-- The maximum duration a start job can take before a starter error occures -->
|
||||
<MaximumStartDuration>1</MaximumStartDuration>
|
||||
|
||||
<!-- Check interval in minutes for starter -->
|
||||
<StartJobInterval>2</StartJobInterval>
|
||||
|
||||
<!-- Check interval in minutes for watcher -->
|
||||
<WatchJobInterval>2</WatchJobInterval>
|
||||
|
||||
<!-- The number of Starter-Errors notifications should be activated until the job runs successful next time -->
|
||||
<MaxStarterNotifications>2</MaxStarterNotifications>
|
||||
|
||||
<!-- The number of Watch-Errors notifications should be activated until the job runs successful next time -->
|
||||
<MaxWatcherNotifications>3</MaxWatcherNotifications>
|
||||
|
||||
<!-- Name of the system event log where service should write his entries -->
|
||||
<EventLogName>BMS</EventLogName>
|
||||
|
||||
<!-- The target where messages should be written to.
|
||||
Valid log targets are:
|
||||
- 1: System EventLog
|
||||
- 2: Database EventLog table
|
||||
-->
|
||||
<LogTarget>1</LogTarget>
|
||||
|
||||
<!-- Mail Server to send eMails from BMS -->
|
||||
<MailServer>tkbdev01</MailServer>
|
||||
|
||||
<!-- Mail sender name -->
|
||||
<MailFrom>bms@tkb.ch</MailFrom>
|
||||
|
||||
<!-- Mail Server authentication method.
|
||||
Valid methods are:
|
||||
- 0: Anonymous
|
||||
- 1: Basic Authentication (clear text authentication!)
|
||||
-->
|
||||
<MailServerAuth>
|
||||
<Method>0</Method>
|
||||
<UserName>mailUser</UserName>
|
||||
<Password>mailPassword</Password>
|
||||
</MailServerAuth>
|
||||
</config>
|
||||
</root>
|
||||
35
BMS/BMSService/bin/edkb10.InstallLog
Normal file
35
BMS/BMSService/bin/edkb10.InstallLog
Normal file
@@ -0,0 +1,35 @@
|
||||
Assembly c:\data\edoka_fw3\bms\bmsservice\bin\edkb10.exe wird installiert.
|
||||
Betroffene Parameter:
|
||||
logtoconsole =
|
||||
assemblypath = c:\data\edoka_fw3\bms\bmsservice\bin\edkb10.exe
|
||||
logfile = c:\data\edoka_fw3\bms\bmsservice\bin\edkb10.InstallLog
|
||||
Dienst BMSService wird installiert...
|
||||
Dienst BMSService wurde installiert.
|
||||
Die EventLog-Quelle BMSService im Protokoll Application wird erstellt...
|
||||
Assembly c:\data\edoka_fw3\bms\bmsservice\bin\edkb10.exe wird ausgeführt.
|
||||
Betroffene Parameter:
|
||||
logtoconsole =
|
||||
assemblypath = c:\data\edoka_fw3\bms\bmsservice\bin\edkb10.exe
|
||||
logfile = c:\data\edoka_fw3\bms\bmsservice\bin\edkb10.InstallLog
|
||||
Assembly E:\Software-Projekte\EDOKA\Tools\BMS\BMSService\bin\EDKB10.exe wird installiert.
|
||||
Betroffene Parameter:
|
||||
logtoconsole =
|
||||
assemblypath = E:\Software-Projekte\EDOKA\Tools\BMS\BMSService\bin\EDKB10.exe
|
||||
logfile = E:\Software-Projekte\EDOKA\Tools\BMS\BMSService\bin\EDKB10.InstallLog
|
||||
Dienst BMSService wird installiert...
|
||||
Dienst BMSService wurde installiert.
|
||||
Die EventLog-Quelle BMSService im Protokoll Application wird erstellt...
|
||||
Assembly E:\Software-Projekte\EDOKA\Tools\BMS\BMSService\bin\EDKB10.exe wird ausgeführt.
|
||||
Betroffene Parameter:
|
||||
logtoconsole =
|
||||
assemblypath = E:\Software-Projekte\EDOKA\Tools\BMS\BMSService\bin\EDKB10.exe
|
||||
logfile = E:\Software-Projekte\EDOKA\Tools\BMS\BMSService\bin\EDKB10.InstallLog
|
||||
Assembly E:\Software-Projekte\EDOKA\Tools\BMS\BMSService\bin\EDKB10.exe wird deinstalliert.
|
||||
Betroffene Parameter:
|
||||
logtoconsole =
|
||||
assemblypath = E:\Software-Projekte\EDOKA\Tools\BMS\BMSService\bin\EDKB10.exe
|
||||
logfile = E:\Software-Projekte\EDOKA\Tools\BMS\BMSService\bin\EDKB10.InstallLog
|
||||
Die EventLog-Quelle BMSService wird entfernt.
|
||||
Der Dienst BMSService wird vom System entfernt...
|
||||
Dienst BMSService wurde vom System entfernt.
|
||||
Es wird versucht, den Dienst BMSService zu beenden.
|
||||
2
BMS/BMSService/bin/install.bat
Normal file
2
BMS/BMSService/bin/install.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe "E:\Software-Projekte\EDOKA\Tools\BMS\BMSService\bin\EDKB10.exe"
|
||||
pause
|
||||
2
BMS/BMSService/bin/install_u.bat
Normal file
2
BMS/BMSService/bin/install_u.bat
Normal file
@@ -0,0 +1,2 @@
|
||||
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe "E:\Software-Projekte\EDOKA\Tools\BMS\BMSService\bin\EDKB10.exe" /u
|
||||
pause
|
||||
2
BMS/BMSService/bin/install_u.bat.bak
Normal file
2
BMS/BMSService/bin/install_u.bat.bak
Normal file
@@ -0,0 +1,2 @@
|
||||
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe "E:\Software-Projekte\EDOKA\Tools\BMS\BMSService\bin\EDKB10.exe"
|
||||
pause
|
||||
46
BMS/BMSService/bms_settings.xml
Normal file
46
BMS/BMSService/bms_settings.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<root>
|
||||
<config>
|
||||
<!-- The maximum duration a start job can take before a starter error occures -->
|
||||
<MaximumStartDuration>1</MaximumStartDuration>
|
||||
|
||||
<!-- Check interval in minutes for starter -->
|
||||
<StartJobInterval>2</StartJobInterval>
|
||||
|
||||
<!-- Check interval in minutes for watcher -->
|
||||
<WatchJobInterval>2</WatchJobInterval>
|
||||
|
||||
<!-- The number of Starter-Errors notifications should be activated until the job runs successful next time -->
|
||||
<MaxStarterNotifications>2</MaxStarterNotifications>
|
||||
|
||||
<!-- The number of Watch-Errors notifications should be activated until the job runs successful next time -->
|
||||
<MaxWatcherNotifications>3</MaxWatcherNotifications>
|
||||
|
||||
<!-- Name of the system event log where service should write his entries -->
|
||||
<EventLogName>BMS</EventLogName>
|
||||
|
||||
<!-- The target where messages should be written to.
|
||||
Valid log targets are:
|
||||
- 1: System EventLog
|
||||
- 2: Database EventLog table
|
||||
-->
|
||||
<LogTarget>1</LogTarget>
|
||||
|
||||
<!-- Mail Server to send eMails from BMS -->
|
||||
<MailServer>tkbdev01</MailServer>
|
||||
|
||||
<!-- Mail sender name -->
|
||||
<MailFrom>bms@tkb.ch</MailFrom>
|
||||
|
||||
<!-- Mail Server authentication method.
|
||||
Valid methods are:
|
||||
- 0: Anonymous
|
||||
- 1: Basic Authentication (clear text authentication!)
|
||||
-->
|
||||
<MailServerAuth>
|
||||
<Method>0</Method>
|
||||
<UserName>mailUser</UserName>
|
||||
<Password>mailPassword</Password>
|
||||
</MailServerAuth>
|
||||
</config>
|
||||
</root>
|
||||
5
BMS/BMSService/mssccprj.scc
Normal file
5
BMS/BMSService/mssccprj.scc
Normal file
@@ -0,0 +1,5 @@
|
||||
SCC = This is a Source Code Control file
|
||||
|
||||
[BMSService.vbproj]
|
||||
SCC_Aux_Path = "\\SERVER01\DATEN\SourceSave\EDOKA4.0"
|
||||
SCC_Project_Name = "$/BMS/BMSService", ZSCAAAAA
|
||||
15
BMS/BMSService/obj/BMSService.vbproj.FileList.txt
Normal file
15
BMS/BMSService/obj/BMSService.vbproj.FileList.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
bin\EDKB10.exe
|
||||
bin\EDKB10.xml
|
||||
bin\Common.dll
|
||||
bin\DataAccess.dll
|
||||
bin\ZpCryptography.dll
|
||||
bin\Common.xml
|
||||
bin\DataAccess.xml
|
||||
bin\ZpCryptography.xml
|
||||
obj\Release\ResolveAssemblyReference.cache
|
||||
obj\Release\BMSService.BMSService.resources
|
||||
obj\Release\BMSService.Job.resources
|
||||
obj\Release\BMSService.ProjectInstaller.resources
|
||||
obj\Release\BMSService.vbproj.GenerateResource.Cache
|
||||
obj\Release\EDKB10.exe
|
||||
obj\Release\EDKB10.xml
|
||||
@@ -0,0 +1,2 @@
|
||||
E:\Software-Projekte\EDOKA\Tools\BMS\BMSService\obj\Release\EDKB10.exe
|
||||
E:\Software-Projekte\EDOKA\Tools\BMS\BMSService\obj\Release\EDKB10.xml
|
||||
BIN
BMS/BMSService/obj/Release/BMSService.BMSService.resources
Normal file
BIN
BMS/BMSService/obj/Release/BMSService.BMSService.resources
Normal file
Binary file not shown.
BIN
BMS/BMSService/obj/Release/BMSService.Job.resources
Normal file
BIN
BMS/BMSService/obj/Release/BMSService.Job.resources
Normal file
Binary file not shown.
BIN
BMS/BMSService/obj/Release/BMSService.ProjectInstaller.resources
Normal file
BIN
BMS/BMSService/obj/Release/BMSService.ProjectInstaller.resources
Normal file
Binary file not shown.
Binary file not shown.
BIN
BMS/BMSService/obj/Release/EDKB10.exe
Normal file
BIN
BMS/BMSService/obj/Release/EDKB10.exe
Normal file
Binary file not shown.
11
BMS/BMSService/obj/Release/EDKB10.xml
Normal file
11
BMS/BMSService/obj/Release/EDKB10.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<doc>
|
||||
<assembly>
|
||||
<name>
|
||||
EDKB10
|
||||
</name>
|
||||
</assembly>
|
||||
<members>
|
||||
|
||||
</members>
|
||||
</doc>
|
||||
BIN
BMS/BMSService/obj/Release/ResolveAssemblyReference.cache
Normal file
BIN
BMS/BMSService/obj/Release/ResolveAssemblyReference.cache
Normal file
Binary file not shown.
BIN
BMS/BMSService/vssver.scc
Normal file
BIN
BMS/BMSService/vssver.scc
Normal file
Binary file not shown.
Reference in New Issue
Block a user