ms
This commit is contained in:
parent
739927d325
commit
db283a5a58
@ -57,6 +57,7 @@ Public Class frmConstructor_Main
|
||||
Private NODE_NAVIGATION As Boolean = False
|
||||
Private NODE_NAVIGATION_LOADED As Boolean = False
|
||||
|
||||
Private LOAD_AT_FIRST As Boolean = False
|
||||
|
||||
Private EBENE2_PARENT_ID As Integer
|
||||
Private EBENE3_PARENT_ID As Integer
|
||||
@ -98,6 +99,7 @@ Public Class frmConstructor_Main
|
||||
Private GRID_TYPE As GridType = GridType.Tiles
|
||||
Private GRID_TYPE_ID As Integer = 1
|
||||
Private FORM_LOADED As Boolean = False
|
||||
Private FORM_SHOWN As Boolean = False
|
||||
Private SAVE_ROUTINE_ACTIVE As Boolean = False
|
||||
Private SP1 As String
|
||||
Private SP2 As String
|
||||
@ -586,7 +588,7 @@ Public Class frmConstructor_Main
|
||||
If CtrlCommandUI.IsInsert Then
|
||||
ActivateAllTabs()
|
||||
End If
|
||||
Load_Datafor_Entity()
|
||||
Load_Datafor_Entity(False)
|
||||
End If
|
||||
End If
|
||||
|
||||
@ -596,7 +598,7 @@ Public Class frmConstructor_Main
|
||||
|
||||
If Node IsNot Nothing Then
|
||||
TreeViewMain.SelectedNode = Node
|
||||
Load_Datafor_Entity()
|
||||
Load_Datafor_Entity(False)
|
||||
End If
|
||||
End If
|
||||
|
||||
@ -1175,8 +1177,15 @@ Public Class frmConstructor_Main
|
||||
SelectedNode.Text = SelectedNode.Text
|
||||
End If
|
||||
End If
|
||||
Dim fl = FORM_LOADED
|
||||
Dim firstORFOLLWOWIN
|
||||
If FORM_SHOWN = False Then
|
||||
firstORFOLLWOWIN = True
|
||||
Else
|
||||
firstORFOLLWOWIN = False
|
||||
|
||||
Load_Datafor_Entity()
|
||||
End If
|
||||
Load_Datafor_Entity(firstORFOLLWOWIN)
|
||||
If NODE_NAVIGATION = True Then
|
||||
Dim SelectedNode As TreeNode = TryCast(TreeViewMain.SelectedNode, TreeNode)
|
||||
If SelectedNode IsNot Nothing Then
|
||||
@ -1673,7 +1682,7 @@ Public Class frmConstructor_Main
|
||||
|
||||
End If
|
||||
End Function
|
||||
Sub Load_Datafor_Entity()
|
||||
Sub Load_Datafor_Entity(Optional _first As Boolean = False)
|
||||
Try
|
||||
If NODE_NAVIGATION = True Then
|
||||
If NODE_NAVIGATION_LOADED = True Then
|
||||
@ -1699,7 +1708,7 @@ Public Class frmConstructor_Main
|
||||
If FORM_DATE_FORMAT <> USER_DATE_FORMAT Then
|
||||
CURRENT_DATE_FORMAT = FORM_DATE_FORMAT
|
||||
End If
|
||||
|
||||
LOAD_AT_FIRST = result.Item("LOAD_AT_FIRST")
|
||||
If NODE_NAVIGATION = True Then
|
||||
If SelectedNode.Tag.ToString.Contains("RECORD_ID") Then
|
||||
Console.WriteLine("Record beinhaltet")
|
||||
@ -1770,7 +1779,7 @@ Public Class frmConstructor_Main
|
||||
Else
|
||||
Get_RecordCounts_Nodes()
|
||||
End If
|
||||
Load_Entity_Data(ACT_EBENE)
|
||||
Load_Entity_Data(ACT_EBENE, _first)
|
||||
|
||||
sw.Stop()
|
||||
sw.Reset()
|
||||
@ -2262,7 +2271,7 @@ Public Class frmConstructor_Main
|
||||
RECORD_CHANGED = False
|
||||
'Den derzeitigen Record Neuladen
|
||||
DisableEditMode()
|
||||
Load_Entity_Data(ACT_EBENE)
|
||||
Load_Entity_Data(ACT_EBENE, False)
|
||||
RECORD_CHANGED = False
|
||||
End If
|
||||
End If
|
||||
@ -2498,7 +2507,7 @@ Public Class frmConstructor_Main
|
||||
MsgBox("Error in GetSet_Rights:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
End Try
|
||||
End Sub
|
||||
Sub Load_Entity_Data(ClickedLevel As Integer)
|
||||
Sub Load_Entity_Data(ClickedLevel As Integer, Optional first As Boolean = False)
|
||||
Try
|
||||
Dim sw As New SW("Load_Entity_Data")
|
||||
PARENT_SKIPPED = False
|
||||
@ -2749,15 +2758,18 @@ Public Class frmConstructor_Main
|
||||
progressLoadEntity.Visible = True
|
||||
labelLoadEntity.Visible = True
|
||||
SplitContainerMain.Panel2.Enabled = False
|
||||
Dim async As New ClassAsyncSQL(_ENTITYSQL)
|
||||
async.bw.RunWorkerAsync()
|
||||
While async.bw.IsBusy
|
||||
Application.DoEvents()
|
||||
End While
|
||||
Dim DTEntity As DataTable
|
||||
If LOAD_AT_FIRST = False Then
|
||||
If first = False Then
|
||||
DTEntity = Load_ViewData_Async()
|
||||
End If
|
||||
Else
|
||||
DTEntity = Load_ViewData_Async()
|
||||
End If
|
||||
|
||||
SplitContainerMain.Panel2.Enabled = True
|
||||
progressLoadEntity.Visible = False
|
||||
labelLoadEntity.Visible = False
|
||||
Dim DTEntity As DataTable = async.dt
|
||||
|
||||
|
||||
DTEntity.TableName = "VWTEMP_PMO_FORM" & ENTITY_ID
|
||||
@ -2874,6 +2886,19 @@ Public Class frmConstructor_Main
|
||||
|
||||
|
||||
End Sub
|
||||
Function Load_ViewData_Async()
|
||||
Try
|
||||
Dim async As New ClassAsyncSQL(_ENTITYSQL)
|
||||
async.bw.RunWorkerAsync()
|
||||
While async.bw.IsBusy
|
||||
Application.DoEvents()
|
||||
End While
|
||||
Return async.dt
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Load_ViewData:" & vbNewLine & ex.Message, MsgBoxStyle.Exclamation)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
Sub Load_Record_Direct()
|
||||
Try
|
||||
grvwGrid.FocusedRowHandle = 0
|
||||
@ -3250,9 +3275,15 @@ Public Class frmConstructor_Main
|
||||
|
||||
' Alle Date Spalten durchgehen
|
||||
For Each col As String In listdate
|
||||
Dim colDate = grvwGrid.Columns(col)
|
||||
colDate.DisplayFormat.FormatType = FormatType.DateTime
|
||||
colDate.DisplayFormat.FormatString = CURRENT_DATE_FORMAT
|
||||
Dim date_edit As New DevExpress.XtraEditors.Repository.RepositoryItemTimeEdit
|
||||
date_edit.Mask.MaskType = Mask.MaskType.DateTime
|
||||
date_edit.Mask.EditMask = CURRENT_DATE_FORMAT
|
||||
date_edit.Mask.UseMaskAsDisplayFormat = True
|
||||
grvwGrid.Columns(col).ColumnEdit = date_edit
|
||||
'dateedit.DisplayFormat.FormatType = FormatType.DateTime
|
||||
'dateedit.DisplayFormat.FormatString = CURRENT_DATE_FORMAT
|
||||
'grvwGrid.Columns(col).DisplayFormat.FormatType = FormatType.DateTime
|
||||
'grvwGrid.Columns(col).DisplayFormat.FormatString = CURRENT_DATE_FORMAT
|
||||
|
||||
Next
|
||||
Try
|
||||
@ -3514,7 +3545,7 @@ Public Class frmConstructor_Main
|
||||
End If
|
||||
result = MessageBox.Show(stg, "Confirmation needed:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
|
||||
If result = MsgBoxResult.Yes Then
|
||||
Load_Datafor_Entity()
|
||||
Load_Datafor_Entity(False)
|
||||
Else
|
||||
Me.Close()
|
||||
End If
|
||||
@ -4772,7 +4803,7 @@ Public Class frmConstructor_Main
|
||||
grvwCarousel.OptionsView.ViewMode = DevExpress.XtraGrid.Views.Layout.LayoutViewMode.Carousel
|
||||
GridControlMain.MainView = grvwCarousel
|
||||
|
||||
Load_Datafor_Entity()
|
||||
Load_Datafor_Entity(False)
|
||||
End Sub
|
||||
|
||||
Private Sub ButtonQuickViewTiles_Click(sender As Object, e As EventArgs) Handles ButtonQuickViewTiles.Click
|
||||
@ -4781,7 +4812,7 @@ Public Class frmConstructor_Main
|
||||
GRID_TYPE_ID = 1
|
||||
GridControlMain.MainView = grvwTiles
|
||||
|
||||
Load_Datafor_Entity()
|
||||
Load_Datafor_Entity(False)
|
||||
End Sub
|
||||
|
||||
Private Sub ButtonDetailView_Click(sender As Object, e As EventArgs) Handles ButtonDetailView.Click
|
||||
@ -4790,7 +4821,7 @@ Public Class frmConstructor_Main
|
||||
GRID_TYPE_ID = 3
|
||||
GridControlMain.MainView = grvwGrid
|
||||
|
||||
Load_Datafor_Entity()
|
||||
Load_Datafor_Entity(False)
|
||||
End Sub
|
||||
|
||||
Private Sub ButtonSetViewAsDefault_Click(sender As Object, e As EventArgs) Handles ButtonSetViewAsDefault.Click
|
||||
@ -4819,7 +4850,7 @@ Public Class frmConstructor_Main
|
||||
If File.Exists(XMLPath) Then
|
||||
File.Delete(XMLPath)
|
||||
|
||||
Load_Entity_Data(ACT_EBENE)
|
||||
Load_Entity_Data(ACT_EBENE, False)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Error in Reset Layout Grid: " & vbNewLine & ex.Message)
|
||||
@ -5397,6 +5428,7 @@ Public Class frmConstructor_Main
|
||||
sw.Stop()
|
||||
elapsed = sw.Elapsed.TotalSeconds
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(String.Format(" >> Form Shown took {0} to load", Format(elapsed, "0.000000000") & " seconds"), False)
|
||||
FORM_SHOWN = True
|
||||
End Sub
|
||||
Sub Jump_Record()
|
||||
Try
|
||||
@ -5757,13 +5789,13 @@ Public Class frmConstructor_Main
|
||||
If result = MsgBoxResult.Yes Then
|
||||
Dim SQL = String.Format("EXEC PRDD_COPY_RECORD {0}, '{1}'", RECORD_ID, Environment.UserName)
|
||||
If ClassDatabase.Execute_non_Query_withConn(SQL, 1) = True Then
|
||||
Load_Entity_Data(ACT_EBENE)
|
||||
Load_Entity_Data(ACT_EBENE, False)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub DatenNeuLadenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DatenNeuLadenToolStripMenuItem.Click
|
||||
Load_Datafor_Entity()
|
||||
Load_Datafor_Entity(False)
|
||||
End Sub
|
||||
|
||||
Private Sub AnwendungscacheFreigebenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AnwendungscacheFreigebenToolStripMenuItem.Click
|
||||
@ -5779,7 +5811,7 @@ Public Class frmConstructor_Main
|
||||
CURRENT_FORM_ID = ENTITY_ID
|
||||
ClassControlValueCache.ClearCache()
|
||||
DisableEditMode()
|
||||
Load_Entity_Data(ACT_EBENE)
|
||||
Load_Entity_Data(ACT_EBENE, False)
|
||||
RECORD_CHANGED = False
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in Clear Cache:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
@ -6171,7 +6203,7 @@ Public Class frmConstructor_Main
|
||||
Save_Grid_Layout()
|
||||
frmMass_Change.ShowDialog()
|
||||
If SUCCESSFULL = True Then
|
||||
Load_Datafor_Entity()
|
||||
Load_Datafor_Entity(False)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in MassChange Collector:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user