JJ ReadOnly, fix SQL Editor
This commit is contained in:
@@ -11,14 +11,9 @@ Public Class ClassControlBuilder
|
|||||||
Private _mouse_click_handler As EventHandler
|
Private _mouse_click_handler As EventHandler
|
||||||
Private _group_box_drag_drop_handler As DragEventHandler
|
Private _group_box_drag_drop_handler As DragEventHandler
|
||||||
Private _tool_tip As ToolTip
|
Private _tool_tip As ToolTip
|
||||||
|
Private _onRecordChangedName As String = "OnRecordChanged"
|
||||||
Private binding1 As BindingSource
|
|
||||||
|
|
||||||
Private OnRecordChangedName As String = "OnRecordChanged"
|
|
||||||
Private _events As System.ComponentModel.EventHandlerList = Nothing
|
Private _events As System.ComponentModel.EventHandlerList = Nothing
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Protected ReadOnly Property Events() As System.ComponentModel.EventHandlerList
|
Protected ReadOnly Property Events() As System.ComponentModel.EventHandlerList
|
||||||
Get
|
Get
|
||||||
If _events Is Nothing Then
|
If _events Is Nothing Then
|
||||||
@@ -31,15 +26,15 @@ Public Class ClassControlBuilder
|
|||||||
' +++ RecordChanged Event +++
|
' +++ RecordChanged Event +++
|
||||||
Public Custom Event OnRecordChanged As EventHandler
|
Public Custom Event OnRecordChanged As EventHandler
|
||||||
AddHandler(value As EventHandler)
|
AddHandler(value As EventHandler)
|
||||||
Me.Events.AddHandler(OnRecordChangedName, value)
|
Me.Events.AddHandler(_onRecordChangedName, value)
|
||||||
End AddHandler
|
End AddHandler
|
||||||
|
|
||||||
RemoveHandler(value As EventHandler)
|
RemoveHandler(value As EventHandler)
|
||||||
Me.Events.RemoveHandler(OnRecordChangedName, value)
|
Me.Events.RemoveHandler(_onRecordChangedName, value)
|
||||||
End RemoveHandler
|
End RemoveHandler
|
||||||
|
|
||||||
RaiseEvent(sender As Object, e As EventArgs)
|
RaiseEvent(sender As Object, e As EventArgs)
|
||||||
CType(Me.Events(OnRecordChangedName), EventHandler).Invoke(sender, e)
|
CType(Me.Events(_onRecordChangedName), EventHandler).Invoke(sender, e)
|
||||||
End RaiseEvent
|
End RaiseEvent
|
||||||
End Event
|
End Event
|
||||||
|
|
||||||
@@ -47,7 +42,7 @@ Public Class ClassControlBuilder
|
|||||||
' Handler für alle Controls
|
' Handler für alle Controls
|
||||||
' ==================================================================================
|
' ==================================================================================
|
||||||
Public Sub RecordChanged(sender As Object, ByVal e As EventArgs)
|
Public Sub RecordChanged(sender As Object, ByVal e As EventArgs)
|
||||||
Dim onRecordChangedHandler As EventHandler = CType(Me.Events(OnRecordChangedName), EventHandler)
|
Dim onRecordChangedHandler As EventHandler = CType(Me.Events(_onRecordChangedName), EventHandler)
|
||||||
|
|
||||||
If (onRecordChangedHandler IsNot Nothing) Then
|
If (onRecordChangedHandler IsNot Nothing) Then
|
||||||
onRecordChangedHandler.Invoke(sender, e)
|
onRecordChangedHandler.Invoke(sender, e)
|
||||||
@@ -56,7 +51,7 @@ Public Class ClassControlBuilder
|
|||||||
|
|
||||||
' CheckedListBox hat andere Handler Signatur
|
' CheckedListBox hat andere Handler Signatur
|
||||||
Public Sub RecordChanged(sender As Object, ByVal e As DevExpress.XtraEditors.Controls.ItemCheckEventArgs)
|
Public Sub RecordChanged(sender As Object, ByVal e As DevExpress.XtraEditors.Controls.ItemCheckEventArgs)
|
||||||
Dim onRecordChangedHandler As EventHandler = CType(Me.Events(OnRecordChangedName), EventHandler)
|
Dim onRecordChangedHandler As EventHandler = CType(Me.Events(_onRecordChangedName), EventHandler)
|
||||||
|
|
||||||
If (onRecordChangedHandler IsNot Nothing) Then
|
If (onRecordChangedHandler IsNot Nothing) Then
|
||||||
onRecordChangedHandler.Invoke(sender, e)
|
onRecordChangedHandler.Invoke(sender, e)
|
||||||
@@ -572,6 +567,7 @@ Public Class ClassControlBuilder
|
|||||||
control.Multiline = True
|
control.Multiline = True
|
||||||
control.AcceptsReturn = True
|
control.AcceptsReturn = True
|
||||||
control.AcceptsTab = True
|
control.AcceptsTab = True
|
||||||
|
control.ScrollBars = ScrollBars.Vertical
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If _new And IsNothing(parent) Then
|
If _new And IsNothing(parent) Then
|
||||||
@@ -591,7 +587,9 @@ Public Class ClassControlBuilder
|
|||||||
control.Cursor = Cursors.Hand
|
control.Cursor = Cursors.Hand
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Me.SetEventHandlers(control)
|
If Not read_only Then
|
||||||
|
Me.SetEventHandlers(control)
|
||||||
|
End If
|
||||||
|
|
||||||
Me.CurrentControl = DirectCast(control, TextBox)
|
Me.CurrentControl = DirectCast(control, TextBox)
|
||||||
If Not IsNothing(parent) Then
|
If Not IsNothing(parent) Then
|
||||||
@@ -622,7 +620,8 @@ Public Class ClassControlBuilder
|
|||||||
vwidth As Integer,
|
vwidth As Integer,
|
||||||
vheight As Integer,
|
vheight As Integer,
|
||||||
_new As Boolean,
|
_new As Boolean,
|
||||||
Optional parent As GroupBox = Nothing,
|
read_only As Boolean,
|
||||||
|
Optional parent As GroupBox = Nothing,
|
||||||
Optional _designMode As Boolean = False)
|
Optional _designMode As Boolean = False)
|
||||||
Try
|
Try
|
||||||
Dim control As New CheckBox
|
Dim control As New CheckBox
|
||||||
@@ -642,6 +641,10 @@ Public Class ClassControlBuilder
|
|||||||
control.AutoCheck = True
|
control.AutoCheck = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not _designMode And read_only Then
|
||||||
|
control.Enabled = Not read_only
|
||||||
|
End If
|
||||||
|
|
||||||
If _new And IsNothing(parent) Then
|
If _new And IsNothing(parent) Then
|
||||||
control.Location = Me.GetCursorPosition()
|
control.Location = Me.GetCursorPosition()
|
||||||
control.Size = defaultSize
|
control.Size = defaultSize
|
||||||
@@ -683,6 +686,7 @@ Public Class ClassControlBuilder
|
|||||||
vwidth As Integer,
|
vwidth As Integer,
|
||||||
vheight As Integer,
|
vheight As Integer,
|
||||||
_new As Boolean,
|
_new As Boolean,
|
||||||
|
read_only As Boolean,
|
||||||
Optional parent As GroupBox = Nothing,
|
Optional parent As GroupBox = Nothing,
|
||||||
Optional _designMode As Boolean = False)
|
Optional _designMode As Boolean = False)
|
||||||
Try
|
Try
|
||||||
@@ -711,6 +715,10 @@ Public Class ClassControlBuilder
|
|||||||
control.Size = New Size(vwidth, vheight)
|
control.Size = New Size(vwidth, vheight)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not _designMode And read_only Then
|
||||||
|
control.Enabled = Not read_only
|
||||||
|
End If
|
||||||
|
|
||||||
If _designMode = True Then
|
If _designMode = True Then
|
||||||
control.Cursor = Cursors.Hand
|
control.Cursor = Cursors.Hand
|
||||||
End If
|
End If
|
||||||
@@ -742,6 +750,7 @@ Public Class ClassControlBuilder
|
|||||||
vheight As Integer,
|
vheight As Integer,
|
||||||
vformat As String,
|
vformat As String,
|
||||||
_new As Boolean,
|
_new As Boolean,
|
||||||
|
read_only As Boolean,
|
||||||
static_list As String,
|
static_list As String,
|
||||||
sqlcommand As String,
|
sqlcommand As String,
|
||||||
Optional parent As GroupBox = Nothing,
|
Optional parent As GroupBox = Nothing,
|
||||||
@@ -759,6 +768,10 @@ Public Class ClassControlBuilder
|
|||||||
control.DropDownStyle = ComboBoxStyle.DropDown
|
control.DropDownStyle = ComboBoxStyle.DropDown
|
||||||
control.FormattingEnabled = True
|
control.FormattingEnabled = True
|
||||||
|
|
||||||
|
If (Not _designMode And read_only) Then
|
||||||
|
control.Enabled = Not read_only
|
||||||
|
End If
|
||||||
|
|
||||||
AddComboHandler(control, vformat)
|
AddComboHandler(control, vformat)
|
||||||
|
|
||||||
If _new And IsNothing(parent) Then
|
If _new And IsNothing(parent) Then
|
||||||
@@ -885,6 +898,7 @@ Public Class ClassControlBuilder
|
|||||||
tabstop As Boolean,
|
tabstop As Boolean,
|
||||||
vwidth As Integer,
|
vwidth As Integer,
|
||||||
vheight As Integer,
|
vheight As Integer,
|
||||||
|
read_only As Boolean,
|
||||||
_new As Boolean,
|
_new As Boolean,
|
||||||
Optional parent As GroupBox = Nothing,
|
Optional parent As GroupBox = Nothing,
|
||||||
Optional _designMode As Boolean = False)
|
Optional _designMode As Boolean = False)
|
||||||
@@ -903,6 +917,7 @@ Public Class ClassControlBuilder
|
|||||||
control.Parent = _master_panel
|
control.Parent = _master_panel
|
||||||
control.Properties.NullDate = DateTime.MinValue
|
control.Properties.NullDate = DateTime.MinValue
|
||||||
control.Properties.NullText = String.Empty
|
control.Properties.NullText = String.Empty
|
||||||
|
control.Properties.ReadOnly = read_only
|
||||||
|
|
||||||
If _new And IsNothing(parent) Then
|
If _new And IsNothing(parent) Then
|
||||||
control.Location = Me.GetCursorPosition()
|
control.Location = Me.GetCursorPosition()
|
||||||
@@ -917,7 +932,10 @@ Public Class ClassControlBuilder
|
|||||||
control.Size = New Size(vwidth, vheight)
|
control.Size = New Size(vwidth, vheight)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Me.SetEventHandlers(control)
|
If Not read_only Then
|
||||||
|
Me.SetEventHandlers(control)
|
||||||
|
End If
|
||||||
|
|
||||||
'Me.CurrentControl = DirectCast(control, DateTimePicker)
|
'Me.CurrentControl = DirectCast(control, DateTimePicker)
|
||||||
Me.CurrentControl = DirectCast(control, DevExpress.XtraEditors.DateEdit)
|
Me.CurrentControl = DirectCast(control, DevExpress.XtraEditors.DateEdit)
|
||||||
If Not IsNothing(parent) Then
|
If Not IsNothing(parent) Then
|
||||||
@@ -938,6 +956,7 @@ Public Class ClassControlBuilder
|
|||||||
vwidth As Integer,
|
vwidth As Integer,
|
||||||
vheight As Integer,
|
vheight As Integer,
|
||||||
_new As Boolean,
|
_new As Boolean,
|
||||||
|
read_only As Boolean,
|
||||||
Optional parent As GroupBox = Nothing,
|
Optional parent As GroupBox = Nothing,
|
||||||
Optional _designMode As Boolean = False)
|
Optional _designMode As Boolean = False)
|
||||||
|
|
||||||
@@ -952,6 +971,7 @@ Public Class ClassControlBuilder
|
|||||||
control.AllowUserToResizeColumns = False
|
control.AllowUserToResizeColumns = False
|
||||||
control.AllowUserToResizeRows = False
|
control.AllowUserToResizeRows = False
|
||||||
control.Parent = _master_panel
|
control.Parent = _master_panel
|
||||||
|
control.ReadOnly = read_only
|
||||||
|
|
||||||
column.HeaderText = ""
|
column.HeaderText = ""
|
||||||
column.Name = "column1"
|
column.Name = "column1"
|
||||||
@@ -990,7 +1010,8 @@ Public Class ClassControlBuilder
|
|||||||
vwidth As Integer,
|
vwidth As Integer,
|
||||||
vheight As Integer,
|
vheight As Integer,
|
||||||
_new As Boolean,
|
_new As Boolean,
|
||||||
Optional parent As GroupBox = Nothing,
|
read_only As Boolean,
|
||||||
|
Optional parent As GroupBox = Nothing,
|
||||||
Optional _designMode As Boolean = False)
|
Optional _designMode As Boolean = False)
|
||||||
|
|
||||||
Dim control As New PictureBox
|
Dim control As New PictureBox
|
||||||
@@ -1009,8 +1030,10 @@ Public Class ClassControlBuilder
|
|||||||
AddHandler itemDel.Click, AddressOf itemDel_Click
|
AddHandler itemDel.Click, AddressOf itemDel_Click
|
||||||
AddHandler itemSave.Click, AddressOf itemSave_Click
|
AddHandler itemSave.Click, AddressOf itemSave_Click
|
||||||
|
|
||||||
ctx.Items.Add(itemAdd)
|
If read_only Then
|
||||||
ctx.Items.Add(itemDel)
|
ctx.Items.Add(itemAdd)
|
||||||
|
ctx.Items.Add(itemDel)
|
||||||
|
End If
|
||||||
ctx.Items.Add(itemSave)
|
ctx.Items.Add(itemSave)
|
||||||
|
|
||||||
control.Name = name
|
control.Name = name
|
||||||
@@ -1059,7 +1082,7 @@ Public Class ClassControlBuilder
|
|||||||
fontsize As Integer,
|
fontsize As Integer,
|
||||||
fontstyle As Integer,
|
fontstyle As Integer,
|
||||||
_new As Boolean,
|
_new As Boolean,
|
||||||
Optional parent As GroupBox = Nothing,
|
Optional parent As GroupBox = Nothing,
|
||||||
Optional _designMode As Boolean = False)
|
Optional _designMode As Boolean = False)
|
||||||
|
|
||||||
Dim control As New GroupBox
|
Dim control As New GroupBox
|
||||||
@@ -1220,6 +1243,7 @@ Public Class ClassControlBuilder
|
|||||||
vwidth As Integer,
|
vwidth As Integer,
|
||||||
vheight As Integer,
|
vheight As Integer,
|
||||||
_new As Boolean,
|
_new As Boolean,
|
||||||
|
read_only As Boolean,
|
||||||
static_list As String,
|
static_list As String,
|
||||||
sqlcommand As String,
|
sqlcommand As String,
|
||||||
Optional parent As GroupBox = Nothing,
|
Optional parent As GroupBox = Nothing,
|
||||||
@@ -1237,6 +1261,10 @@ Public Class ClassControlBuilder
|
|||||||
control.TabStop = tabstop
|
control.TabStop = tabstop
|
||||||
control.Parent = _master_panel
|
control.Parent = _master_panel
|
||||||
|
|
||||||
|
If Not _designMode And read_only Then
|
||||||
|
control.Enabled = Not read_only
|
||||||
|
End If
|
||||||
|
|
||||||
Dim ctx As New ContextMenuStrip()
|
Dim ctx As New ContextMenuStrip()
|
||||||
|
|
||||||
Dim selectAll As New ToolStripMenuItem()
|
Dim selectAll As New ToolStripMenuItem()
|
||||||
@@ -1315,6 +1343,7 @@ Public Class ClassControlBuilder
|
|||||||
vwidth As Integer,
|
vwidth As Integer,
|
||||||
vheight As Integer,
|
vheight As Integer,
|
||||||
_new As Boolean,
|
_new As Boolean,
|
||||||
|
read_only As Boolean,
|
||||||
static_list As String,
|
static_list As String,
|
||||||
sqlcommand As String,
|
sqlcommand As String,
|
||||||
Optional parent As GroupBox = Nothing,
|
Optional parent As GroupBox = Nothing,
|
||||||
@@ -1332,6 +1361,10 @@ Public Class ClassControlBuilder
|
|||||||
control.TabStop = tabstop
|
control.TabStop = tabstop
|
||||||
control.Parent = _master_panel
|
control.Parent = _master_panel
|
||||||
|
|
||||||
|
If Not _designMode And read_only Then
|
||||||
|
control.Enabled = Not read_only
|
||||||
|
End If
|
||||||
|
|
||||||
If _new And IsNothing(parent) Then
|
If _new And IsNothing(parent) Then
|
||||||
control.Location = Me.GetCursorPosition()
|
control.Location = Me.GetCursorPosition()
|
||||||
control.Size = defaultSize
|
control.Size = defaultSize
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ Public Class ClassControlCommandsUI
|
|||||||
dr.Item("CTRLSCR_HEIGHT"),
|
dr.Item("CTRLSCR_HEIGHT"),
|
||||||
dr.Item("CONTROL_FORMAT_TYPE"),
|
dr.Item("CONTROL_FORMAT_TYPE"),
|
||||||
False,
|
False,
|
||||||
|
dr.Item("CONTROL_READ_ONLY"),
|
||||||
dr.Item("CONTROL_STATIC_LIST"),
|
dr.Item("CONTROL_STATIC_LIST"),
|
||||||
dr.Item("CONTROL_SQLCOMMAND_1"),
|
dr.Item("CONTROL_SQLCOMMAND_1"),
|
||||||
parent)
|
parent)
|
||||||
@@ -99,6 +100,7 @@ Public Class ClassControlCommandsUI
|
|||||||
dr.Item("CTRLSCR_TAB_STOP"),
|
dr.Item("CTRLSCR_TAB_STOP"),
|
||||||
dr.Item("CTRLSCR_WIDTH"),
|
dr.Item("CTRLSCR_WIDTH"),
|
||||||
dr.Item("CTRLSCR_HEIGHT"),
|
dr.Item("CTRLSCR_HEIGHT"),
|
||||||
|
dr.Item("CONTROL_READ_ONLY"),
|
||||||
False,
|
False,
|
||||||
parent)
|
parent)
|
||||||
Case 5 ' GroupBox
|
Case 5 ' GroupBox
|
||||||
@@ -122,6 +124,7 @@ Public Class ClassControlCommandsUI
|
|||||||
dr.Item("CTRLSCR_WIDTH"),
|
dr.Item("CTRLSCR_WIDTH"),
|
||||||
dr.Item("CTRLSCR_HEIGHT"),
|
dr.Item("CTRLSCR_HEIGHT"),
|
||||||
False,
|
False,
|
||||||
|
dr.Item("CONTROL_READ_ONLY"),
|
||||||
parent)
|
parent)
|
||||||
Case 7 ' DataGridView
|
Case 7 ' DataGridView
|
||||||
_CtrlBuilder.AddDataGridView(dr.Item("CONTROL_NAME"),
|
_CtrlBuilder.AddDataGridView(dr.Item("CONTROL_NAME"),
|
||||||
@@ -130,6 +133,7 @@ Public Class ClassControlCommandsUI
|
|||||||
dr.Item("CTRLSCR_WIDTH"),
|
dr.Item("CTRLSCR_WIDTH"),
|
||||||
dr.Item("CTRLSCR_HEIGHT"),
|
dr.Item("CTRLSCR_HEIGHT"),
|
||||||
False,
|
False,
|
||||||
|
dr.Item("CONTROL_READ_ONLY"),
|
||||||
parent)
|
parent)
|
||||||
Case 10 ' Checkbox
|
Case 10 ' Checkbox
|
||||||
Dim Checked As Boolean = False
|
Dim Checked As Boolean = False
|
||||||
@@ -152,6 +156,7 @@ Public Class ClassControlCommandsUI
|
|||||||
dr.Item("CTRLSCR_WIDTH"),
|
dr.Item("CTRLSCR_WIDTH"),
|
||||||
dr.Item("CTRLSCR_HEIGHT"),
|
dr.Item("CTRLSCR_HEIGHT"),
|
||||||
False,
|
False,
|
||||||
|
dr.Item("CONTROL_READ_ONLY"),
|
||||||
parent)
|
parent)
|
||||||
Case 8 ' Function AddAppointment
|
Case 8 ' Function AddAppointment
|
||||||
_CtrlBuilder.FunctionAddAppointment(dr.Item("CONTROL_NAME"),
|
_CtrlBuilder.FunctionAddAppointment(dr.Item("CONTROL_NAME"),
|
||||||
@@ -194,6 +199,7 @@ Public Class ClassControlCommandsUI
|
|||||||
dr.Item("CTRLSCR_WIDTH"),
|
dr.Item("CTRLSCR_WIDTH"),
|
||||||
dr.Item("CTRLSCR_HEIGHT"),
|
dr.Item("CTRLSCR_HEIGHT"),
|
||||||
False,
|
False,
|
||||||
|
dr.Item("CONTROL_READ_ONLY"),
|
||||||
parent)
|
parent)
|
||||||
Case 12 'CheckedListBox
|
Case 12 'CheckedListBox
|
||||||
CtrlBuilder.AddCheckedListBox(dr.Item("CONTROL_NAME"),
|
CtrlBuilder.AddCheckedListBox(dr.Item("CONTROL_NAME"),
|
||||||
@@ -208,10 +214,10 @@ Public Class ClassControlCommandsUI
|
|||||||
dr.Item("CTRLSCR_WIDTH"),
|
dr.Item("CTRLSCR_WIDTH"),
|
||||||
dr.Item("CTRLSCR_HEIGHT"),
|
dr.Item("CTRLSCR_HEIGHT"),
|
||||||
False,
|
False,
|
||||||
|
dr.Item("CONTROL_READ_ONLY"),
|
||||||
dr.Item("CONTROL_STATIC_LIST"),
|
dr.Item("CONTROL_STATIC_LIST"),
|
||||||
dr.Item("CONTROL_SQLCOMMAND_1"),
|
dr.Item("CONTROL_SQLCOMMAND_1"),
|
||||||
parent,
|
parent)
|
||||||
True)
|
|
||||||
Case 13 'CheckedListBox
|
Case 13 'CheckedListBox
|
||||||
CtrlBuilder.AddListBox(dr.Item("CONTROL_NAME"),
|
CtrlBuilder.AddListBox(dr.Item("CONTROL_NAME"),
|
||||||
dr.Item("CTRLSCR_X_LOC"),
|
dr.Item("CTRLSCR_X_LOC"),
|
||||||
@@ -225,10 +231,10 @@ Public Class ClassControlCommandsUI
|
|||||||
dr.Item("CTRLSCR_WIDTH"),
|
dr.Item("CTRLSCR_WIDTH"),
|
||||||
dr.Item("CTRLSCR_HEIGHT"),
|
dr.Item("CTRLSCR_HEIGHT"),
|
||||||
False,
|
False,
|
||||||
|
dr.Item("CONTROL_READ_ONLY"),
|
||||||
dr.Item("CONTROL_STATIC_LIST"),
|
dr.Item("CONTROL_STATIC_LIST"),
|
||||||
dr.Item("CONTROL_SQLCOMMAND_1"),
|
dr.Item("CONTROL_SQLCOMMAND_1"),
|
||||||
parent,
|
parent)
|
||||||
True)
|
|
||||||
End Select
|
End Select
|
||||||
' ContextMenuStrip zuweisen
|
' ContextMenuStrip zuweisen
|
||||||
' MasterDataID im ContextMenuStrip Speichern
|
' MasterDataID im ContextMenuStrip Speichern
|
||||||
|
|||||||
@@ -36,11 +36,11 @@ Public Class ClassHelper
|
|||||||
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 = "Data Source=" & DTConnection.Rows(0).Item("SERVER") & ";Initial Catalog= " & DTConnection.Rows(0).Item("DATABASE") & ";User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";"
|
connectionString = "Data Source=" & DTConnection.Rows(0).Item("SERVER") & ";Initial Catalog= " & 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("COMMENT").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=" & _
|
||||||
DTConnection.Rows(0).Item("DATABASE") & ")));User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";"
|
DTConnection.Rows(0).Item("DATENBANK") & ")));User Id=" & DTConnection.Rows(0).Item("USERNAME") & ";Password=" & DTConnection.Rows(0).Item("PASSWORD") & ";"
|
||||||
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
|
||||||
|
|||||||
@@ -119,27 +119,27 @@
|
|||||||
' Aktuelles Control in die Datenbank speichern
|
' Aktuelles Control in die Datenbank speichern
|
||||||
ClassControlCommands.InsertControl(CtrlBuilder.CurrentControl)
|
ClassControlCommands.InsertControl(CtrlBuilder.CurrentControl)
|
||||||
Case "cmb"
|
Case "cmb"
|
||||||
CtrlBuilder.AddComboBox("cmb" & random, 0, 0, def_font_family, def_font_color, def_font_size, def_font_style, 0, True, 0, 0, "String", True, "", "", Parent)
|
CtrlBuilder.AddComboBox("cmb" & random, 0, 0, def_font_family, def_font_color, def_font_size, def_font_style, 0, True, 0, 0, "String", True, False, "", "", Parent)
|
||||||
' Aktuelles Control in die Datenbank speichern
|
' Aktuelles Control in die Datenbank speichern
|
||||||
ClassControlCommands.InsertControl(CtrlBuilder.CurrentControl)
|
ClassControlCommands.InsertControl(CtrlBuilder.CurrentControl)
|
||||||
Case "dtp"
|
Case "dtp"
|
||||||
CtrlBuilder.AddDateTimePicker("dtp" & random, 0, 0, def_font_family, def_font_size, def_font_style, 0, False, 0, 0, True, Parent)
|
CtrlBuilder.AddDateTimePicker("dtp" & random, 0, 0, def_font_family, def_font_size, def_font_style, 0, False, 0, 0, True, True, Parent)
|
||||||
' Aktuelles Control in die Datenbank speichern
|
' Aktuelles Control in die Datenbank speichern
|
||||||
ClassControlCommands.InsertControl(CtrlBuilder.CurrentControl)
|
ClassControlCommands.InsertControl(CtrlBuilder.CurrentControl)
|
||||||
Case "dgv"
|
Case "dgv"
|
||||||
CtrlBuilder.AddDataGridView("dgv" & random, 0, 0, 0, 0, True, Parent)
|
CtrlBuilder.AddDataGridView("dgv" & random, 0, 0, 0, 0, True, False, Parent)
|
||||||
' Aktuelles Control in die Datenbank speichern
|
' Aktuelles Control in die Datenbank speichern
|
||||||
ClassControlCommands.InsertControl(CtrlBuilder.CurrentControl)
|
ClassControlCommands.InsertControl(CtrlBuilder.CurrentControl)
|
||||||
Case "chk"
|
Case "chk"
|
||||||
CtrlBuilder.AddCheckBox("chk" & random, "Bezeichn. defnieren", False, 0, 0, def_font_family, def_font_color, def_font_size, def_font_style, 0, False, 0, 0, True, Parent)
|
CtrlBuilder.AddCheckBox("chk" & random, "Bezeichn. defnieren", False, 0, 0, def_font_family, def_font_color, def_font_size, def_font_style, 0, False, 0, 0, True, False, Parent)
|
||||||
' Aktuelles Control in die Datenbank speichern
|
' Aktuelles Control in die Datenbank speichern
|
||||||
ClassControlCommands.InsertControl(CtrlBuilder.CurrentControl)
|
ClassControlCommands.InsertControl(CtrlBuilder.CurrentControl)
|
||||||
Case "rb"
|
Case "rb"
|
||||||
CtrlBuilder.AddRadioButton("rb" & random, "Bezeichn. defnieren", False, 0, 0, def_font_family, def_font_color, def_font_size, def_font_style, 0, False, 0, 0, True, Parent)
|
CtrlBuilder.AddRadioButton("rb" & random, "Bezeichn. defnieren", False, 0, 0, def_font_family, def_font_color, def_font_size, def_font_style, 0, False, 0, 0, True, False, Parent)
|
||||||
' Aktuelles Control in die Datenbank speichern
|
' Aktuelles Control in die Datenbank speichern
|
||||||
ClassControlCommands.InsertControl(CtrlBuilder.CurrentControl)
|
ClassControlCommands.InsertControl(CtrlBuilder.CurrentControl)
|
||||||
Case "pb"
|
Case "pb"
|
||||||
CtrlBuilder.AddPictureBox("pb" & random, 0, 0, 0, 0, True, Parent)
|
CtrlBuilder.AddPictureBox("pb" & random, 0, 0, 0, 0, True, False, Parent)
|
||||||
' Aktuelles Control in die Datenbank speichern
|
' Aktuelles Control in die Datenbank speichern
|
||||||
ClassControlCommands.InsertControl(CtrlBuilder.CurrentControl)
|
ClassControlCommands.InsertControl(CtrlBuilder.CurrentControl)
|
||||||
Case "gb"
|
Case "gb"
|
||||||
@@ -161,11 +161,11 @@
|
|||||||
ClassFunctionCommands.InsertFunction(ControlId, "ADDFORMDATA")
|
ClassFunctionCommands.InsertFunction(ControlId, "ADDFORMDATA")
|
||||||
End If
|
End If
|
||||||
Case "lstbxcheck"
|
Case "lstbxcheck"
|
||||||
CtrlBuilder.AddCheckedListBox("chlb" & random, 0, 0, def_font_family, def_font_color, def_font_size, def_font_style, 0, True, 0, 0, True, "", "", Parent)
|
CtrlBuilder.AddCheckedListBox("chlb" & random, 0, 0, def_font_family, def_font_color, def_font_size, def_font_style, 0, True, 0, 0, True, False, "", "", Parent)
|
||||||
' Aktuelles Control in die Datenbank speichern
|
' Aktuelles Control in die Datenbank speichern
|
||||||
ClassControlCommands.InsertControl(CtrlBuilder.CurrentControl)
|
ClassControlCommands.InsertControl(CtrlBuilder.CurrentControl)
|
||||||
Case "lstbx"
|
Case "lstbx"
|
||||||
CtrlBuilder.AddListBox("lbx" & random, 0, 0, def_font_family, def_font_color, def_font_size, def_font_style, 0, True, 0, 0, True, "", "", Parent)
|
CtrlBuilder.AddListBox("lbx" & random, 0, 0, def_font_family, def_font_color, def_font_size, def_font_style, 0, True, 0, 0, True, False, "", "", Parent)
|
||||||
' Aktuelles Control in die Datenbank speichern
|
' Aktuelles Control in die Datenbank speichern
|
||||||
ClassControlCommands.InsertControl(CtrlBuilder.CurrentControl)
|
ClassControlCommands.InsertControl(CtrlBuilder.CurrentControl)
|
||||||
Case Else
|
Case Else
|
||||||
@@ -317,6 +317,7 @@
|
|||||||
dr.Item("CTRLSCR_HEIGHT"),
|
dr.Item("CTRLSCR_HEIGHT"),
|
||||||
dr.Item("CONTROL_FORMAT_TYPE"),
|
dr.Item("CONTROL_FORMAT_TYPE"),
|
||||||
False,
|
False,
|
||||||
|
dr.Item("CONTROL_READ_ONLY"),
|
||||||
dr.Item("CONTROL_STATIC_LIST"),
|
dr.Item("CONTROL_STATIC_LIST"),
|
||||||
dr.Item("CONTROL_SQLCOMMAND_1"),
|
dr.Item("CONTROL_SQLCOMMAND_1"),
|
||||||
parent,
|
parent,
|
||||||
@@ -332,6 +333,7 @@
|
|||||||
dr.Item("CTRLSCR_TAB_STOP"),
|
dr.Item("CTRLSCR_TAB_STOP"),
|
||||||
dr.Item("CTRLSCR_WIDTH"),
|
dr.Item("CTRLSCR_WIDTH"),
|
||||||
dr.Item("CTRLSCR_HEIGHT"),
|
dr.Item("CTRLSCR_HEIGHT"),
|
||||||
|
dr.Item("CONTROL_READ_ONLY"),
|
||||||
False,
|
False,
|
||||||
parent,
|
parent,
|
||||||
True)
|
True)
|
||||||
@@ -357,6 +359,7 @@
|
|||||||
dr.Item("CTRLSCR_WIDTH"),
|
dr.Item("CTRLSCR_WIDTH"),
|
||||||
dr.Item("CTRLSCR_HEIGHT"),
|
dr.Item("CTRLSCR_HEIGHT"),
|
||||||
False,
|
False,
|
||||||
|
dr.Item("CONTROL_READ_ONLY"),
|
||||||
parent,
|
parent,
|
||||||
True)
|
True)
|
||||||
Case 7 ' DataGridView
|
Case 7 ' DataGridView
|
||||||
@@ -366,6 +369,7 @@
|
|||||||
dr.Item("CTRLSCR_WIDTH"),
|
dr.Item("CTRLSCR_WIDTH"),
|
||||||
dr.Item("CTRLSCR_HEIGHT"),
|
dr.Item("CTRLSCR_HEIGHT"),
|
||||||
False,
|
False,
|
||||||
|
dr.Item("CONTROL_READ_ONLY"),
|
||||||
parent,
|
parent,
|
||||||
True)
|
True)
|
||||||
Case 10 ' Checkbox
|
Case 10 ' Checkbox
|
||||||
@@ -389,6 +393,7 @@
|
|||||||
dr.Item("CTRLSCR_WIDTH"),
|
dr.Item("CTRLSCR_WIDTH"),
|
||||||
dr.Item("CTRLSCR_HEIGHT"),
|
dr.Item("CTRLSCR_HEIGHT"),
|
||||||
False,
|
False,
|
||||||
|
dr.Item("CONTROL_READ_ONLY"),
|
||||||
parent,
|
parent,
|
||||||
True)
|
True)
|
||||||
Case 8 'AddAppointment Button
|
Case 8 'AddAppointment Button
|
||||||
@@ -433,6 +438,7 @@
|
|||||||
dr.Item("CTRLSCR_WIDTH"),
|
dr.Item("CTRLSCR_WIDTH"),
|
||||||
dr.Item("CTRLSCR_HEIGHT"),
|
dr.Item("CTRLSCR_HEIGHT"),
|
||||||
False,
|
False,
|
||||||
|
dr.Item("CONTROL_READ_ONLY"),
|
||||||
parent,
|
parent,
|
||||||
True)
|
True)
|
||||||
Case 12 'CheckedListBox
|
Case 12 'CheckedListBox
|
||||||
@@ -448,6 +454,7 @@
|
|||||||
dr.Item("CTRLSCR_WIDTH"),
|
dr.Item("CTRLSCR_WIDTH"),
|
||||||
dr.Item("CTRLSCR_HEIGHT"),
|
dr.Item("CTRLSCR_HEIGHT"),
|
||||||
False,
|
False,
|
||||||
|
dr.Item("CONTROL_READ_ONLY"),
|
||||||
dr.Item("CONTROL_STATIC_LIST"),
|
dr.Item("CONTROL_STATIC_LIST"),
|
||||||
dr.Item("CONTROL_SQLCOMMAND_1"),
|
dr.Item("CONTROL_SQLCOMMAND_1"),
|
||||||
parent,
|
parent,
|
||||||
@@ -465,6 +472,7 @@
|
|||||||
dr.Item("CTRLSCR_WIDTH"),
|
dr.Item("CTRLSCR_WIDTH"),
|
||||||
dr.Item("CTRLSCR_HEIGHT"),
|
dr.Item("CTRLSCR_HEIGHT"),
|
||||||
False,
|
False,
|
||||||
|
dr.Item("CONTROL_READ_ONLY"),
|
||||||
dr.Item("CONTROL_STATIC_LIST"),
|
dr.Item("CONTROL_STATIC_LIST"),
|
||||||
dr.Item("CONTROL_SQLCOMMAND_1"),
|
dr.Item("CONTROL_SQLCOMMAND_1"),
|
||||||
parent,
|
parent,
|
||||||
|
|||||||
@@ -246,7 +246,8 @@
|
|||||||
props.ColumnTitle = columntitle
|
props.ColumnTitle = columntitle
|
||||||
|
|
||||||
'ReadOnly
|
'ReadOnly
|
||||||
If type = "Textbox" Then
|
If type = "Textbox" Or type = "Datepicker" Or type = "Combobox" Or type = "Picturebox" Or type = "RadioButton" Or type = "Checkbox" Or type = "CheckedListBox" _
|
||||||
|
Or type = "ListBox" Then
|
||||||
props.IsReadOnly = row.Item("CONTROL_READ_ONLY")
|
props.IsReadOnly = row.Item("CONTROL_READ_ONLY")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -267,7 +268,7 @@
|
|||||||
props.Multiline = row.Item("CONTROL_MULTILINE")
|
props.Multiline = row.Item("CONTROL_MULTILINE")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If type = "Combobox" Or type = "CheckedListBox" Or type = "ListBox" Then
|
If type = "Combobox" Or type = "CheckedListBox" Or type = "ListBox" Or type = "Textbox" Then
|
||||||
If row.Item("CONTROL_SQLCOMMAND_1").ToString.Length > 1 Then
|
If row.Item("CONTROL_SQLCOMMAND_1").ToString.Length > 1 Then
|
||||||
Dim value As New SQLValue(row.Item("CONTROL_SQLCOMMAND_1").ToString)
|
Dim value As New SQLValue(row.Item("CONTROL_SQLCOMMAND_1").ToString)
|
||||||
props.SQLCommand = value
|
props.SQLCommand = value
|
||||||
|
|||||||
Reference in New Issue
Block a user