MS_13022016

This commit is contained in:
SchreiberM
2016-02-15 13:03:32 +01:00
parent 85d4120c50
commit 8016ae977e
10 changed files with 1479 additions and 1073 deletions

View File

@@ -49,7 +49,8 @@
Public Shared Function GetControlGuid(name As String) Public Shared Function GetControlGuid(name As String)
Try Try
Return ClassDatabase.Execute_Scalar("SELECT GUID FROM TBPMO_CONTROL WHERE NAME = '" & name & "'") Dim sql = "SELECT GUID FROM TBPMO_CONTROL WHERE NAME = '" & name & "'"
Return ClassDatabase.Execute_Scalar(sql)
Catch ex As Exception Catch ex As Exception
Return -1 Return -1
End Try End Try

View File

@@ -1,4 +1,5 @@
Imports Oracle.ManagedDataAccess.Client Imports Oracle.ManagedDataAccess.Client
Imports System.Data.Odbc
Public Class ClassDatabase Public Class ClassDatabase
Private Shared connectionString As String Private Shared connectionString As String
@@ -24,7 +25,12 @@ Public Class ClassDatabase
If DTConnection.Rows.Count = 1 Then If DTConnection.Rows.Count = 1 Then
Select Case DTConnection.Rows(0).Item("SQL_PROVIDER") Select Case DTConnection.Rows(0).Item("SQL_PROVIDER")
Case "MS-SQLServer" Case "MS-SQLServer"
connectionString = "Server=" & DTConnection.Rows(0).Item("SERVER") & ";Database=" & DTConnection.Rows(0).Item("DATENBANK") & ";User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";" If DTConnection.Rows(0).Item("USERNAME") = "WINAUTH" Then
connectionString = "Server=" & DTConnection.Rows(0).Item("SERVER") & ";Database=" & DTConnection.Rows(0).Item("DATENBANK") & ";Trusted_Connection=True;"
Else
connectionString = "Server=" & DTConnection.Rows(0).Item("SERVER") & ";Database=" & DTConnection.Rows(0).Item("DATENBANK") & ";User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";"
End If
' connectionString = "Server=" & DTConnection.Rows(0).Item("SERVER") & ";Database=" & DTConnection.Rows(0).Item("DATENBANK") & ";User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";"
Case "Oracle" Case "Oracle"
If DTConnection.Rows(0).Item("BEMERKUNG").ToString.Contains("without tnsnames") Then If DTConnection.Rows(0).Item("BEMERKUNG").ToString.Contains("without tnsnames") Then
connectionString = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" & DTConnection.Rows(0).Item("SERVER") & ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" & _ connectionString = "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" & DTConnection.Rows(0).Item("SERVER") & ")(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=" & _
@@ -32,6 +38,9 @@ Public Class ClassDatabase
Else Else
connectionString = "Data Source=" & DTConnection.Rows(0).Item("SERVER") & ";Persist Security Info=True;User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";Unicode=True" connectionString = "Data Source=" & DTConnection.Rows(0).Item("SERVER") & ";Persist Security Info=True;User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";Unicode=True"
End If End If
Case "ODBC"
Dim conn As New OdbcConnection("dsn=" & DTConnection.Rows(0).Item("SERVER") & ";uid=" & DTConnection.Rows(0).Item("USERNAME") & ";pwd=" + DTConnection.Rows(0).Item("PASSWORD"))
connectionString = conn.ConnectionString
Case Else Case Else
ClassLogger.Add(" - ConnectionType nicht integriert", False) ClassLogger.Add(" - ConnectionType nicht integriert", False)
MsgBox("ConnectionType nicht integriert", MsgBoxStyle.Critical, "Bitte Konfiguration Connection überprüfen!") MsgBox("ConnectionType nicht integriert", MsgBoxStyle.Critical, "Bitte Konfiguration Connection überprüfen!")

View File

@@ -23,7 +23,7 @@ Partial Class frmConfig_Basic
<System.Diagnostics.DebuggerStepThrough()> _ <System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent() Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmConfig_Basic)) Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmConfig_Basic))
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Me.TabControl1 = New System.Windows.Forms.TabControl() Me.TabControl1 = New System.Windows.Forms.TabControl()
Me.TabPage1 = New System.Windows.Forms.TabPage() Me.TabPage1 = New System.Windows.Forms.TabPage()
Me.chkbxUserAut = New System.Windows.Forms.CheckBox() Me.chkbxUserAut = New System.Windows.Forms.CheckBox()
@@ -37,6 +37,7 @@ Partial Class frmConfig_Basic
Me.txtServer = New System.Windows.Forms.TextBox() Me.txtServer = New System.Windows.Forms.TextBox()
Me.txtUser = New System.Windows.Forms.TextBox() Me.txtUser = New System.Windows.Forms.TextBox()
Me.txtPasswort = New System.Windows.Forms.TextBox() Me.txtPasswort = New System.Windows.Forms.TextBox()
Me.BtnConnect = New System.Windows.Forms.Button()
Me.TabPage2 = New System.Windows.Forms.TabPage() Me.TabPage2 = New System.Windows.Forms.TabPage()
Me.GroupBox4 = New System.Windows.Forms.GroupBox() Me.GroupBox4 = New System.Windows.Forms.GroupBox()
Me.Button3 = New System.Windows.Forms.Button() Me.Button3 = New System.Windows.Forms.Button()
@@ -53,6 +54,8 @@ Partial Class frmConfig_Basic
Me.GroupBox1 = New System.Windows.Forms.GroupBox() Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.chkboxQuickMenue = New System.Windows.Forms.CheckBox() Me.chkboxQuickMenue = New System.Windows.Forms.CheckBox()
Me.chkLogErrorsOnly = New System.Windows.Forms.CheckBox() Me.chkLogErrorsOnly = New System.Windows.Forms.CheckBox()
Me.Button1 = New System.Windows.Forms.Button()
Me.btnApplicationFolder = New System.Windows.Forms.Button()
Me.LinkLabel1 = New System.Windows.Forms.LinkLabel() Me.LinkLabel1 = New System.Windows.Forms.LinkLabel()
Me.TabPage3 = New System.Windows.Forms.TabPage() Me.TabPage3 = New System.Windows.Forms.TabPage()
Me.Label9 = New System.Windows.Forms.Label() Me.Label9 = New System.Windows.Forms.Label()
@@ -61,9 +64,6 @@ Partial Class frmConfig_Basic
Me.Button2 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button()
Me.txtScanFolderWatch = New System.Windows.Forms.TextBox() Me.txtScanFolderWatch = New System.Windows.Forms.TextBox()
Me.Label8 = New System.Windows.Forms.Label() Me.Label8 = New System.Windows.Forms.Label()
Me.BtnConnect = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button()
Me.btnApplicationFolder = New System.Windows.Forms.Button()
Me.btnstartstop2 = New System.Windows.Forms.Button() Me.btnstartstop2 = New System.Windows.Forms.Button()
Me.TabControl1.SuspendLayout() Me.TabControl1.SuspendLayout()
Me.TabPage1.SuspendLayout() Me.TabPage1.SuspendLayout()
@@ -78,16 +78,15 @@ Partial Class frmConfig_Basic
' '
'TabControl1 'TabControl1
' '
resources.ApplyResources(Me.TabControl1, "TabControl1")
Me.TabControl1.Controls.Add(Me.TabPage1) Me.TabControl1.Controls.Add(Me.TabPage1)
Me.TabControl1.Controls.Add(Me.TabPage2) Me.TabControl1.Controls.Add(Me.TabPage2)
Me.TabControl1.Controls.Add(Me.TabPage3) Me.TabControl1.Controls.Add(Me.TabPage3)
resources.ApplyResources(Me.TabControl1, "TabControl1")
Me.TabControl1.Name = "TabControl1" Me.TabControl1.Name = "TabControl1"
Me.TabControl1.SelectedIndex = 0 Me.TabControl1.SelectedIndex = 0
' '
'TabPage1 'TabPage1
' '
resources.ApplyResources(Me.TabPage1, "TabPage1")
Me.TabPage1.Controls.Add(Me.chkbxUserAut) Me.TabPage1.Controls.Add(Me.chkbxUserAut)
Me.TabPage1.Controls.Add(Me.Label5) Me.TabPage1.Controls.Add(Me.Label5)
Me.TabPage1.Controls.Add(Me.cmbDatenbank) Me.TabPage1.Controls.Add(Me.cmbDatenbank)
@@ -100,6 +99,7 @@ Partial Class frmConfig_Basic
Me.TabPage1.Controls.Add(Me.txtUser) Me.TabPage1.Controls.Add(Me.txtUser)
Me.TabPage1.Controls.Add(Me.txtPasswort) Me.TabPage1.Controls.Add(Me.txtPasswort)
Me.TabPage1.Controls.Add(Me.BtnConnect) Me.TabPage1.Controls.Add(Me.BtnConnect)
resources.ApplyResources(Me.TabPage1, "TabPage1")
Me.TabPage1.Name = "TabPage1" Me.TabPage1.Name = "TabPage1"
Me.TabPage1.UseVisualStyleBackColor = True Me.TabPage1.UseVisualStyleBackColor = True
' '
@@ -116,8 +116,8 @@ Partial Class frmConfig_Basic
' '
'cmbDatenbank 'cmbDatenbank
' '
resources.ApplyResources(Me.cmbDatenbank, "cmbDatenbank")
Me.cmbDatenbank.FormattingEnabled = True Me.cmbDatenbank.FormattingEnabled = True
resources.ApplyResources(Me.cmbDatenbank, "cmbDatenbank")
Me.cmbDatenbank.Name = "cmbDatenbank" Me.cmbDatenbank.Name = "cmbDatenbank"
' '
'Label4 'Label4
@@ -149,26 +149,32 @@ Partial Class frmConfig_Basic
' '
'txtServer 'txtServer
' '
resources.ApplyResources(Me.txtServer, "txtServer")
Me.txtServer.ForeColor = System.Drawing.SystemColors.WindowText Me.txtServer.ForeColor = System.Drawing.SystemColors.WindowText
resources.ApplyResources(Me.txtServer, "txtServer")
Me.txtServer.Name = "txtServer" Me.txtServer.Name = "txtServer"
' '
'txtUser 'txtUser
' '
resources.ApplyResources(Me.txtUser, "txtUser")
Me.txtUser.ForeColor = System.Drawing.SystemColors.WindowText Me.txtUser.ForeColor = System.Drawing.SystemColors.WindowText
resources.ApplyResources(Me.txtUser, "txtUser")
Me.txtUser.Name = "txtUser" Me.txtUser.Name = "txtUser"
' '
'txtPasswort 'txtPasswort
' '
resources.ApplyResources(Me.txtPasswort, "txtPasswort")
Me.txtPasswort.ForeColor = System.Drawing.SystemColors.WindowText Me.txtPasswort.ForeColor = System.Drawing.SystemColors.WindowText
resources.ApplyResources(Me.txtPasswort, "txtPasswort")
Me.txtPasswort.Name = "txtPasswort" Me.txtPasswort.Name = "txtPasswort"
Me.txtPasswort.UseSystemPasswordChar = True Me.txtPasswort.UseSystemPasswordChar = True
' '
'BtnConnect
'
Me.BtnConnect.Image = Global.DD_Record_Organiser.My.Resources.Resources.database_go1
resources.ApplyResources(Me.BtnConnect, "BtnConnect")
Me.BtnConnect.Name = "BtnConnect"
Me.BtnConnect.UseVisualStyleBackColor = True
'
'TabPage2 'TabPage2
' '
resources.ApplyResources(Me.TabPage2, "TabPage2")
Me.TabPage2.Controls.Add(Me.GroupBox4) Me.TabPage2.Controls.Add(Me.GroupBox4)
Me.TabPage2.Controls.Add(Me.GroupBox3) Me.TabPage2.Controls.Add(Me.GroupBox3)
Me.TabPage2.Controls.Add(Me.GroupBox2) Me.TabPage2.Controls.Add(Me.GroupBox2)
@@ -177,14 +183,15 @@ Partial Class frmConfig_Basic
Me.TabPage2.Controls.Add(Me.Button1) Me.TabPage2.Controls.Add(Me.Button1)
Me.TabPage2.Controls.Add(Me.btnApplicationFolder) Me.TabPage2.Controls.Add(Me.btnApplicationFolder)
Me.TabPage2.Controls.Add(Me.LinkLabel1) Me.TabPage2.Controls.Add(Me.LinkLabel1)
resources.ApplyResources(Me.TabPage2, "TabPage2")
Me.TabPage2.Name = "TabPage2" Me.TabPage2.Name = "TabPage2"
Me.TabPage2.UseVisualStyleBackColor = True Me.TabPage2.UseVisualStyleBackColor = True
' '
'GroupBox4 'GroupBox4
' '
resources.ApplyResources(Me.GroupBox4, "GroupBox4")
Me.GroupBox4.Controls.Add(Me.Button3) Me.GroupBox4.Controls.Add(Me.Button3)
Me.GroupBox4.Controls.Add(Me.cmbLanguage) Me.GroupBox4.Controls.Add(Me.cmbLanguage)
resources.ApplyResources(Me.GroupBox4, "GroupBox4")
Me.GroupBox4.Name = "GroupBox4" Me.GroupBox4.Name = "GroupBox4"
Me.GroupBox4.TabStop = False Me.GroupBox4.TabStop = False
' '
@@ -196,17 +203,17 @@ Partial Class frmConfig_Basic
' '
'cmbLanguage 'cmbLanguage
' '
resources.ApplyResources(Me.cmbLanguage, "cmbLanguage")
Me.cmbLanguage.FormattingEnabled = True Me.cmbLanguage.FormattingEnabled = True
Me.cmbLanguage.Items.AddRange(New Object() {resources.GetString("cmbLanguage.Items"), resources.GetString("cmbLanguage.Items1")}) Me.cmbLanguage.Items.AddRange(New Object() {resources.GetString("cmbLanguage.Items"), resources.GetString("cmbLanguage.Items1")})
resources.ApplyResources(Me.cmbLanguage, "cmbLanguage")
Me.cmbLanguage.Name = "cmbLanguage" Me.cmbLanguage.Name = "cmbLanguage"
' '
'GroupBox3 'GroupBox3
' '
resources.ApplyResources(Me.GroupBox3, "GroupBox3")
Me.GroupBox3.Controls.Add(Me.Label7) Me.GroupBox3.Controls.Add(Me.Label7)
Me.GroupBox3.Controls.Add(Me.cmbConstructor) Me.GroupBox3.Controls.Add(Me.cmbConstructor)
Me.GroupBox3.Controls.Add(Me.CheckBox1) Me.GroupBox3.Controls.Add(Me.CheckBox1)
resources.ApplyResources(Me.GroupBox3, "GroupBox3")
Me.GroupBox3.Name = "GroupBox3" Me.GroupBox3.Name = "GroupBox3"
Me.GroupBox3.TabStop = False Me.GroupBox3.TabStop = False
' '
@@ -217,8 +224,8 @@ Partial Class frmConfig_Basic
' '
'cmbConstructor 'cmbConstructor
' '
resources.ApplyResources(Me.cmbConstructor, "cmbConstructor")
Me.cmbConstructor.FormattingEnabled = True Me.cmbConstructor.FormattingEnabled = True
resources.ApplyResources(Me.cmbConstructor, "cmbConstructor")
Me.cmbConstructor.Name = "cmbConstructor" Me.cmbConstructor.Name = "cmbConstructor"
' '
'CheckBox1 'CheckBox1
@@ -232,11 +239,11 @@ Partial Class frmConfig_Basic
' '
'GroupBox2 'GroupBox2
' '
resources.ApplyResources(Me.GroupBox2, "GroupBox2")
Me.GroupBox2.Controls.Add(Me.CheckBoxWD_ShowEnitityDocs) Me.GroupBox2.Controls.Add(Me.CheckBoxWD_ShowEnitityDocs)
Me.GroupBox2.Controls.Add(Me.chkbxloadWDDocs) Me.GroupBox2.Controls.Add(Me.chkbxloadWDDocs)
Me.GroupBox2.Controls.Add(Me.Label6) Me.GroupBox2.Controls.Add(Me.Label6)
Me.GroupBox2.Controls.Add(Me.txtwdSearch_Count) Me.GroupBox2.Controls.Add(Me.txtwdSearch_Count)
resources.ApplyResources(Me.GroupBox2, "GroupBox2")
Me.GroupBox2.Name = "GroupBox2" Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.TabStop = False Me.GroupBox2.TabStop = False
' '
@@ -264,8 +271,8 @@ Partial Class frmConfig_Basic
' '
'GroupBox1 'GroupBox1
' '
resources.ApplyResources(Me.GroupBox1, "GroupBox1")
Me.GroupBox1.Controls.Add(Me.chkboxQuickMenue) Me.GroupBox1.Controls.Add(Me.chkboxQuickMenue)
resources.ApplyResources(Me.GroupBox1, "GroupBox1")
Me.GroupBox1.Name = "GroupBox1" Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.TabStop = False Me.GroupBox1.TabStop = False
' '
@@ -281,6 +288,20 @@ Partial Class frmConfig_Basic
Me.chkLogErrorsOnly.Name = "chkLogErrorsOnly" Me.chkLogErrorsOnly.Name = "chkLogErrorsOnly"
Me.chkLogErrorsOnly.UseVisualStyleBackColor = True Me.chkLogErrorsOnly.UseVisualStyleBackColor = True
' '
'Button1
'
Me.Button1.Image = Global.DD_Record_Organiser.My.Resources.Resources.folder_go
resources.ApplyResources(Me.Button1, "Button1")
Me.Button1.Name = "Button1"
Me.Button1.UseVisualStyleBackColor = True
'
'btnApplicationFolder
'
Me.btnApplicationFolder.Image = Global.DD_Record_Organiser.My.Resources.Resources.folder_go
resources.ApplyResources(Me.btnApplicationFolder, "btnApplicationFolder")
Me.btnApplicationFolder.Name = "btnApplicationFolder"
Me.btnApplicationFolder.UseVisualStyleBackColor = True
'
'LinkLabel1 'LinkLabel1
' '
resources.ApplyResources(Me.LinkLabel1, "LinkLabel1") resources.ApplyResources(Me.LinkLabel1, "LinkLabel1")
@@ -289,7 +310,6 @@ Partial Class frmConfig_Basic
' '
'TabPage3 'TabPage3
' '
resources.ApplyResources(Me.TabPage3, "TabPage3")
Me.TabPage3.Controls.Add(Me.Label9) Me.TabPage3.Controls.Add(Me.Label9)
Me.TabPage3.Controls.Add(Me.DataGridView1) Me.TabPage3.Controls.Add(Me.DataGridView1)
Me.TabPage3.Controls.Add(Me.btnSaveExclusionFiles) Me.TabPage3.Controls.Add(Me.btnSaveExclusionFiles)
@@ -297,6 +317,7 @@ Partial Class frmConfig_Basic
Me.TabPage3.Controls.Add(Me.txtScanFolderWatch) Me.TabPage3.Controls.Add(Me.txtScanFolderWatch)
Me.TabPage3.Controls.Add(Me.Label8) Me.TabPage3.Controls.Add(Me.Label8)
Me.TabPage3.Controls.Add(Me.btnstartstop2) Me.TabPage3.Controls.Add(Me.btnstartstop2)
resources.ApplyResources(Me.TabPage3, "TabPage3")
Me.TabPage3.Name = "TabPage3" Me.TabPage3.Name = "TabPage3"
Me.TabPage3.UseVisualStyleBackColor = True Me.TabPage3.UseVisualStyleBackColor = True
' '
@@ -307,9 +328,9 @@ Partial Class frmConfig_Basic
' '
'DataGridView1 'DataGridView1
' '
DataGridViewCellStyle3.BackColor = System.Drawing.Color.Aqua
Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
resources.ApplyResources(Me.DataGridView1, "DataGridView1") resources.ApplyResources(Me.DataGridView1, "DataGridView1")
DataGridViewCellStyle2.BackColor = System.Drawing.Color.Aqua
Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.DataGridView1.Name = "DataGridView1" Me.DataGridView1.Name = "DataGridView1"
' '
@@ -327,8 +348,8 @@ Partial Class frmConfig_Basic
' '
'txtScanFolderWatch 'txtScanFolderWatch
' '
resources.ApplyResources(Me.txtScanFolderWatch, "txtScanFolderWatch")
Me.txtScanFolderWatch.BackColor = System.Drawing.Color.LemonChiffon Me.txtScanFolderWatch.BackColor = System.Drawing.Color.LemonChiffon
resources.ApplyResources(Me.txtScanFolderWatch, "txtScanFolderWatch")
Me.txtScanFolderWatch.Name = "txtScanFolderWatch" Me.txtScanFolderWatch.Name = "txtScanFolderWatch"
' '
'Label8 'Label8
@@ -336,31 +357,10 @@ Partial Class frmConfig_Basic
resources.ApplyResources(Me.Label8, "Label8") resources.ApplyResources(Me.Label8, "Label8")
Me.Label8.Name = "Label8" Me.Label8.Name = "Label8"
' '
'BtnConnect
'
resources.ApplyResources(Me.BtnConnect, "BtnConnect")
Me.BtnConnect.Image = Global.DD_Record_Organiser.My.Resources.Resources.database_go1
Me.BtnConnect.Name = "BtnConnect"
Me.BtnConnect.UseVisualStyleBackColor = True
'
'Button1
'
resources.ApplyResources(Me.Button1, "Button1")
Me.Button1.Image = Global.DD_Record_Organiser.My.Resources.Resources.folder_go
Me.Button1.Name = "Button1"
Me.Button1.UseVisualStyleBackColor = True
'
'btnApplicationFolder
'
resources.ApplyResources(Me.btnApplicationFolder, "btnApplicationFolder")
Me.btnApplicationFolder.Image = Global.DD_Record_Organiser.My.Resources.Resources.folder_go
Me.btnApplicationFolder.Name = "btnApplicationFolder"
Me.btnApplicationFolder.UseVisualStyleBackColor = True
'
'btnstartstop2 'btnstartstop2
' '
resources.ApplyResources(Me.btnstartstop2, "btnstartstop2")
Me.btnstartstop2.Image = Global.DD_Record_Organiser.My.Resources.Resources.bell_go Me.btnstartstop2.Image = Global.DD_Record_Organiser.My.Resources.Resources.bell_go
resources.ApplyResources(Me.btnstartstop2, "btnstartstop2")
Me.btnstartstop2.Name = "btnstartstop2" Me.btnstartstop2.Name = "btnstartstop2"
Me.btnstartstop2.UseVisualStyleBackColor = True Me.btnstartstop2.UseVisualStyleBackColor = True
' '

File diff suppressed because it is too large Load Diff

View File

@@ -36,7 +36,9 @@ Public Class frmConfig_Basic
Dim csb As New SqlClient.SqlConnectionStringBuilder Dim csb As New SqlClient.SqlConnectionStringBuilder
csb.ConnectionString = MyConnectionString csb.ConnectionString = MyConnectionString
Dim constr = connection.ConnectionString Dim constr = connection.ConnectionString
constr = constr.Replace(csb.Password, "XXXXX") If chkbxUserAut.Checked = False Then
constr = constr.Replace(csb.Password, "XXXXX")
End If
Me.txtActualConnection.Text = constr Me.txtActualConnection.Text = constr
End If End If
Catch ex As Exception Catch ex As Exception
@@ -95,10 +97,16 @@ Public Class frmConfig_Basic
csb.ConnectionString = MyConnectionString csb.ConnectionString = MyConnectionString
Dim constr = MyConnectionString Dim constr = MyConnectionString
constr = constr.Replace(csb.Password, "XXXXX") If Not MyConnectionString.Contains("Trusted") Then
constr = constr.Replace(csb.Password, "XXXXX")
txtUser.Text = csb.UserID
chkbxUserAut.Checked = False
Else
chkbxUserAut.Checked = True
End If
Try Try
txtServer.Text = csb.DataSource txtServer.Text = csb.DataSource
txtUser.Text = csb.UserID
cmbDatenbank.Text = csb.InitialCatalog cmbDatenbank.Text = csb.InitialCatalog
Catch ex As Exception Catch ex As Exception
@@ -353,4 +361,22 @@ Public Class frmConfig_Basic
Me.Size = sz Me.Size = sz
Me.Location = pt Me.Location = pt
End Sub End Sub
Private Sub chkbxUserAut_CheckedChanged(sender As Object, e As EventArgs) Handles chkbxUserAut.CheckedChanged
If chkbxUserAut.Checked Then
Me.txtPasswort.Enabled = False
Me.txtUser.Enabled = False
Else
Me.txtPasswort.Enabled = True
Me.txtUser.Enabled = True
End If
End Sub
Private Sub txtActualConnection_TextChanged(sender As Object, e As EventArgs) Handles txtActualConnection.TextChanged
End Sub
Private Sub cmbDatenbank_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbDatenbank.SelectedIndexChanged
End Sub
End Class End Class

View File

@@ -66,7 +66,7 @@ Partial Class frmConnections
Me.chkOR_ohne_TNS = New System.Windows.Forms.CheckBox() Me.chkOR_ohne_TNS = New System.Windows.Forms.CheckBox()
Me.lblSave = New System.Windows.Forms.Label() Me.lblSave = New System.Windows.Forms.Label()
Me.SQL_PROVIDERComboBox = New System.Windows.Forms.ComboBox() Me.SQL_PROVIDERComboBox = New System.Windows.Forms.ComboBox()
Me.lblDataSource = New System.Windows.Forms.Label() Me.lblServer = New System.Windows.Forms.Label()
Me.lblInitialCatalog = New System.Windows.Forms.Label() Me.lblInitialCatalog = New System.Windows.Forms.Label()
Me.lblUserId = New System.Windows.Forms.Label() Me.lblUserId = New System.Windows.Forms.Label()
Me.lblPassword = New System.Windows.Forms.Label() Me.lblPassword = New System.Windows.Forms.Label()
@@ -341,13 +341,13 @@ Partial Class frmConnections
Me.SQL_PROVIDERComboBox.DataBindings.Add(New System.Windows.Forms.Binding("SelectedItem", Me.TBDD_CONNECTIONBindingSource, "SQL_PROVIDER", True)) Me.SQL_PROVIDERComboBox.DataBindings.Add(New System.Windows.Forms.Binding("SelectedItem", Me.TBDD_CONNECTIONBindingSource, "SQL_PROVIDER", True))
resources.ApplyResources(Me.SQL_PROVIDERComboBox, "SQL_PROVIDERComboBox") resources.ApplyResources(Me.SQL_PROVIDERComboBox, "SQL_PROVIDERComboBox")
Me.SQL_PROVIDERComboBox.FormattingEnabled = True Me.SQL_PROVIDERComboBox.FormattingEnabled = True
Me.SQL_PROVIDERComboBox.Items.AddRange(New Object() {resources.GetString("SQL_PROVIDERComboBox.Items"), resources.GetString("SQL_PROVIDERComboBox.Items1")}) Me.SQL_PROVIDERComboBox.Items.AddRange(New Object() {resources.GetString("SQL_PROVIDERComboBox.Items"), resources.GetString("SQL_PROVIDERComboBox.Items1"), resources.GetString("SQL_PROVIDERComboBox.Items2"), resources.GetString("SQL_PROVIDERComboBox.Items3")})
Me.SQL_PROVIDERComboBox.Name = "SQL_PROVIDERComboBox" Me.SQL_PROVIDERComboBox.Name = "SQL_PROVIDERComboBox"
' '
'lblDataSource 'lblServer
' '
resources.ApplyResources(Me.lblDataSource, "lblDataSource") resources.ApplyResources(Me.lblServer, "lblServer")
Me.lblDataSource.Name = "lblDataSource" Me.lblServer.Name = "lblServer"
' '
'lblInitialCatalog 'lblInitialCatalog
' '
@@ -389,7 +389,7 @@ Partial Class frmConnections
Me.Controls.Add(Me.lblPassword) Me.Controls.Add(Me.lblPassword)
Me.Controls.Add(Me.lblUserId) Me.Controls.Add(Me.lblUserId)
Me.Controls.Add(Me.lblInitialCatalog) Me.Controls.Add(Me.lblInitialCatalog)
Me.Controls.Add(Me.lblDataSource) Me.Controls.Add(Me.lblServer)
Me.Controls.Add(SQL_PROVIDERLabel) Me.Controls.Add(SQL_PROVIDERLabel)
Me.Controls.Add(Me.SQL_PROVIDERComboBox) Me.Controls.Add(Me.SQL_PROVIDERComboBox)
Me.Controls.Add(Me.lblSave) Me.Controls.Add(Me.lblSave)
@@ -461,7 +461,7 @@ Partial Class frmConnections
Friend WithEvents chkOR_ohne_TNS As System.Windows.Forms.CheckBox Friend WithEvents chkOR_ohne_TNS As System.Windows.Forms.CheckBox
Friend WithEvents lblSave As System.Windows.Forms.Label Friend WithEvents lblSave As System.Windows.Forms.Label
Friend WithEvents SQL_PROVIDERComboBox As System.Windows.Forms.ComboBox Friend WithEvents SQL_PROVIDERComboBox As System.Windows.Forms.ComboBox
Friend WithEvents lblDataSource As System.Windows.Forms.Label Friend WithEvents lblServer As System.Windows.Forms.Label
Friend WithEvents lblInitialCatalog As System.Windows.Forms.Label Friend WithEvents lblInitialCatalog As System.Windows.Forms.Label
Friend WithEvents lblUserId As System.Windows.Forms.Label Friend WithEvents lblUserId As System.Windows.Forms.Label
Friend WithEvents lblPassword As System.Windows.Forms.Label Friend WithEvents lblPassword As System.Windows.Forms.Label

View File

@@ -1029,6 +1029,12 @@
<data name="SQL_PROVIDERComboBox.Items1" xml:space="preserve"> <data name="SQL_PROVIDERComboBox.Items1" xml:space="preserve">
<value>Oracle</value> <value>Oracle</value>
</data> </data>
<data name="SQL_PROVIDERComboBox.Items2" xml:space="preserve">
<value>ODBC (SAP - MAXDB)</value>
</data>
<data name="SQL_PROVIDERComboBox.Items3" xml:space="preserve">
<value>ODBC</value>
</data>
<data name="SQL_PROVIDERComboBox.Location" type="System.Drawing.Point, System.Drawing"> <data name="SQL_PROVIDERComboBox.Location" type="System.Drawing.Point, System.Drawing">
<value>183, 83</value> <value>183, 83</value>
</data> </data>
@@ -1050,34 +1056,34 @@
<data name="&gt;&gt;SQL_PROVIDERComboBox.ZOrder" xml:space="preserve"> <data name="&gt;&gt;SQL_PROVIDERComboBox.ZOrder" xml:space="preserve">
<value>5</value> <value>5</value>
</data> </data>
<data name="lblDataSource.AutoSize" type="System.Boolean, mscorlib"> <data name="lblServer.AutoSize" type="System.Boolean, mscorlib">
<value>True</value> <value>True</value>
</data> </data>
<data name="lblDataSource.Font" type="System.Drawing.Font, System.Drawing"> <data name="lblServer.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 8.25pt</value> <value>Segoe UI, 8.25pt</value>
</data> </data>
<data name="lblDataSource.Location" type="System.Drawing.Point, System.Drawing"> <data name="lblServer.Location" type="System.Drawing.Point, System.Drawing">
<value>181, 106</value> <value>181, 106</value>
</data> </data>
<data name="lblDataSource.Size" type="System.Drawing.Size, System.Drawing"> <data name="lblServer.Size" type="System.Drawing.Size, System.Drawing">
<value>74, 13</value> <value>74, 13</value>
</data> </data>
<data name="lblDataSource.TabIndex" type="System.Int32, mscorlib"> <data name="lblServer.TabIndex" type="System.Int32, mscorlib">
<value>32</value> <value>32</value>
</data> </data>
<data name="lblDataSource.Text" xml:space="preserve"> <data name="lblServer.Text" xml:space="preserve">
<value>DataSource*:</value> <value>DataSource*:</value>
</data> </data>
<data name="&gt;&gt;lblDataSource.Name" xml:space="preserve"> <data name="&gt;&gt;lblServer.Name" xml:space="preserve">
<value>lblDataSource</value> <value>lblServer</value>
</data> </data>
<data name="&gt;&gt;lblDataSource.Type" xml:space="preserve"> <data name="&gt;&gt;lblServer.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;lblDataSource.Parent" xml:space="preserve"> <data name="&gt;&gt;lblServer.Parent" xml:space="preserve">
<value>$this</value> <value>$this</value>
</data> </data>
<data name="&gt;&gt;lblDataSource.ZOrder" xml:space="preserve"> <data name="&gt;&gt;lblServer.ZOrder" xml:space="preserve">
<value>3</value> <value>3</value>
</data> </data>
<data name="lblInitialCatalog.AutoSize" type="System.Boolean, mscorlib"> <data name="lblInitialCatalog.AutoSize" type="System.Boolean, mscorlib">

View File

@@ -1,4 +1,5 @@
Imports Oracle.ManagedDataAccess.Client Imports Oracle.ManagedDataAccess.Client
Imports System.Data.Odbc
Public Class frmConnections Public Class frmConnections
@@ -49,7 +50,7 @@ Public Class frmConnections
Case "MS-SQLServer" Case "MS-SQLServer"
cmbDatabase.Items.Clear() cmbDatabase.Items.Clear()
' DATABASETextBox.Visible = False ' DATABASETextBox.Visible = False
Me.lblDataSource.Text = "Datenbank-Server (IP-Adresse oder Name)*:" Me.lblServer.Text = "Datenbank-Server (IP-Adresse oder Name)*:"
Me.lblInitialCatalog.Text = "Datenbank-Name:" Me.lblInitialCatalog.Text = "Datenbank-Name:"
Me.SERVERTextBox.ReadOnly = False Me.SERVERTextBox.ReadOnly = False
Me.SERVERTextBox.BackColor = System.Drawing.SystemColors.Window Me.SERVERTextBox.BackColor = System.Drawing.SystemColors.Window
@@ -65,27 +66,49 @@ Public Class frmConnections
Case "Oracle" Case "Oracle"
' DATABASETextBox.Visible = True ' DATABASETextBox.Visible = True
Me.cmbDatabase.Visible = False Me.cmbDatabase.Visible = False
Me.lblDataSource.Text = "IP Oracle-Server:" Me.lblServer.Text = "IP Oracle-Server:"
Me.lblInitialCatalog.Visible = True
Me.lblInitialCatalog.Text = "Servicename:" Me.lblInitialCatalog.Text = "Servicename:"
Me.SERVERTextBox.ReadOnly = False Me.SERVERTextBox.ReadOnly = False
Me.SERVERTextBox.BackColor = System.Drawing.SystemColors.Window Me.SERVERTextBox.BackColor = System.Drawing.SystemColors.Window
Me.SERVERTextBox.Text = "" Me.SERVERTextBox.Text = ""
Me.lblUserId.Text = "UserId:" Me.lblUserId.Text = "UserId:"
Me.lblPassword.Text = "Passwort:" Me.lblPassword.Text = "Passwort:"
Me.lblInitialCatalog.Visible = True
'Me.DATENBANKTextBox.Visible = True 'Me.DATENBANKTextBox.Visible = True
chkOR_ohne_TNS.Visible = True chkOR_ohne_TNS.Visible = True
End Select Case "ODBC (SAP - MAXDB)"
Me.lblServer.Text = "Servername:"
Me.lblInitialCatalog.Text = "Databasename:"
Me.lblInitialCatalog.Visible = True
Me.cmbDatabase.Visible = False
Me.lblDataSource.Visible = True Me.SERVERTextBox.ReadOnly = False
Me.SERVERTextBox.BackColor = System.Drawing.SystemColors.Window
Me.SERVERTextBox.Text = ""
Me.lblUserId.Text = "Username:"
Me.lblPassword.Text = "Password:"
Case "ODBC"
Me.lblServer.Text = "DSN Name:"
Me.lblInitialCatalog.Visible = False
Me.cmbDatabase.Visible = False
Me.DATABASETextBox.Visible = False
Me.SERVERTextBox.Visible = False
Me.lblUserId.Text = "Username:"
Me.lblPassword.Text = "Password:"
End Select
If Me.SQL_PROVIDERComboBox.SelectedItem <> "ODBC" Then
End If
Me.SERVERTextBox.Visible = True
Me.lblServer.Visible = True
Me.lblUserId.Visible = True Me.lblUserId.Visible = True
Me.lblPassword.Visible = True Me.lblPassword.Visible = True
Me.SERVERTextBox.Visible = True
Me.USERNAMETextBox.Visible = True Me.USERNAMETextBox.Visible = True
Me.PASSWORDTextBox.Visible = True Me.PASSWORDTextBox.Visible = True
Else Else
Me.lblDataSource.Visible = False Me.lblServer.Visible = False
Me.lblUserId.Visible = False Me.lblUserId.Visible = False
Me.lblPassword.Visible = False Me.lblPassword.Visible = False
Me.SERVERTextBox.Visible = False Me.SERVERTextBox.Visible = False
@@ -166,7 +189,29 @@ Public Class frmConnections
Catch ex As Exception Catch ex As Exception
MsgBox(ex.Message & vbNewLine & vbNewLine & connstr, MsgBoxStyle.Critical, "Fehler bei Verbindungsaufbau Oracle:") MsgBox(ex.Message & vbNewLine & vbNewLine & connstr, MsgBoxStyle.Critical, "Fehler bei Verbindungsaufbau Oracle:")
End Try End Try
Case "ODBC (SAP - MAXDB)"
Dim Connstring
Try
Dim conn As New OdbcConnection("driver=sap db;servernode=" & SERVERTextBox.Text & ";serverdb=" + DATABASETextBox.Text & _
";uid=" & USERNAMETextBox.Text & ";pwd=" + PASSWORDTextBox.Text)
Connstring = conn.ConnectionString
conn.Open()
MsgBox("Die Verbindung wurde erfolgreich aufgebaut!", MsgBoxStyle.Information, "Erfolg:")
conn.Close()
Catch ex As Exception
MsgBox(ex.Message & vbNewLine & vbNewLine & Connstring, MsgBoxStyle.Critical, "Error in Create Conenction SAPMAX DB:")
End Try
Case "ODBC"
Dim Connstring
Try
Dim conn As New OdbcConnection("dsn=" & SERVERTextBox.Text & ";uid=" & USERNAMETextBox.Text & ";pwd=" + PASSWORDTextBox.Text)
Connstring = conn.ConnectionString
conn.Open()
MsgBox("Die Verbindung wurde erfolgreich aufgebaut!", MsgBoxStyle.Information, "Erfolg:")
conn.Close()
Catch ex As Exception
MsgBox(ex.Message & vbNewLine & vbNewLine & Connstring, MsgBoxStyle.Critical, "Error in Create Conenction ODBC:")
End Try
Case Else Case Else
MsgBox("Test zur Zeit nicht möglich", MsgBoxStyle.Information, "Achtung:") MsgBox("Test zur Zeit nicht möglich", MsgBoxStyle.Information, "Achtung:")
End Select End Select
@@ -231,11 +276,6 @@ Public Class frmConnections
MsgBox("Fehler beim Verbindungsaufbau: " & vbNewLine & ex.Message, MsgBoxStyle.Exclamation) MsgBox("Fehler beim Verbindungsaufbau: " & vbNewLine & ex.Message, MsgBoxStyle.Exclamation)
End Try End Try
End Sub End Sub
Private Sub TBDD_CONNECTIONBindingSource_AddingNew(sender As Object, e As System.ComponentModel.AddingNewEventArgs)
Me.DD_ECMAdmin.TBDD_CONNECTION.ERSTELLTWERColumn.DefaultValue = Environment.UserName
Me.DD_ECMAdmin.TBDD_CONNECTION.ERSTELLTWANNColumn.DefaultValue = Date.Now
End Sub
Private Sub BEMERKUNGTextBox_TextChanged(sender As Object, e As EventArgs) Handles BEMERKUNGTextBox.TextChanged Private Sub BEMERKUNGTextBox_TextChanged(sender As Object, e As EventArgs) Handles BEMERKUNGTextBox.TextChanged
If BEMERKUNGTextBox.Text.Contains("without tnsnames") Then If BEMERKUNGTextBox.Text.Contains("without tnsnames") Then
Me.chkOR_ohne_TNS.Checked = True Me.chkOR_ohne_TNS.Checked = True
@@ -244,9 +284,14 @@ Public Class frmConnections
End If End If
End Sub End Sub
Private Sub TBDD_CONNECTIONBindingSource_AddingNew1(sender As Object, e As System.ComponentModel.AddingNewEventArgs) Handles TBDD_CONNECTIONBindingSource.AddingNew
Me.DD_ECMAdmin.TBDD_CONNECTION.ERSTELLTWERColumn.DefaultValue = Environment.UserName
Me.DD_ECMAdmin.TBDD_CONNECTION.ERSTELLTWANNColumn.DefaultValue = Date.Now
End Sub
Private Sub TBDD_CONNECTIONBindingSource_CurrentChanged(sender As Object, e As EventArgs) Handles TBDD_CONNECTIONBindingSource.CurrentChanged Private Sub TBDD_CONNECTIONBindingSource_CurrentChanged(sender As Object, e As EventArgs) Handles TBDD_CONNECTIONBindingSource.CurrentChanged
Me.lblSave.Visible = False Me.lblSave.Visible = False
Select Me.SQL_PROVIDERComboBox.SelectedItem Select Case Me.SQL_PROVIDERComboBox.SelectedItem
Case "MS-SQLServer" Case "MS-SQLServer"
cmbDatabase.Items.Clear() cmbDatabase.Items.Clear()
cmbDatabase.Items.Add(DATABASETextBox.Text) cmbDatabase.Items.Add(DATABASETextBox.Text)

View File

@@ -132,8 +132,24 @@ Public Class frmSQLEditor
sqlAdapter.SelectCommand = sqlCommand sqlAdapter.SelectCommand = sqlCommand
sqlAdapter.Fill(dataset) sqlAdapter.Fill(dataset)
Return dataset
ElseIf connectionString.Contains("dsn=") Then 'ODBC-Connection
Dim sqlConnection As Odbc.OdbcConnection
Dim sqlCommand As Odbc.OdbcCommand
Dim sqlAdapter As New Odbc.OdbcDataAdapter
Dim dataset As New DataSet
sqlConnection = New Odbc.OdbcConnection(connectionString)
sqlConnection.Open()
sqlCommand = New Odbc.OdbcCommand(sql, sqlConnection)
sqlAdapter.SelectCommand = sqlCommand
sqlAdapter.Fill(dataset)
Return dataset Return dataset
Else Else
If LogErrorsOnly = True Then ClassLogger.Add(" >> It's an Oracle-Connection (ExecuteWithConnection)", False) If LogErrorsOnly = True Then ClassLogger.Add(" >> It's an Oracle-Connection (ExecuteWithConnection)", False)
Dim sqlConnection As OracleConnection Dim sqlConnection As OracleConnection
Dim sqlCommand As OracleCommand Dim sqlCommand As OracleCommand

View File

@@ -25,13 +25,16 @@
Public Sub LoadControlPropertiesNeu(ctrl As Control) Public Sub LoadControlPropertiesNeu(ctrl As Control)
Try Try
Dim TagID = DirectCast(ctrl.Tag, ClassControlMetadata).Id
Dim sql As String = String.Format("SELECT * FROM VWPMO_CONTROL_SCREEN WHERE CONTROL_ID = {0}", DirectCast(ctrl.Tag, ClassControlMetadata).Id) Dim sql As String = String.Format("SELECT * FROM VWPMO_CONTROL_SCREEN WHERE CONTROL_ID = {0}", DirectCast(ctrl.Tag, ClassControlMetadata).Id)
Dim dt As DataTable = ClassDatabase.Return_Datatable(sql) Dim dt As DataTable = ClassDatabase.Return_Datatable(sql)
Dim props As Object = Nothing Dim props As Object = Nothing
Dim r As DataRow = Nothing Dim r As DataRow = Nothing
Dim type As String = Nothing Dim type As String = Nothing
If dt.Rows.Count <> 1 Then If dt.Rows.Count <> 1 Then
MsgBox("Unexpected behaviour in LoadControlProperties: No Control could be loaded!" & vbNewLine & "Tag.ControlID: " & TagID.ToString, MsgBoxStyle.Exclamation)
Exit Sub Exit Sub
End If End If