diff --git a/app/DD-Record-Organizer/ClassDatabase.vb b/app/DD-Record-Organizer/ClassDatabase.vb index 85dc15d..eb1dd72 100644 --- a/app/DD-Record-Organizer/ClassDatabase.vb +++ b/app/DD-Record-Organizer/ClassDatabase.vb @@ -60,6 +60,7 @@ Public Class ClassDatabase Dim SQLconnect As New SqlClient.SqlConnection Dim SQLcommand As SqlClient.SqlCommand + If USE_PROXY = True And DD_LIB_Standards.clsDatabase.DB_PROXY_INITIALIZED Then SQLconnect.ConnectionString = ClassProxy.MyPROXYConnectionString Else @@ -72,7 +73,7 @@ Public Class ClassDatabase SQLconnect.Open() SQLcommand = SQLconnect.CreateCommand SQLcommand.CommandText = Select_anweisung - + SQLcommand.CommandTimeout = 180 Dim adapter1 As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(SQLcommand) Dim dt As DataTable = New DataTable() adapter1.Fill(dt) diff --git a/app/DD-Record-Organizer/frmConstructor_Main.vb b/app/DD-Record-Organizer/frmConstructor_Main.vb index ffd3378..cd72821 100644 --- a/app/DD-Record-Organizer/frmConstructor_Main.vb +++ b/app/DD-Record-Organizer/frmConstructor_Main.vb @@ -2217,8 +2217,6 @@ Public Class frmConstructor_Main _ENTITYSQL = Get_Grid_Sql(CONSTRUCTORID, ENTITY_ID, CURRENT_CONSTRUCTOR_DETAIL_ID, GRID_TYPE, USER_GUID, QuickViewSQL, IS_SINGLE_RECORD, FORM_TYPE, VIEW_ID, GridControlMain, grvwGrid) ' _ENTITYSQL = GridSQL - - 'Anzahl der Datensätze ENTITY_RECORD_COUNT = ClassDatabase.Execute_Scalar("SELECT COUNT(*) FROM TBPMO_RECORD where PARENT_RECORD = 0 AND FORM_ID = " & ENTITY_ID, True) @@ -2347,8 +2345,6 @@ Public Class frmConstructor_Main 'Überprüfen ob windream Dos angezeigt werden sollen? Check_windream_Show(act_FormViewID) - - If windream_Docshow = True Then If TCDetails.SelectedTabPage.Name = "TabWindream" Or (TCDetails.SelectedTabPage.Name = "TabDetails" And DOC_SEARCH_TAB1 = True) Then Me.GridControlDocSearch.DataSource = Nothing @@ -2360,7 +2356,6 @@ Public Class frmConstructor_Main If FORM_TYPE = 5 Or IS_SINGLE_RECORD = True Then If GET_GROUP_OR_SINGLE_RECORD(PARENT_RECORDID, True) = True Then ' Laden der Daten bedeutet nicht dass Daten vom Benutzer geändert wurden! - If IS_SINGLE_RECORD Then Show_Selected_Record_Data(RECORD_ID, True) Else @@ -2399,7 +2394,6 @@ Public Class frmConstructor_Main ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", ex.Message, ex.StackTrace) End Try - If LOCK_CONTROLS_BG_LOAD = True Then SplitContainerMain.Panel2.Enabled = True End If @@ -2418,14 +2412,16 @@ Public Class frmConstructor_Main If USER_WAN = True Then End If - - - Dim primaryKey(1) As DataColumn - primaryKey(0) = DTEntity.Columns("Record-ID") - DTEntity.PrimaryKey = primaryKey + Try + Dim primaryKey(1) As DataColumn + primaryKey(0) = DTEntity.Columns("Record-ID") + DTEntity.PrimaryKey = primaryKey + Catch ex As Exception + ClassLogger.Add("Could not set the primary Key(Record-ID): " & ex.Message, True) + End Try + DT_SELECTION = DTEntity LoadGrid_Selection() - If GRID_TYPE = GridType.Grid Then grvwGrid.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.None grvwGrid.OptionsBehavior.Editable = False @@ -5956,7 +5952,7 @@ Public Class frmConstructor_Main End If result = MessageBox.Show(msg, "Copy Record:", MessageBoxButtons.YesNo, MessageBoxIcon.Question) If result = MsgBoxResult.Yes Then - Dim SQL = String.Format("EXEC PRDD_COPY_RECORD {0}, '{1}'", RECORD_ID, USER_USERNAME) + Dim SQL = String.Format("EXEC PRPMO_COPY_RECORD {0}, '{1}'", RECORD_ID, USER_USERNAME) If ClassDatabase.Execute_non_Query_withConn(SQL, 1) = True Then Load_Entity_Data(ACT_EBENE) End If diff --git a/app/DD-Record-Organizer/frmEntities.Designer.vb b/app/DD-Record-Organizer/frmEntities.Designer.vb index 1b1f1ff..d7c3884 100644 --- a/app/DD-Record-Organizer/frmEntities.Designer.vb +++ b/app/DD-Record-Organizer/frmEntities.Designer.vb @@ -52,7 +52,7 @@ Partial Class frmEntities Me.Label4 = New System.Windows.Forms.Label() Me.SINGLE_RECORDCheckBox = New System.Windows.Forms.CheckBox() Me.NumericUpDown1 = New System.Windows.Forms.NumericUpDown() - Me.GUIDTextBox = New System.Windows.Forms.TextBox() + Me.ENTITY_IDTextBox = New System.Windows.Forms.TextBox() Me.ComboBox1 = New System.Windows.Forms.ComboBox() Me.TBPMO_FORM_TYPEBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.SHOW_FORM_CONSTRUCTCheckBox = New System.Windows.Forms.CheckBox() @@ -66,6 +66,12 @@ Partial Class frmEntities Me.lblStatus = New System.Windows.Forms.Label() Me.btnGenerate = New System.Windows.Forms.Button() Me.Label3 = New System.Windows.Forms.Label() + Me.GroupBox1 = New System.Windows.Forms.GroupBox() + Me.btncancel = New System.Windows.Forms.Button() + Me.ProgressPanel1 = New DevExpress.XtraWaitForm.ProgressPanel() + Me.btnRefreshEntityTable = New System.Windows.Forms.Button() + Me.btnCreateEntityTable = New System.Windows.Forms.Button() + Me.BW_Entity = New System.ComponentModel.BackgroundWorker() PARENT_IDLabel = New System.Windows.Forms.Label() NAMELabel = New System.Windows.Forms.Label() LEVELLabel = New System.Windows.Forms.Label() @@ -83,6 +89,7 @@ Partial Class frmEntities Me.GroupBox2.SuspendLayout() CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.TBPMO_FORM_TYPEBindingSource, System.ComponentModel.ISupportInitialize).BeginInit() + Me.GroupBox1.SuspendLayout() Me.SuspendLayout() ' 'PARENT_IDLabel @@ -227,6 +234,7 @@ Partial Class frmEntities Me.TableAdapterManager.TBDD_INDEX_AUTOMTableAdapter = Nothing Me.TableAdapterManager.TBDD_USER_GROUPSTableAdapter = Nothing Me.TableAdapterManager.TBDD_USERTableAdapter = Nothing + Me.TableAdapterManager.TBPMO_APPOINTMENTSTableAdapter = Nothing Me.TableAdapterManager.TBPMO_CONSTRUCTOR_USER_SQLTableAdapter = Nothing Me.TableAdapterManager.TBPMO_FOLLOW_UP_EMAILTableAdapter = Nothing Me.TableAdapterManager.TBPMO_FOLLUPEMAIL_USERTableAdapter = Nothing @@ -268,7 +276,7 @@ Partial Class frmEntities Me.GroupBox2.Controls.Add(Me.SINGLE_RECORDCheckBox) Me.GroupBox2.Controls.Add(Me.NumericUpDown1) Me.GroupBox2.Controls.Add(Me.FORM_TITLETextBox) - Me.GroupBox2.Controls.Add(Me.GUIDTextBox) + Me.GroupBox2.Controls.Add(Me.ENTITY_IDTextBox) Me.GroupBox2.Controls.Add(GUIDLabel) Me.GroupBox2.Controls.Add(Label1) Me.GroupBox2.Controls.Add(Me.ComboBox1) @@ -304,12 +312,12 @@ Partial Class frmEntities resources.ApplyResources(Me.NumericUpDown1, "NumericUpDown1") Me.NumericUpDown1.Name = "NumericUpDown1" ' - 'GUIDTextBox + 'ENTITY_IDTextBox ' - Me.GUIDTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBPMO_FORMBindingSource, "GUID", True)) - resources.ApplyResources(Me.GUIDTextBox, "GUIDTextBox") - Me.GUIDTextBox.Name = "GUIDTextBox" - Me.GUIDTextBox.ReadOnly = True + Me.ENTITY_IDTextBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.TBPMO_FORMBindingSource, "GUID", True)) + resources.ApplyResources(Me.ENTITY_IDTextBox, "ENTITY_IDTextBox") + Me.ENTITY_IDTextBox.Name = "ENTITY_IDTextBox" + Me.ENTITY_IDTextBox.ReadOnly = True ' 'ComboBox1 ' @@ -388,10 +396,52 @@ Partial Class frmEntities resources.ApplyResources(Me.Label3, "Label3") Me.Label3.Name = "Label3" ' + 'GroupBox1 + ' + Me.GroupBox1.Controls.Add(Me.btncancel) + Me.GroupBox1.Controls.Add(Me.ProgressPanel1) + Me.GroupBox1.Controls.Add(Me.btnRefreshEntityTable) + Me.GroupBox1.Controls.Add(Me.btnCreateEntityTable) + resources.ApplyResources(Me.GroupBox1, "GroupBox1") + Me.GroupBox1.Name = "GroupBox1" + Me.GroupBox1.TabStop = False + ' + 'btncancel + ' + resources.ApplyResources(Me.btncancel, "btncancel") + Me.btncancel.Name = "btncancel" + Me.btncancel.UseVisualStyleBackColor = True + ' + 'ProgressPanel1 + ' + Me.ProgressPanel1.Appearance.BackColor = CType(resources.GetObject("ProgressPanel1.Appearance.BackColor"), System.Drawing.Color) + Me.ProgressPanel1.Appearance.Options.UseBackColor = True + Me.ProgressPanel1.AppearanceCaption.Options.UseTextOptions = True + resources.ApplyResources(Me.ProgressPanel1, "ProgressPanel1") + Me.ProgressPanel1.Name = "ProgressPanel1" + ' + 'btnRefreshEntityTable + ' + resources.ApplyResources(Me.btnRefreshEntityTable, "btnRefreshEntityTable") + Me.btnRefreshEntityTable.Name = "btnRefreshEntityTable" + Me.btnRefreshEntityTable.UseVisualStyleBackColor = True + ' + 'btnCreateEntityTable + ' + resources.ApplyResources(Me.btnCreateEntityTable, "btnCreateEntityTable") + Me.btnCreateEntityTable.Name = "btnCreateEntityTable" + Me.btnCreateEntityTable.UseVisualStyleBackColor = True + ' + 'BW_Entity + ' + Me.BW_Entity.WorkerReportsProgress = True + Me.BW_Entity.WorkerSupportsCancellation = True + ' 'frmEntities ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.GroupBox1) Me.Controls.Add(Me.Label3) Me.Controls.Add(Me.btnGenerate) Me.Controls.Add(Me.lblStatus) @@ -414,6 +464,7 @@ Partial Class frmEntities Me.GroupBox2.PerformLayout() CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.TBPMO_FORM_TYPEBindingSource, System.ComponentModel.ISupportInitialize).EndInit() + Me.GroupBox1.ResumeLayout(False) Me.ResumeLayout(False) Me.PerformLayout() @@ -439,7 +490,7 @@ Partial Class frmEntities Friend WithEvents TBPMO_FORM_TYPEBindingSource As System.Windows.Forms.BindingSource Friend WithEvents TBPMO_FORM_TYPETableAdapter As DD_Record_Organizer.DD_DMSDataSetTableAdapters.TBPMO_FORM_TYPETableAdapter Friend WithEvents TreeViewEntity As System.Windows.Forms.TreeView - Friend WithEvents GUIDTextBox As System.Windows.Forms.TextBox + Friend WithEvents ENTITY_IDTextBox As System.Windows.Forms.TextBox Friend WithEvents btninsert As System.Windows.Forms.Button Friend WithEvents btndelete As System.Windows.Forms.Button Friend WithEvents btnsave As System.Windows.Forms.Button @@ -451,4 +502,10 @@ Partial Class frmEntities Friend WithEvents NumericUpDown1 As System.Windows.Forms.NumericUpDown Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents SINGLE_RECORDCheckBox As System.Windows.Forms.CheckBox + Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox + Friend WithEvents btnRefreshEntityTable As System.Windows.Forms.Button + Friend WithEvents btnCreateEntityTable As System.Windows.Forms.Button + Friend WithEvents BW_Entity As System.ComponentModel.BackgroundWorker + Friend WithEvents ProgressPanel1 As DevExpress.XtraWaitForm.ProgressPanel + Friend WithEvents btncancel As System.Windows.Forms.Button End Class diff --git a/app/DD-Record-Organizer/frmEntities.resx b/app/DD-Record-Organizer/frmEntities.resx index d29701a..7ab792c 100644 --- a/app/DD-Record-Organizer/frmEntities.resx +++ b/app/DD-Record-Organizer/frmEntities.resx @@ -480,11 +480,8 @@ $this - 10 + 11 - - 17, 17 - 1104, 17 @@ -512,9 +509,6 @@ 2 - - 1104, 17 - Segoe UI, 9.75pt @@ -650,105 +644,6 @@ 17, 56 - - Label4 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GroupBox2 - - - 3 - - - SINGLE_RECORDCheckBox - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GroupBox2 - - - 4 - - - NumericUpDown1 - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GroupBox2 - - - 5 - - - GUIDTextBox - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GroupBox2 - - - 7 - - - ComboBox1 - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GroupBox2 - - - 10 - - - SHOW_FORM_CONSTRUCTCheckBox - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - GroupBox2 - - - 11 - - - Segoe UI, 9.75pt, style=Bold - - - 328, 53 - - - 424, 499 - - - 23 - - - Entity Properties: - - - GroupBox2 - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 8 - True @@ -831,28 +726,28 @@ diese Entität angelegt werden. 5 - + Segoe UI, 9.75pt - + 147, 25 - + 69, 25 - + 23 - - GUIDTextBox + + ENTITY_IDTextBox - + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + GroupBox2 - + 7 @@ -882,9 +777,6 @@ diese Entität angelegt werden. 10 - - 255, 56 - Segoe UI, 9.75pt @@ -912,6 +804,33 @@ diese Entität angelegt werden. 11 + + Segoe UI, 9.75pt, style=Bold + + + 328, 53 + + + 424, 368 + + + 23 + + + Entity Properties: + + + GroupBox2 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 9 + Top, Bottom, Left @@ -934,7 +853,7 @@ diese Entität angelegt werden. $this - 9 + 10 497, 56 @@ -978,7 +897,7 @@ diese Entität angelegt werden. $this - 7 + 8 @@ -1025,7 +944,7 @@ diese Entität angelegt werden. $this - 6 + 7 @@ -1082,7 +1001,7 @@ diese Entität angelegt werden. $this - 5 + 6 True @@ -1112,7 +1031,7 @@ diese Entität angelegt werden. $this - 4 + 5 @@ -1153,7 +1072,7 @@ diese Entität angelegt werden. $this - 3 + 4 True @@ -1186,7 +1105,7 @@ diese Entität angelegt werden. $this - 2 + 3 @@ -1228,7 +1147,7 @@ diese Entität angelegt werden. $this - 1 + 2 True @@ -1262,8 +1181,189 @@ welche die links dargestellte TreeView-Struktur umsetzt. $this + 1 + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + xAAADsQBlSsOGwAAAQdJREFUOE+lkTEOgkAURD0CR/AIHMHQk9jSWXAAaiorWsMJOAIFPSUtCaEkSEUI + FHS03z8bVllcEsFJJq7z/7xFORHRX9aGe/w5sKZpMtlPNrEjES7E2WU51wFi3/fJsixK0xRL1zk/t20b + h2FIQRC84TpAJAG2bVNVVbjtnmXZ6DiOUoZ0AKPrutx1XQHBJ27FeV2GvgDQGrJVhrYA5mEAL3lFUYzL + n4AyzkmSAOKJxVkKADeUZSn+PFnGkyCXEMz5u3gzkAJomkYp930/8rKJRUDwBJgvcwVQ1/WIMpYA46Ub + lqQkBHA+4/UaCgCFYRgwhB9zTxHn0TyHcwVw1Npwj7Xh76bTC/0Dc9jJzNLqAAAAAElFTkSuQmCC + + + + MiddleRight + + + 400, 73 + + + 75, 31 + + + 35 + + + Cancel + + + MiddleLeft + + + False + + + btncancel + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GroupBox1 + + 0 + + Transparent + + + Procedure is executing ...... + + + 178, 66 + + + 246, 44 + + + 34 + + + ProgressPanel1 + + + False + + + ProgressPanel1 + + + DevExpress.XtraWaitForm.ProgressPanel, DevExpress.XtraEditors.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a + + + GroupBox1 + + + 1 + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAAGxJREFUOE/NjNEJgDAMBTNbVnA3v1zDQZxE/cmv8oqBECm+VgQDR9PAnWDM7Oih + yBh8VLWJnwa2daegAzJMhXz/PjDOS3ljwG/gMQAJggd8pwNRjhE6kCNRBlQAQMwyoAM1qoEWboEeLv3N + iJxnTngNYdMDJwAAAABJRU5ErkJggg== + + + + MiddleRight + + + NoControl + + + 177, 24 + + + 199, 36 + + + 1 + + + 2. Create/Renew Entity-Data + + + MiddleLeft + + + btnRefreshEntityTable + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GroupBox1 + + + 2 + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + xAAADsQBlSsOGwAAAE1JREFUOE9j+P//P8O3b9/+k4vhBjg5OZGMB6EBH95/hGNi+NQ3gFRMfRegKyDE + xzCAVEx9F6ArIMTHMIBUjGIAuRhsACUYqyDx+D8DAGWb3TPY4bxVAAAAAElFTkSuQmCC + + + + MiddleRight + + + 9, 24 + + + 162, 36 + + + 0 + + + 1. Create Entitytable + + + MiddleLeft + + + btnCreateEntityTable + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + GroupBox1 + + + 3 + + + 328, 427 + + + 596, 110 + + + 32 + + + Erzeugung Tabellenstruktur: + + + GroupBox1 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + 733, 56 + True @@ -1791,6 +1891,12 @@ welche die links dargestellte TreeView-Struktur umsetzt. DD_Record_Organizer.DD_DMSDataSetTableAdapters.TBPMO_FORM_TYPETableAdapter, DD_DMSDataSet.Designer.vb, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + + BW_Entity + + + System.ComponentModel.BackgroundWorker, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + frmEntities diff --git a/app/DD-Record-Organizer/frmEntities.vb b/app/DD-Record-Organizer/frmEntities.vb index 880a3e3..72abe83 100644 --- a/app/DD-Record-Organizer/frmEntities.vb +++ b/app/DD-Record-Organizer/frmEntities.vb @@ -1,4 +1,6 @@ Imports DevExpress.XtraTreeList +Imports System.ComponentModel + Public Class frmEntities Sub New() @@ -13,7 +15,8 @@ Public Class frmEntities _Instance.BringToFront() Return _Instance End Function - + Private EXECUTE_STATEMENT As String + Private DT_RESULT As DataTable Private Sub frmForm_Overview_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing Try ClassWindowLocation.SaveFormLocationSize(Me, 1, CURRENT_SCREEN_ID, "frmForm_Overview") @@ -34,7 +37,7 @@ Public Class frmEntities Me.TBPMO_FORM_TYPETableAdapter.Fill(Me.DD_DMSDataSet.TBPMO_FORM_TYPE) ClassWindowLocation.LoadFormLocationSize(Me, 1, CURRENT_SCREEN_ID, "frmForm_Overview") LoadLayout() - + AddHandler BW_Entity.DoWork, AddressOf bw_DoWork @@ -160,8 +163,8 @@ Public Class frmEntities Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs) Handles ToolStripButton1.Click Try - If GUIDTextBox.Text <> "" Then - Dim FormId As Integer = GUIDTextBox.Text 'GetCurrentGUID() + If ENTITY_IDTextBox.Text <> "" Then + Dim FormId As Integer = ENTITY_IDTextBox.Text 'GetCurrentGUID() If FormId <> -1 Then CURRENT_ENTITY_ID = FormId Open_Designer() @@ -389,4 +392,48 @@ Public Class frmEntities End If End If End Sub + + Private Sub btnCreateEntityTable_Click(sender As Object, e As EventArgs) Handles btnCreateEntityTable.Click + Dim CurrentID = GetCurrentGUID() + EXECUTE_STATEMENT = String.Format("DECLARE @return_value int " & vbNewLine & _ + "EXEC @return_value = dbo.PRPMO_CREATE_ENTITY_TABLE {0}" & vbNewLine & _ + "SELECT 'Return Value' = @return_value", CurrentID) + ProgressPanel1.Visible = True + btncancel.Visible = True + '.. und starten + BW_Entity.RunWorkerAsync() + End Sub + Private Sub bw_DoWork(ByVal sender As Object, ByVal e As DoWorkEventArgs) + DT_RESULT = ClassDatabase.Return_Datatable(EXECUTE_STATEMENT) + End Sub + Private Sub BW_Entity_ProgressChanged(sender As Object, e As System.ComponentModel.ProgressChangedEventArgs) Handles BW_Entity.ProgressChanged + + End Sub + Private Sub BW_Entity_RunWorkerCompleted(sender As Object, e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BW_Entity.RunWorkerCompleted + ProgressPanel1.Visible = False + btncancel.Visible = False + If Not IsNothing(DT_RESULT) Then + Dim result = DT_RESULT.Rows(0).Item(0) + If result <> 0 Then + MsgBox("Unexpected Error in Executing Procedure - Check the log!", MsgBoxStyle.Critical) + Else + MsgBox("Procedure was executed successfully!", MsgBoxStyle.Information) + End If + End If + End Sub + + Private Sub btncancel_Click(sender As Object, e As EventArgs) Handles btncancel.Click + BW_Entity.CancelAsync() + End Sub + + Private Sub btnRefreshEntityTable_Click(sender As Object, e As EventArgs) Handles btnRefreshEntityTable.Click + Dim CurrentID = GetCurrentGUID() + EXECUTE_STATEMENT = String.Format("DECLARE @return_value int " & vbNewLine & _ + "EXEC @return_value = dbo.PRPMO_ENTITY_TABLE_IMPORT_RECORDS {0}" & vbNewLine & _ + "SELECT 'Return Value' = @return_value", CurrentID) + ProgressPanel1.Visible = True + btncancel.Visible = True + '.. und starten + BW_Entity.RunWorkerAsync() + End Sub End Class \ No newline at end of file