jj: bugfixes
This commit is contained in:
@@ -230,7 +230,12 @@ Public Class frmMain
|
||||
ClassLogger.Add("CurrGroupClear - Error: " & ex.Message)
|
||||
|
||||
End Try
|
||||
Load_Profiles_for_User()
|
||||
|
||||
|
||||
If Load_Profiles_for_User() = False Then
|
||||
Throw New Exception("Could not load Profiles. Datatable is empty")
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
For Each profile As DataRow In CURR_DT_VWPM_PROFILE_ACTIVE.Rows
|
||||
Dim item1 As NavBarItem = NavBarControl1.Items.Add()
|
||||
@@ -278,14 +283,21 @@ Public Class frmMain
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Sub Load_Profiles_for_User()
|
||||
Function Load_Profiles_for_User() As Boolean
|
||||
Try
|
||||
Dim sql = String.Format("SELECT T.* FROM VWPM_PROFILE_ACTIVE T WHERE T.GUID IN (SELECT PROFILE_ID FROM [dbo].[FNPM_GET_ACTIVE_PROFILES_USER] ({0}))", CURRENT_USER_ID)
|
||||
CURR_DT_VWPM_PROFILE_ACTIVE = ClassDatabase.Return_Datatable(sql)
|
||||
|
||||
If IsNothing(CURR_DT_VWPM_PROFILE_ACTIVE) Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add("Load_Profiles_for_User - Error: " & ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
End Sub
|
||||
End Function
|
||||
Sub Layout_Single_Profile()
|
||||
If GridControl_Docs.Visible = False Then
|
||||
GridControl_Docs.Visible = True
|
||||
|
||||
Reference in New Issue
Block a user