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 Enum eCRMTaskType
    ePhone = 0 ' Telefonálás
    eMeeting = 1 'Találkozó
    eDoIt = 2 ' Feladat
End Enum
Public Enum eCRMTargetStage
    eClosedWON = 0
    eClosedLOST = 1
    eProspecting = 2
    eQualification = 3
    eProposal = 4
End Enum
Public Enum eCRMTargetType
    eNewBusiness = 0
    eExistingBusiness = 1
End Enum
<DefaultClassOptions()> _
<NavigationItem("CRM")> _
Public Class CRMTask
    Inherits Task
    Private _CRMTaskType As CRMTaskType
    Private _CRMTarget As CRMTarget
    Public Sub New(ByVal session As Session)
        MyBase.New(session)
    End Sub
    Property CRMTaskType() As CRMTaskType
        Get
            Return _CRMTaskType
        End Get
        Set(ByVal value As CRMTaskType)
            SetPropertyValue("CRMTaskType", _CRMTaskType, value)
        End Set
    End Property
    Property CRMTarget() As CRMTarget
        Get
            Return _CRMTarget
        End Get
        Set(ByVal value As CRMTarget)
            SetPropertyValue("CRMTarget", _CRMTarget, value)
        End Set
    End Property
    <VisibleInListView(False)> _
    ReadOnly Property CRMResults() As XPCollection
        Get
            Dim _CRMTask_Collection As XPCollection = New XPCollection(Session, GetType(CRMResults), _
                                                                       CriteriaOperator.Parse("CRMTask=?", Me))
            Return _CRMTask_Collection
        End Get
    End Property
End Class


