jj_12_01_16
This commit is contained in:
@@ -253,7 +253,8 @@ Public Class ClassControlCommandsUI
|
||||
' MasterDataID im ContextMenuStrip Speichern
|
||||
If dr.Item("CTRLSCR_MASTER_DATA_ID") <> 0 Then
|
||||
_CtrlBuilder.CurrentControl.ContextMenuStrip = _ContextMenuStrip
|
||||
_CtrlBuilder.CurrentControl.Tag = dr.Item("CTRLSCR_MASTER_DATA_ID")
|
||||
' Tag wird für ControlId verwendet, master data id bei rechtsklick herausfinden
|
||||
'_CtrlBuilder.CurrentControl.Tag = dr.Item("CTRLSCR_MASTER_DATA_ID")
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
@@ -11,28 +11,6 @@
|
||||
Return sqlCommand
|
||||
End Function
|
||||
|
||||
Public Shared Function LoadAutoValue(control As Windows.Forms.Control, RecordId As Integer, ParentRecordId As Integer)
|
||||
Dim AutoValue As String = String.Empty
|
||||
Dim ControlId As Integer = control.Tag
|
||||
Dim SQL As String = ClassDatabase.Execute_Scalar(String.Format("SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = {0}", ControlId))
|
||||
SQL = ReplaceSqlCommandPlaceholders(SQL, RecordId, ParentRecordId)
|
||||
|
||||
If SQL = "" Or IsDBNull(SQL) Then
|
||||
Return control.Text
|
||||
End If
|
||||
|
||||
AutoValue = ClassDatabase.Execute_Scalar(SQL)
|
||||
|
||||
If String.IsNullOrEmpty(AutoValue) Or IsDBNull(AutoValue) Then
|
||||
SQL = String.Format("SELECT CONTROL_TEXT FROM TBPMO_CONTROL_SCREEN WHERE CONTROL_ID = {0}", ControlId)
|
||||
Dim value = ClassDatabase.Execute_Scalar(SQL)
|
||||
Return value
|
||||
Else
|
||||
Return AutoValue
|
||||
End If
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Public Class _ListControl : Inherits _BaseControl
|
||||
@@ -47,10 +25,12 @@
|
||||
|
||||
Private Shared Function CheckForStaticList(controlId As Integer, recordId As Integer) As List(Of String)
|
||||
Try
|
||||
Dim SQL As String = String.Format("SELECT VALUE FROM VWPMO_VALUES WHERE CONTROL_ID = {0} AND RECORD_ID = {1}", controlId, recordId)
|
||||
' Der alte SQL Befehl hat nicht wirklich nach der StaticList geschaut o_O
|
||||
' Dim SQL As String = String.Format("SELECT VALUE FROM VWPMO_VALUES WHERE CONTROL_ID = {0} AND RECORD_ID = {1}", controlId, recordId)
|
||||
Dim SQL As String = String.Format("SELECT STATIC_LIST FROM TBPMO_CONTROL WHERE GUID = {0}", controlId)
|
||||
Dim staticList As String = ClassDatabase.Execute_Scalar(SQL)
|
||||
|
||||
If IsNothing(staticList) Then
|
||||
If IsNothing(staticList) Or String.IsNullOrWhiteSpace(staticList) Then
|
||||
Return Nothing
|
||||
Else
|
||||
Return New List(Of String)(staticList.Split(";"))
|
||||
@@ -100,6 +80,28 @@
|
||||
|
||||
Public Class Label : Inherits _BaseControl
|
||||
|
||||
Private Shared Function LoadAutoValue(control As Windows.Forms.Control, RecordId As Integer, ParentRecordId As Integer)
|
||||
Dim AutoValue As String = String.Empty
|
||||
Dim ControlId As Integer = control.Tag
|
||||
Dim SQL As String = ClassDatabase.Execute_Scalar(String.Format("SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = {0}", ControlId))
|
||||
SQL = ReplaceSqlCommandPlaceholders(SQL, RecordId, ParentRecordId)
|
||||
|
||||
If SQL = "" Or IsDBNull(SQL) Then
|
||||
Return control.Text
|
||||
End If
|
||||
|
||||
AutoValue = ClassDatabase.Execute_Scalar(SQL)
|
||||
|
||||
If String.IsNullOrEmpty(AutoValue) Or IsDBNull(AutoValue) Then
|
||||
SQL = String.Format("SELECT CONTROL_TEXT FROM TBPMO_CONTROL_SCREEN WHERE CONTROL_ID = {0}", ControlId)
|
||||
Dim value = ClassDatabase.Execute_Scalar(SQL)
|
||||
Return value
|
||||
Else
|
||||
Return AutoValue
|
||||
End If
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Sub LoadValue(control As Windows.Forms.Label, recordId As Integer, parentRecordId As Integer, value As String)
|
||||
Dim autoValue = LoadAutoValue(control, recordId, parentRecordId)
|
||||
|
||||
@@ -154,7 +156,7 @@
|
||||
|
||||
Public Class Combobox : Inherits _ListControl
|
||||
|
||||
Public Shared Sub LoadValue(control As Windows.Forms.ComboBox, value As String)
|
||||
Public Shared Sub LoadValue(control As Windows.Forms.ComboBox, recordId As Integer, parentRecordId As Integer, value As String)
|
||||
control.Text = value
|
||||
End Sub
|
||||
|
||||
@@ -168,16 +170,42 @@
|
||||
|
||||
If dynamic.DataTable IsNot Nothing AndAlso dynamic.DataTable.Rows.Count > 0 Then
|
||||
Dim dt As DataTable = dynamic.DataTable
|
||||
Dim columnCount As Integer = dt.Columns.Count
|
||||
|
||||
control.DataSource = dt
|
||||
If dt.Columns.Count = 1 Then
|
||||
Dim sw2 = Stopwatch.StartNew()
|
||||
|
||||
'' Damit beim Setzen von DisplayMember und ValueMember kein Fehler auftritt,
|
||||
'' muss die Datasource zunächst geleert werden und der selected index auf -1 gesetzt werden.
|
||||
control.DataSource = Nothing
|
||||
control.SelectedIndex = -1
|
||||
|
||||
' Es ist wichtig, dass DisplayMember und ValueMember VOR der DataSource festgelegt werden,
|
||||
' Dadurch ist das Laden der Datasource um einiges SCHNELLER
|
||||
If columnCount = 1 Then
|
||||
control.DisplayMember = dt.Columns(0).ColumnName
|
||||
control.ValueMember = dt.Columns(0).ColumnName
|
||||
ElseIf dt.Columns.Count = 2 Then
|
||||
ElseIf columnCount = 2 Then
|
||||
control.DisplayMember = dt.Columns(1).ColumnName
|
||||
control.ValueMember = dt.Columns(0).ColumnName
|
||||
End If
|
||||
|
||||
' Als letztes setzen wir die DataSource
|
||||
control.DataSource = dt
|
||||
|
||||
' Die alte Methode:
|
||||
'control.DataSource = dt
|
||||
'If dt.Columns.Count = 1 Then
|
||||
' control.DisplayMember = dt.Columns(0).ColumnName
|
||||
' control.ValueMember = dt.Columns(0).ColumnName
|
||||
'ElseIf dt.Columns.Count = 2 Then
|
||||
' control.DisplayMember = dt.Columns(1).ColumnName
|
||||
' control.ValueMember = dt.Columns(0).ColumnName
|
||||
'End If
|
||||
|
||||
sw2.Stop()
|
||||
Console.WriteLine("Assingning the DataSource took {0}ms", sw2.ElapsedMilliseconds)
|
||||
|
||||
|
||||
CalculateDropdownWidth(control, dt)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
@@ -135,7 +135,8 @@ Public Class ClassControlValues
|
||||
#Region "#### ClassControlValues REWRITE ####"
|
||||
Public Shared Sub LoadControlValuesNeu(RecordId As Integer, ParentRecordId As Integer, FormId As Integer, controls As Control.ControlCollection)
|
||||
Try
|
||||
Dim SQL As String = String.Format("SELECT * FROM VWPMO_VALUES WHERE VALUE <> '' AND RECORD_ID = {0}", RecordId)
|
||||
'Dim SQL As String = String.Format("SELECT * FROM VWPMO_VALUES WHERE VALUE <> '' AND RECORD_ID = {0}", RecordId)
|
||||
Dim SQL As String = String.Format("SELECT * FROM VWPMO_VALUES WHERE RECORD_ID = {0}", RecordId)
|
||||
Dim DT_ControlValues As DataTable = ClassDatabase.Return_Datatable(SQL, "LoadControlValues")
|
||||
|
||||
If controls.Count = 0 Then
|
||||
@@ -180,7 +181,7 @@ Public Class ClassControlValues
|
||||
|
||||
Case GetType(ComboBox)
|
||||
Dim combobox As ComboBox = DirectCast(control, ComboBox)
|
||||
ControlLoader.Combobox.LoadValue(combobox, value)
|
||||
ControlLoader.Combobox.LoadValue(combobox, recordId, parentRecordId, value)
|
||||
|
||||
Case GetType(CheckBox)
|
||||
Dim checkbox As CheckBox = DirectCast(control, CheckBox)
|
||||
@@ -227,68 +228,10 @@ Public Class ClassControlValues
|
||||
|
||||
For Each Ctrl As Control In controls
|
||||
If TypeOf Ctrl Is ComboBox Then
|
||||
Dim ControlId = Ctrl.Tag
|
||||
Dim swInner As Stopwatch = Stopwatch.StartNew()
|
||||
Dim combobox As ComboBox = DirectCast(Ctrl, ComboBox)
|
||||
ControlLoader.Combobox.LoadList(combobox, FormID, RecordID, ParentRecordId)
|
||||
|
||||
Dim Combobox = DirectCast(Ctrl, ComboBox)
|
||||
|
||||
Dim SQL As String = String.Format("SELECT SQL_COMMAND_1 FROM TBPMO_CONTROL WHERE GUID = {0}", ControlId) 'CURRENT_FORM_ID, Ctrl.Name)
|
||||
Dim SQL2 As String = ClassDatabase.Execute_Scalar(SQL)
|
||||
|
||||
If SQL2 = "" Then
|
||||
Continue For
|
||||
End If
|
||||
If SQL2.ToString.ToUpper.Contains("@") Then
|
||||
SQL2 = SQL2.ToString.Replace("@RECORDID", CURRENT_RECORD_ID)
|
||||
SQL2 = SQL2.ToString.Replace("@RECORD_ID", CURRENT_RECORD_ID)
|
||||
SQL2 = SQL2.ToString.Replace("@PARENTRECORD_ID", CURRENT_PARENTID)
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add(">> SQL Combobox: " & cmbSql, False)
|
||||
End If
|
||||
|
||||
'Dim controlId As Integer = GetControlID_for_Name(Combobox.Name, FormID)
|
||||
'Dim DT_Combobox As DataTable = ClassDatabase.Return_Datatable(SQL2)
|
||||
|
||||
' Zuerst versuchen, DataTable aus dem Cache zu laden
|
||||
Dim DT_Combobox As DataTable = ClassControlValueCache.LoadFromCache(FormID, ControlId)
|
||||
' Wenn DataTable nicht im Cache vorhanden, aus der Datenbank laden
|
||||
If IsNothing(DT_Combobox) Then
|
||||
DT_Combobox = ClassDatabase.Return_Datatable(SQL2)
|
||||
End If
|
||||
|
||||
If DT_Combobox Is Nothing = False Then
|
||||
If DT_Combobox.Rows.Count > 0 Then
|
||||
Combobox.DataSource = DT_Combobox
|
||||
Combobox.DisplayMember = DT_Combobox.Columns(1).ColumnName
|
||||
Combobox.ValueMember = DT_Combobox.Columns(0).ColumnName
|
||||
|
||||
ClassControlValueCache.SaveToCache(FormID, ControlId, DT_Combobox)
|
||||
End If
|
||||
|
||||
Dim iWidestWidth As Integer = 300
|
||||
For Each row As DataRow In DT_Combobox.Rows
|
||||
'Die BReite der DropDown-Lsit anpassen
|
||||
Using g As Graphics = Combobox.CreateGraphics
|
||||
If g.MeasureString(row.Item(1).ToString, Combobox.Font).Width + 30 > iWidestWidth Then
|
||||
iWidestWidth = g.MeasureString(row.Item(1).ToString, Combobox.Font).Width + 30
|
||||
End If
|
||||
g.Dispose()
|
||||
End Using
|
||||
' control.Items.Add(row.Item(0).ToString)
|
||||
Next
|
||||
|
||||
If iWidestWidth > 300 Then
|
||||
Combobox.DropDownWidth = Math.Max(iWidestWidth, Combobox.Width)
|
||||
End If
|
||||
|
||||
'LoadControlValue(RecordID, ControlId, Ctrl)
|
||||
LoadControlValueNeu(RecordID, ParentRecordId, ControlId, Ctrl, "")
|
||||
End If
|
||||
|
||||
swInner.Stop()
|
||||
Console.WriteLine("Loading List for Control {0} took {1} milliseconds", Ctrl.Name, swInner.ElapsedMilliseconds)
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
|
||||
SW.Stop()
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraPdfViewer.PdfViewer, DevExpress.XtraPdfViewer.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraVerticalGrid.VGridControl, DevExpress.XtraVerticalGrid.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraPdfViewer.PdfViewer, DevExpress.XtraPdfViewer.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraBars.Navigation.TileNavPane, DevExpress.XtraBars.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraBars.Navigation.TileNavPane, DevExpress.XtraBars.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v15.1, Version=15.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
DevExpress.XtraPdfViewer.PdfViewer, DevExpress.XtraPdfViewer.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
|
||||
@@ -23,9 +23,9 @@ Partial Class frmForm_Constructor_Main_2
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim GridLevelNode1 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
|
||||
Dim GridLevelNode2 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
|
||||
Dim GridLevelNode3 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
|
||||
Dim GridLevelNode4 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
|
||||
Dim GridLevelNode5 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
|
||||
Dim GridLevelNode6 As DevExpress.XtraGrid.GridLevelNode = New DevExpress.XtraGrid.GridLevelNode()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmForm_Constructor_Main_2))
|
||||
Me.grvwGrid = New DevExpress.XtraGrid.Views.Grid.GridView()
|
||||
Me.GridControlMain = New DevExpress.XtraGrid.GridControl()
|
||||
@@ -179,7 +179,6 @@ Partial Class frmForm_Constructor_Main_2
|
||||
Me.grvwGrid.GridControl = Me.GridControlMain
|
||||
Me.grvwGrid.GroupPanelText = "Ziehen Sie Spaltenüberschriften in diesen Bereich um nach diesen gruppieren zu la" & _
|
||||
"ssen"
|
||||
Me.grvwGrid.HorzScrollVisibility = DevExpress.XtraGrid.Views.Base.ScrollVisibility.Always
|
||||
Me.grvwGrid.Name = "grvwGrid"
|
||||
Me.grvwGrid.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.[False]
|
||||
Me.grvwGrid.OptionsBehavior.AllowDeleteRows = DevExpress.Utils.DefaultBoolean.[False]
|
||||
@@ -193,6 +192,7 @@ Partial Class frmForm_Constructor_Main_2
|
||||
Me.grvwGrid.OptionsView.EnableAppearanceEvenRow = True
|
||||
Me.grvwGrid.OptionsView.EnableAppearanceOddRow = True
|
||||
Me.grvwGrid.OptionsView.ShowAutoFilterRow = True
|
||||
Me.grvwGrid.VertScrollVisibility = DevExpress.XtraGrid.Views.Base.ScrollVisibility.Always
|
||||
'
|
||||
'GridControlMain
|
||||
'
|
||||
@@ -200,16 +200,16 @@ Partial Class frmForm_Constructor_Main_2
|
||||
Me.GridControlMain.ContextMenuStrip = Me.ContextMenuGrid
|
||||
Me.GridControlMain.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GridControlMain.Font = New System.Drawing.Font("Tahoma", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
GridLevelNode1.LevelTemplate = Me.grvwGrid
|
||||
GridLevelNode1.RelationName = "Level1"
|
||||
GridLevelNode2.LevelTemplate = Me.grvwCarousel
|
||||
GridLevelNode2.RelationName = "Level2"
|
||||
GridLevelNode3.RelationName = "Level3"
|
||||
Me.GridControlMain.LevelTree.Nodes.AddRange(New DevExpress.XtraGrid.GridLevelNode() {GridLevelNode1, GridLevelNode2, GridLevelNode3})
|
||||
GridLevelNode4.LevelTemplate = Me.grvwGrid
|
||||
GridLevelNode4.RelationName = "Level1"
|
||||
GridLevelNode5.LevelTemplate = Me.grvwCarousel
|
||||
GridLevelNode5.RelationName = "Level2"
|
||||
GridLevelNode6.RelationName = "Level3"
|
||||
Me.GridControlMain.LevelTree.Nodes.AddRange(New DevExpress.XtraGrid.GridLevelNode() {GridLevelNode4, GridLevelNode5, GridLevelNode6})
|
||||
Me.GridControlMain.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GridControlMain.MainView = Me.grvwTiles
|
||||
Me.GridControlMain.Name = "GridControlMain"
|
||||
Me.GridControlMain.Size = New System.Drawing.Size(788, 270)
|
||||
Me.GridControlMain.Size = New System.Drawing.Size(795, 270)
|
||||
Me.GridControlMain.TabIndex = 0
|
||||
Me.GridControlMain.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.grvwCarousel, Me.grvwTiles, Me.grvwGrid})
|
||||
'
|
||||
@@ -464,7 +464,7 @@ Partial Class frmForm_Constructor_Main_2
|
||||
Me.SplitContainerBottom.Panel1.Text = "Panel1"
|
||||
Me.SplitContainerBottom.Panel2.Controls.Add(Me.Panel2)
|
||||
Me.SplitContainerBottom.Panel2.Text = "Panel2"
|
||||
Me.SplitContainerBottom.Size = New System.Drawing.Size(1083, 365)
|
||||
Me.SplitContainerBottom.Size = New System.Drawing.Size(1083, 372)
|
||||
Me.SplitContainerBottom.SplitterPosition = 576
|
||||
Me.SplitContainerBottom.TabIndex = 0
|
||||
Me.SplitContainerBottom.Text = "SplitContainerControl1"
|
||||
@@ -480,7 +480,7 @@ Partial Class frmForm_Constructor_Main_2
|
||||
Me.TCDetails.Location = New System.Drawing.Point(0, 25)
|
||||
Me.TCDetails.Name = "TCDetails"
|
||||
Me.TCDetails.SelectedTabPage = Me.TabDetails
|
||||
Me.TCDetails.Size = New System.Drawing.Size(1071, 340)
|
||||
Me.TCDetails.Size = New System.Drawing.Size(1078, 347)
|
||||
Me.TCDetails.TabIndex = 1
|
||||
Me.TCDetails.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.TabDetails, Me.TabWindream, Me.TabFollowUp, Me.TabPos})
|
||||
'
|
||||
@@ -489,7 +489,7 @@ Partial Class frmForm_Constructor_Main_2
|
||||
Me.TabDetails.Controls.Add(Me.pnlDetails)
|
||||
Me.TabDetails.Image = Global.DD_Record_Organiser.My.Resources.Resources.grid_Data_16xMD
|
||||
Me.TabDetails.Name = "TabDetails"
|
||||
Me.TabDetails.Size = New System.Drawing.Size(1069, 312)
|
||||
Me.TabDetails.Size = New System.Drawing.Size(1072, 316)
|
||||
Me.TabDetails.Text = "Detailansicht"
|
||||
'
|
||||
'pnlDetails
|
||||
@@ -498,7 +498,7 @@ Partial Class frmForm_Constructor_Main_2
|
||||
Me.pnlDetails.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.pnlDetails.Location = New System.Drawing.Point(0, 0)
|
||||
Me.pnlDetails.Name = "pnlDetails"
|
||||
Me.pnlDetails.Size = New System.Drawing.Size(1069, 312)
|
||||
Me.pnlDetails.Size = New System.Drawing.Size(1072, 316)
|
||||
Me.pnlDetails.TabIndex = 0
|
||||
'
|
||||
'TabWindream
|
||||
@@ -507,7 +507,7 @@ Partial Class frmForm_Constructor_Main_2
|
||||
Me.TabWindream.Controls.Add(Me.ToolStripDokumente)
|
||||
Me.TabWindream.Image = Global.DD_Record_Organiser.My.Resources.Resources.Files_7954
|
||||
Me.TabWindream.Name = "TabWindream"
|
||||
Me.TabWindream.Size = New System.Drawing.Size(1069, 312)
|
||||
Me.TabWindream.Size = New System.Drawing.Size(1072, 316)
|
||||
Me.TabWindream.Text = "windream-Dateien"
|
||||
'
|
||||
'AxObjectListControl
|
||||
@@ -518,7 +518,7 @@ Partial Class frmForm_Constructor_Main_2
|
||||
Me.AxObjectListControl.Location = New System.Drawing.Point(0, 25)
|
||||
Me.AxObjectListControl.Name = "AxObjectListControl"
|
||||
Me.AxObjectListControl.OcxState = CType(resources.GetObject("AxObjectListControl.OcxState"), System.Windows.Forms.AxHost.State)
|
||||
Me.AxObjectListControl.Size = New System.Drawing.Size(1069, 287)
|
||||
Me.AxObjectListControl.Size = New System.Drawing.Size(1072, 291)
|
||||
Me.AxObjectListControl.TabIndex = 6
|
||||
Me.AxObjectListControl.TabStop = False
|
||||
'
|
||||
@@ -528,7 +528,7 @@ Partial Class frmForm_Constructor_Main_2
|
||||
Me.ToolStripDokumente.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tslblWindreamView, Me.ToolStripDropDownButton2})
|
||||
Me.ToolStripDokumente.Location = New System.Drawing.Point(0, 0)
|
||||
Me.ToolStripDokumente.Name = "ToolStripDokumente"
|
||||
Me.ToolStripDokumente.Size = New System.Drawing.Size(1069, 25)
|
||||
Me.ToolStripDokumente.Size = New System.Drawing.Size(1072, 25)
|
||||
Me.ToolStripDokumente.TabIndex = 2
|
||||
Me.ToolStripDokumente.Text = "ToolStrip2"
|
||||
'
|
||||
@@ -562,7 +562,7 @@ Partial Class frmForm_Constructor_Main_2
|
||||
Me.TabFollowUp.Controls.Add(Me.Label5)
|
||||
Me.TabFollowUp.Image = Global.DD_Record_Organiser.My.Resources.Resources.Task_16xMD
|
||||
Me.TabFollowUp.Name = "TabFollowUp"
|
||||
Me.TabFollowUp.Size = New System.Drawing.Size(1069, 312)
|
||||
Me.TabFollowUp.Size = New System.Drawing.Size(1072, 316)
|
||||
Me.TabFollowUp.Text = "Wiedervorlage"
|
||||
'
|
||||
'ListViewFollowUps
|
||||
@@ -741,7 +741,7 @@ Partial Class frmForm_Constructor_Main_2
|
||||
Me.TabPos.Image = CType(resources.GetObject("TabPos.Image"), System.Drawing.Image)
|
||||
Me.TabPos.Name = "TabPos"
|
||||
Me.TabPos.PageVisible = False
|
||||
Me.TabPos.Size = New System.Drawing.Size(1069, 312)
|
||||
Me.TabPos.Size = New System.Drawing.Size(1072, 316)
|
||||
Me.TabPos.Text = "Positionen"
|
||||
'
|
||||
'Panel1
|
||||
@@ -750,7 +750,7 @@ Partial Class frmForm_Constructor_Main_2
|
||||
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.Panel1.Location = New System.Drawing.Point(0, 25)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(1069, 287)
|
||||
Me.Panel1.Size = New System.Drawing.Size(1072, 291)
|
||||
Me.Panel1.TabIndex = 2
|
||||
'
|
||||
'GridControlPos
|
||||
@@ -759,7 +759,7 @@ Partial Class frmForm_Constructor_Main_2
|
||||
Me.GridControlPos.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GridControlPos.MainView = Me.grvwGridPos
|
||||
Me.GridControlPos.Name = "GridControlPos"
|
||||
Me.GridControlPos.Size = New System.Drawing.Size(1069, 287)
|
||||
Me.GridControlPos.Size = New System.Drawing.Size(1072, 291)
|
||||
Me.GridControlPos.TabIndex = 0
|
||||
Me.GridControlPos.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.grvwGridPos})
|
||||
'
|
||||
@@ -786,7 +786,7 @@ Partial Class frmForm_Constructor_Main_2
|
||||
Me.BindingNavigatorPOS.MovePreviousItem = Me.BindingNavigatorMovePreviousItem
|
||||
Me.BindingNavigatorPOS.Name = "BindingNavigatorPOS"
|
||||
Me.BindingNavigatorPOS.PositionItem = Me.BindingNavigatorPositionItem
|
||||
Me.BindingNavigatorPOS.Size = New System.Drawing.Size(1069, 25)
|
||||
Me.BindingNavigatorPOS.Size = New System.Drawing.Size(1072, 25)
|
||||
Me.BindingNavigatorPOS.TabIndex = 1
|
||||
Me.BindingNavigatorPOS.Text = "BindingNavigator1"
|
||||
'
|
||||
@@ -881,7 +881,7 @@ Partial Class frmForm_Constructor_Main_2
|
||||
Me.ToolStripEdit.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsButtonAdd, Me.tsButtonSave, Me.tsButtonDelete, Me.tsButtonEditMode, Me.ToolStripDropDownButton1, Me.tsButtonShowTaskOverview, Me.tsButtonShowWorkflowTasks})
|
||||
Me.ToolStripEdit.Location = New System.Drawing.Point(0, 0)
|
||||
Me.ToolStripEdit.Name = "ToolStripEdit"
|
||||
Me.ToolStripEdit.Size = New System.Drawing.Size(1071, 25)
|
||||
Me.ToolStripEdit.Size = New System.Drawing.Size(1078, 25)
|
||||
Me.ToolStripEdit.TabIndex = 0
|
||||
Me.ToolStripEdit.Text = "ToolStrip1"
|
||||
'
|
||||
|
||||
@@ -154,6 +154,23 @@
|
||||
<metadata name="CMSEntity.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 93</value>
|
||||
</metadata>
|
||||
<metadata name="ToolStripDokumente.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1157, 15</value>
|
||||
</metadata>
|
||||
<metadata name="BindingNavigatorPOS.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>124, 93</value>
|
||||
</metadata>
|
||||
<data name="TabPos.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAASdEVYdFRpdGxlAExpc3Q7QnVsbGV0O1FzfzkAAABa
|
||||
SURBVDhPY/j//z9FGEPAxsaGEYhBNF4MUw/TVADED0A0kkHMQMyCBbOCaHQDQJr/g2gkA0B8nBimDqYY
|
||||
wwXEYqyCpGCsgqRgMEGxF6CaQYEzGogjMRD/MwAARTWKOO3Nn7MAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="ToolStripEdit.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>773, 15</value>
|
||||
</metadata>
|
||||
<data name="AxObjectListControl.OcxState" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
@@ -245,17 +262,6 @@
|
||||
8l/FYwIYQ4UGBWBgAAC+0b+zuQxOnAAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="TabPos.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
|
||||
dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAASdEVYdFRpdGxlAExpc3Q7QnVsbGV0O1FzfzkAAABa
|
||||
SURBVDhPY/j//z9FGEPAxsaGEYhBNF4MUw/TVADED0A0kkHMQMyCBbOCaHQDQJr/g2gkA0B8nBimDqYY
|
||||
wwXEYqyCpGCsgqRgMEGxF6CaQYEzGogjMRD/MwAARTWKOO3Nn7MAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="ToolStripEdit.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>773, 15</value>
|
||||
</metadata>
|
||||
<metadata name="BindingSource_Entity.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>162, 11</value>
|
||||
</metadata>
|
||||
|
||||
@@ -856,7 +856,12 @@ Public Class frmForm_Constructor_Main_2
|
||||
End Try
|
||||
End Sub
|
||||
Function ReturnAmountofRecords(EntityID As Integer, PARENT_ID As Integer)
|
||||
Dim _sql As String = "SELECT T.* FROM VWTEMP_PMO_FORM" & EntityID & " AS T,TBPMO_RECORD_CONNECT T1 WHERE T.[Record-ID] = T1.RECORD2_ID AND T1.RECORD1_ID = @RecordID"
|
||||
Dim SW = Stopwatch.StartNew()
|
||||
|
||||
' Statt eine Table zurückzugeben, können wir die anzahl der Zeilen auch in der Datenbank berechnen,
|
||||
' dadurch wird die Abfrage um einiges schneller
|
||||
'Dim _sql As String = "SELECT T.* FROM VWTEMP_PMO_FORM" & EntityID & " AS T,TBPMO_RECORD_CONNECT T1 WHERE T.[Record-ID] = T1.RECORD2_ID AND T1.RECORD1_ID = @RecordID"
|
||||
Dim __sql As String = "SELECT COUNT(*) FROM ( SELECT T.* FROM VWTEMP_PMO_FORM" & EntityID & " AS T,TBPMO_RECORD_CONNECT T1 WHERE T.[Record-ID] = T1.RECORD2_ID AND T1.RECORD1_ID = @RecordID ) x"
|
||||
'Abhängig von der Entität dieAnzahl der Datensätze laden
|
||||
|
||||
' _sql = ClassDatabase.Execute_Scalar("SELECT SQL_SELECT_EBENE2 FROM VWPMO_CONSTRUCTOR_FORMS WHERE CONSTRUCT_ID = " & CONSTRUCTORID & " AND FORM_ID = " & EntityID)
|
||||
@@ -866,7 +871,8 @@ Public Class frmForm_Constructor_Main_2
|
||||
Return 99999999
|
||||
End If
|
||||
|
||||
_sql = _sql.Replace("@RecordID", EBENE1_RECID)
|
||||
'_sql = _sql.Replace("@RecordID", EBENE1_RECID)
|
||||
__sql = __sql.Replace("@RecordID", EBENE1_RECID)
|
||||
Case 2
|
||||
If EBENE2_RECID = 0 Then
|
||||
Return 99999999
|
||||
@@ -874,17 +880,24 @@ Public Class frmForm_Constructor_Main_2
|
||||
If EBENE1_RECID = 0 Then
|
||||
|
||||
End If
|
||||
_sql = _sql.Replace("@RecordID", EBENE2_RECID)
|
||||
'_sql = _sql.Replace("@RecordID", EBENE2_RECID)
|
||||
__sql = __sql.Replace("@RecordID", EBENE2_RECID)
|
||||
Case 3
|
||||
If EBENE3_RECID = 0 Then
|
||||
Return 99999999
|
||||
End If
|
||||
_sql = _sql.Replace("@RecordID", EBENE2_RECID)
|
||||
'_sql = _sql.Replace("@RecordID", EBENE2_RECID)
|
||||
__sql = __sql.Replace("@RecordID", EBENE2_RECID)
|
||||
|
||||
End Select
|
||||
|
||||
Dim DT2 As DataTable = ClassDatabase.Return_Datatable(_sql, "ReturnAmountofRecords 1")
|
||||
Return DT2.Rows.Count
|
||||
'Dim DT2 As DataTable = ClassDatabase.Return_Datatable(_sql, "ReturnAmountofRecords 1")
|
||||
Dim count As Integer = ClassDatabase.Execute_Scalar(__sql)
|
||||
|
||||
SW.Stop()
|
||||
Console.WriteLine("ReturnAmountofRecords took {0} milliseconds", SW.ElapsedMilliseconds)
|
||||
'Return DT2.Rows.Count
|
||||
Return count
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
@@ -999,7 +1012,7 @@ Public Class frmForm_Constructor_Main_2
|
||||
Lock_RecordControls(False)
|
||||
tsButtonShowWorkflowTasks.Enabled = True
|
||||
ClassControlValues.LoadDefaultValues(CURRENT_FORM_ID, SELECTED_RECORD_ID, pnlDetails.Controls)
|
||||
ClassControlValues.LoadControlValuesList(SELECTED_RECORD_ID, CURRENT_PARENTID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
'ClassControlValues.LoadControlValuesList(SELECTED_RECORD_ID, CURRENT_PARENTID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
|
||||
' Im gegensatz zu EnableEditMode muss hier nur der save button enabled werden
|
||||
tsButtonSave.Enabled = True
|
||||
@@ -1197,7 +1210,7 @@ Public Class frmForm_Constructor_Main_2
|
||||
Me.tsButtonSave.Enabled = True
|
||||
Me.tsButtonEditMode.Text = "Bearbeiten beenden"
|
||||
'Funktion zum Vollständigen load der Inhalte
|
||||
ClassControlValues.LoadControlValuesList(SELECTED_RECORD_ID, CURRENT_PARENTID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
'ClassControlValues.LoadControlValuesList(SELECTED_RECORD_ID, CURRENT_PARENTID, CURRENT_FORM_ID, CtrlBuilder.AllControls)
|
||||
RECORD_ENABLED = True
|
||||
pnlDetails.Focus()
|
||||
'If RECORD_ENABLED = False Then
|
||||
|
||||
@@ -65,9 +65,7 @@ Public NotInheritable Class frmSplash
|
||||
System.Threading.Thread.Sleep(500)
|
||||
|
||||
bw.ReportProgress(CalcProgress(2), "Initialisiere Datenbank")
|
||||
If Init.InitDatabase() = False Then
|
||||
Exit Sub
|
||||
End If
|
||||
Init.InitDatabase()
|
||||
|
||||
System.Threading.Thread.Sleep(500)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user