From fc098557748267348f965c2a508c95ce4911bdd9 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Mon, 11 Jun 2018 13:53:11 +0200 Subject: [PATCH] jj: fix exception when no profile exists --- app/DD_PM_WINDREAM/frmProfileDesigner.vb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/DD_PM_WINDREAM/frmProfileDesigner.vb b/app/DD_PM_WINDREAM/frmProfileDesigner.vb index 291891c..ff47d85 100644 --- a/app/DD_PM_WINDREAM/frmProfileDesigner.vb +++ b/app/DD_PM_WINDREAM/frmProfileDesigner.vb @@ -274,11 +274,11 @@ Public Class frmProfileDesigner TBPROFILE_GROUPTableAdapter.Fill(DD_DMSLiteDataSet.TBPROFILE_GROUP, profileId) TBDD_USERTableAdapter.FillByProfileId_NotAssigned(DD_DMSLiteDataSet.TBDD_USER, profileId) TBDD_GROUPSTableAdapter.FillByProfileId_NotAssigned(DD_DMSLiteDataSet.TBDD_GROUPS, profileId) + End If Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler beim Laden der User zu Profil:") End Try - End Sub Private Sub TBPM_USERBindingSource_AddingNew(sender As System.Object, e As System.ComponentModel.AddingNewEventArgs) Handles TBDD_USERBindingSource.AddingNew @@ -424,7 +424,11 @@ Public Class frmProfileDesigner Private Sub TabControl1_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles TabControl1.SelectedIndexChanged Select Case TabControl1.SelectedIndex Case 1 - FillProfile_User(PROFILGUIDTextBox.Text) + If PROFILGUIDTextBox.Text = String.Empty Then + MsgBox("Kein Profil angelegt oder ausgeählt", MsgBoxStyle.Critical) + Else + FillProfile_User(PROFILGUIDTextBox.Text) + End If Case 3 Refresh_log() End Select