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 _ _ _ Public Class DivideVAT Inherits BaseObject Public Sub New(ByVal session As Session) MyBase.New(session) End Sub Public Overrides Sub AfterConstruction() MyBase.AfterConstruction() If Me.RegistryRowsFinancial IsNot Nothing Then VAT = Me.RegistryRowsFinancial.VAT DateVAT = Me.RegistryRowsFinancial.DateVAT End If End Sub Private _RegistryRowsFinancial As RegistryRowsFinancial Private _AmountPercent As Double Private _BruttoAmount As Double Private _VAT As VAT Private _DateVAT As Date Private _Note As String _ Property RegistryRowsFinancial As RegistryRowsFinancial Get Return _RegistryRowsFinancial End Get Set(value As RegistryRowsFinancial) SetPropertyValue("RegistryRowsFinancial", _RegistryRowsFinancial, value) End Set End Property _ _ Property AmountPercent As Double Get Return _AmountPercent End Get Set(value As Double) SetPropertyValue("AmountPercent", _AmountPercent, value) If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then Me.BruttoAmount = RegistryRowsFinancial.BruttoAmount * (value / 100) End If End Set End Property Property BruttoAmount As Double Get Return _BruttoAmount End Get Set(value As Double) SetPropertyValue("BruttoAmount", _BruttoAmount, value) End Set End Property Property VAT As VAT Get Return _VAT End Get Set(value As VAT) SetPropertyValue("VAT", _VAT, value) End Set End Property Property DateVAT As Date Get Return _DateVAT End Get Set(value As Date) SetPropertyValue("DateVAT", _DateVAT, value) End Set End Property _ Property Note As String Get Return _Note End Get Set(value As String) SetPropertyValue("Note", _Note, value) End Set End Property End Class