Imports System Imports System.ComponentModel Imports DevExpress.Xpo Imports DevExpress.Data.Filtering Imports DevExpress.ExpressApp Imports DevExpress.Persistent.Base Imports DevExpress.Persistent.BaseImpl Imports DevExpress.Persistent.Validation Imports System.Drawing Imports DevExpress.ExpressApp.Utils _ Public Class ModelBOModel Inherits BaseObject Public Sub New(ByVal session As Session) MyBase.New(session) ' This constructor is used when an object is loaded from a persistent storage. ' Do not place any code here or place it only when the IsLoading property is false: ' if (!IsLoading){ ' It is now OK to place your initialization code here. ' } ' or as an alternative, move your initialization code into the AfterConstruction method. End Sub Public Overrides Sub AfterConstruction() MyBase.AfterConstruction() ' Place here your initialization code. BOModel_Create = True BOModel_Read = True BOModel_Write = True BOModel_Delete = True BOModel_Navigate = True End Sub Property BOModel_ID As String Property BOModel_ImageName As String Property BOModel_Caption As String Property BOModel_SISGroup1 As String Property BOModel_SISGroup2 As String Property BOModel_IsPopup As Boolean Property BOModel_NonPersistent As Boolean Property BOModel_Create As Boolean Property BOModel_Read As Boolean Property BOModel_Write As Boolean Property BOModel_Delete As Boolean Property BOModel_Navigate As Boolean _ ReadOnly Property Image1 As Image Get Return ImageLoader.Instance.GetImageInfo(BOModel_ImageName).Image End Get End Property _ ReadOnly Property BOModel_Create_Image As Image Get If BOModel_Create Then Return ImageLoader.Instance.GetImageInfo("Action_Grant").Image Else Return ImageLoader.Instance.GetImageInfo("Action_Deny").Image End If End Get End Property _ ReadOnly Property BOModel_Read_Image As Image Get If BOModel_Read Then Return ImageLoader.Instance.GetImageInfo("Action_Grant").Image Else Return ImageLoader.Instance.GetImageInfo("Action_Deny").Image End If End Get End Property _ ReadOnly Property BOModel_Write_Image As Image Get If BOModel_Write Then Return ImageLoader.Instance.GetImageInfo("Action_Grant").Image Else Return ImageLoader.Instance.GetImageInfo("Action_Deny").Image End If End Get End Property _ ReadOnly Property BOModel_Delete_Image As Image Get If BOModel_Delete Then Return ImageLoader.Instance.GetImageInfo("Action_Grant").Image Else Return ImageLoader.Instance.GetImageInfo("Action_Deny").Image End If End Get End Property _ ReadOnly Property BOModel_Navigate_Image As Image Get If BOModel_Navigate Then Return ImageLoader.Instance.GetImageInfo("Action_Grant").Image Else Return ImageLoader.Instance.GetImageInfo("Action_Deny").Image End If End Get End Property End Class