Imports System.Collections.Generic
Imports CharterDotCom.CommonEntities.Library.Enumerations


<Serializable()> _
Public Class BLOrder
    Implements IOrder

    Private m_confirmations As Dictionary(Of Category, IOrder.IOrderConfirmation)

    Public Sub New(ByVal confirmations As Dictionary(Of Category, IOrder.IOrderConfirmation))
        m_confirmations = confirmations
    End Sub

    Public ReadOnly Property Confirmations() As Dictionary(Of Category, IOrder.IOrderConfirmation) Implements IOrder.Confirmations
        Get
            Return m_confirmations
        End Get
    End Property

End Class

<Serializable()> _
Public Class BLOrderConfirmation
    Implements IOrder.IOrderConfirmation

    'Private  m_category As Category = BL.Entities.Category.UnSpecified
    Private m_schedules As IOrder.ISchedule
    Private m_appointment As BLInstallation
    Private m_offerID As String
    Private m_orderConfirmation As IConfirmation
    'Private  m_orderConfirmationID As String
    ' Private  m_followUpMessage As String

    Public Sub New(ByVal offerID As String, ByVal orderConfirmationID As String, ByVal followUpMessage As String, ByVal schedules As IOrder.ISchedule)
        m_schedules = schedules
        '  m_category = category
        m_appointment = Appointment
        m_offerID = offerID
        m_orderConfirmation = New BLConfirmation(orderConfirmationID, followUpMessage)
        ' m_orderConfirmationID = orderConfirmationID
        ' m_followUpMessage = followUpMessage
    End Sub

    'Public ReadOnly Property Category() As Category Implements IOrder.IConfirmation.Category
    '  Get
    '    Return  m_category
    '  End Get
    'End Property

    Public ReadOnly Property OfferID() As String
        Get
            Return m_offerID
        End Get
    End Property

    Public ReadOnly Property Confirmation() As IConfirmation Implements IOrder.IOrderConfirmation.Confirmation
        Get
            Return m_orderConfirmation
        End Get
    End Property

    'Public ReadOnly Property ConfirmationNumber() As String Implements IOrder.IOrderConfirmation.ConfirmationNumber
    '  Get
    '    Return  m_orderConfirmationID
    '  End Get
    'End Property

    'Public ReadOnly Property FollowUpMessage() As String Implements IOrder.IOrderConfirmation.FollowUpMessage
    '  Get
    '    Return  m_followUpMessage
    '  End Get
    'End Property

    Public Property Schedules() As IOrder.ISchedule
        Get
            Return m_schedules
        End Get
        Set(ByVal value As IOrder.ISchedule)
            m_schedules = value
        End Set
    End Property

    Public Property Appointment() As BLInstallation
        Get
            Return m_appointment
        End Get
        Set(ByVal value As BLInstallation)
            m_appointment = value
        End Set
    End Property

    Private ReadOnly Property OrderSchedules() As IOrder.ISchedule Implements IOrder.IOrderConfirmation.Schedules
        Get
            Return m_schedules
        End Get
    End Property

    Private ReadOnly Property Install() As IOrder.IAppointment Implements IOrder.IOrderConfirmation.Appointment
        Get
            Return m_appointment
        End Get
    End Property

End Class

<Serializable()> _
Public Class BLSchedule
    Implements IOrder.ISchedule

    Private m_type As ScheduleType
    Private m_windows As Dictionary(Of String, IOrder.IScheduleWindow)

    Public Sub New(ByVal type As ScheduleType, ByVal scheduleWindows As Dictionary(Of String, IOrder.IScheduleWindow))
        m_type = type
        m_windows = scheduleWindows
    End Sub

    Public ReadOnly Property ScheduleWindow() As Dictionary(Of String, IOrder.IScheduleWindow) Implements IOrder.ISchedule.ScheduleWindow
        Get
            Return m_windows
        End Get
    End Property

    Public ReadOnly Property Type() As ScheduleType Implements IOrder.ISchedule.Type
        Get
            Return m_type
        End Get
    End Property
End Class

<Serializable()> _
Public Class BLScheduleWindow
    Implements IOrder.IScheduleWindow

    Private m_selected As Boolean
    Private m_startTime As String
    Private m_endTime As String
    Private m_id As String
    Private m_installDate As String

    Public Sub New(ByVal id As String, ByVal startTime As String, ByVal endTime As String, ByVal installDate As String)
        m_id = id
        m_startTime = startTime
        m_endTime = endTime
        m_installDate = installDate
    End Sub

    Public ReadOnly Property EndTime() As String Implements IOrder.IScheduleWindow.EndTime
        Get
            Return m_endTime
        End Get
    End Property

    Public ReadOnly Property InstallDate() As String Implements IOrder.IScheduleWindow.ScheduleDate
        Get
            Return m_installDate
        End Get
    End Property

    Public ReadOnly Property ID() As String Implements IOrder.IScheduleWindow.ID
        Get
            Return m_id
        End Get
    End Property

    Public ReadOnly Property IsSelected() As Boolean Implements IOrder.IScheduleWindow.IsSelected
        Get
            Return m_selected
        End Get
    End Property

    Public ReadOnly Property StartTime() As String Implements IOrder.IScheduleWindow.StartTime
        Get
            Return m_startTime
        End Get
    End Property

    Public WriteOnly Property Selected() As Boolean
        Set(ByVal value As Boolean)
            m_selected = value
        End Set
    End Property

End Class

<Serializable()> _
Public Class BLInstallation
    Implements IOrder.IAppointment

    Private m_id As String
    Private m_confirmation As IConfirmation
    'Private  m_confirmationNumber As String
    'Private  m_message As String
    Private m_starttime As String
    Private m_endtime As String
    Private m_date As String

    Public Sub New(ByVal id As String, ByVal confirmationNumber As String, ByVal message As String, ByVal installDate As String, ByVal startTime As String, ByVal endTime As String)
        m_id = id
        ' m_confirmationNumber = confirmationNumber
        ' m_message = message
        m_confirmation = New BLConfirmation(confirmationNumber, message)
        m_date = installDate
        m_starttime = startTime
        m_endtime = endTime
    End Sub

    Public ReadOnly Property ID() As String
        Get
            Return m_id
        End Get
    End Property

    Public ReadOnly Property Confirmation() As IConfirmation Implements IOrder.IAppointment.Confirmation
        Get
            Return m_confirmation
        End Get
    End Property

    'Public ReadOnly Property ConfirmationNumber() As String Implements IOrder.IAppointment.ConfirmationNumber
    '  Get
    '    Return  m_confirmationNumber
    '  End Get
    'End Property

    'Public ReadOnly Property FollowUpMessage() As String Implements IOrder.IAppointment.FollowUpMessage
    '  Get
    '    Return  m_message
    '  End Get
    'End Property

    Public Property StartTime() As String
        Get
            Return m_starttime
        End Get
        Set(ByVal value As String)
            m_starttime = value
        End Set
    End Property

    Public Property EndTime() As String
        Get
            Return m_endtime
        End Get
        Set(ByVal value As String)
            m_endtime = value
        End Set
    End Property

    Public Property InstallDate() As String
        Get
            Return m_date
        End Get
        Set(ByVal value As String)
            m_date = value
        End Set
    End Property

    Private ReadOnly Property InstallEndTime() As String Implements IOrder.IAppointment.EndTime
        Get
            Return m_endtime
        End Get
    End Property

    Private ReadOnly Property InstallationDate() As String Implements IOrder.IAppointment.InstallDate
        Get
            Return m_date
        End Get
    End Property

    Private ReadOnly Property InstallStartTime() As String Implements IOrder.IAppointment.StartTime
        Get
            Return m_starttime
        End Get
    End Property

End Class

<Serializable()> _
Public Class BLConfirmation
    Implements IConfirmation

    Private m_message As String
    Private m_number As String

    Public Sub New(ByVal number As String, ByVal message As String)
        m_message = message
        m_number = number
    End Sub
    Public ReadOnly Property Message() As String Implements IConfirmation.Message
        Get
            Return m_message
        End Get
    End Property

    Public ReadOnly Property Number() As String Implements IConfirmation.Number
        Get
            Return m_number
        End Get
    End Property
End Class

<Serializable()> _
Public Class BLELOA
    Implements IOrder.IELOA

    Private m_userIDField As String
    Private m_passwordField As String
    Private m_eLOANameField As String
    Private m_versionField As String
    Private m_dNISField As String
    Private m_telephoneNbrField As String
    Private m_firstNameField As String
    Private m_lastNameField As String
    Private m_affiliateIDField As String
    Private m_affiliateNameField As String
    Private m_affiliateTypeField As String
    Private m_decisionMakerField As String
    Private m_securityTypeField As String
    Private m_securityValueField As String
    Private m_localField As String
    Private m_localTollField As String
    Private m_longDistanceField As String
    Private m_e911Field As String
    Private m_statusField As String
    Private m_reasonCodeField As String
    Private m_wTNsField() As String

    Public Sub New(ByVal userIDField As String, ByVal passwordField As String, ByVal eLOANameField As String, ByVal versionField As String, ByVal dNISField As String, ByVal telephoneNbrField As String, ByVal firstNameField As String, ByVal lastNameField As String, ByVal affiliateIDField As String, ByVal affiliateNameField As String, ByVal affiliateTypeField As String, ByVal decisionMakerField As String, ByVal securityTypeField As String, ByVal securityValueField As String, ByVal localField As String, ByVal localTollField As String, ByVal longDistanceField As String, ByVal e911Field As String, ByVal statusField As String, ByVal reasonCodeField As String, ByVal wTNsField() As String)
        m_userIDField = userIDField
        m_passwordField = passwordField
        m_eLOANameField = eLOANameField
        m_versionField = versionField
        m_dNISField = dNISField
        m_telephoneNbrField = telephoneNbrField
        m_firstNameField = firstNameField
        m_lastNameField = lastNameField
        m_affiliateIDField = affiliateIDField
        m_affiliateNameField = affiliateNameField
        m_affiliateTypeField = affiliateTypeField
        m_decisionMakerField = decisionMakerField
        m_securityTypeField = securityTypeField
        m_securityValueField = securityValueField
        m_localField = localField
        m_localTollField = localTollField
        m_longDistanceField = longDistanceField
        m_e911Field = e911Field
        m_statusField = statusField
        m_reasonCodeField = reasonCodeField
        m_wTNsField = wTNsField
    End Sub

    Public ReadOnly Property affiliateIDField() As String Implements IOrder.IELOA.affiliateIDField
        Get
            Return m_affiliateIDField
        End Get
    End Property
    Public ReadOnly Property affiliateNameField() As String Implements IOrder.IELOA.affiliateNameField
        Get
            Return m_affiliateNameField
        End Get
    End Property
    Public ReadOnly Property affiliateTypeField() As String Implements IOrder.IELOA.affiliateTypeField
        Get
            Return m_affiliateTypeField
        End Get
    End Property
    Public ReadOnly Property decisionMakerField() As String Implements IOrder.IELOA.decisionMakerField
        Get
            Return m_decisionMakerField
        End Get
    End Property
    Public ReadOnly Property dNISField() As String Implements IOrder.IELOA.dNISField
        Get
            Return m_dNISField
        End Get
    End Property
    Public ReadOnly Property e911Field() As String Implements IOrder.IELOA.e911Field
        Get
            Return m_e911Field
        End Get
    End Property
    Public ReadOnly Property eLOANameField() As String Implements IOrder.IELOA.eLOANameField
        Get
            Return m_eLOANameField
        End Get
    End Property
    Public ReadOnly Property firstNameField() As String Implements IOrder.IELOA.firstNameField
        Get
            Return m_firstNameField
        End Get
    End Property
    Public ReadOnly Property lastNameField() As String Implements IOrder.IELOA.lastNameField
        Get
            Return m_lastNameField
        End Get
    End Property
    Public ReadOnly Property localField() As String Implements IOrder.IELOA.localField
        Get
            Return m_localField
        End Get
    End Property
    Public ReadOnly Property localTollField() As String Implements IOrder.IELOA.localTollField
        Get
            Return m_localTollField
        End Get
    End Property
    Public ReadOnly Property longDistanceField() As String Implements IOrder.IELOA.longDistanceField
        Get
            Return m_longDistanceField
        End Get
    End Property
    Public ReadOnly Property passwordField() As String Implements IOrder.IELOA.passwordField
        Get
            Return m_passwordField
        End Get
    End Property
    Public ReadOnly Property reasonCodeField() As String Implements IOrder.IELOA.reasonCodeField
        Get
            Return m_reasonCodeField
        End Get
    End Property
    Public ReadOnly Property securityTypeField() As String Implements IOrder.IELOA.securityTypeField
        Get
            Return m_securityTypeField
        End Get
    End Property
    Public ReadOnly Property securityValueField() As String Implements IOrder.IELOA.securityValueField
        Get
            Return m_securityValueField
        End Get
    End Property
    Public ReadOnly Property statusField() As String Implements IOrder.IELOA.statusField
        Get
            Return m_statusField
        End Get
    End Property
    Public ReadOnly Property telephoneNbrField() As String Implements IOrder.IELOA.telephoneNbrField
        Get
            Return m_telephoneNbrField
        End Get
    End Property
    Public ReadOnly Property userIDField() As String Implements IOrder.IELOA.userIDField
        Get
            Return m_userIDField
        End Get
    End Property
    Public ReadOnly Property versionField() As String Implements IOrder.IELOA.versionField
        Get
            Return m_versionField
        End Get
    End Property
    Public ReadOnly Property wTNsField() As String() Implements IOrder.IELOA.wTNsField
        Get
            Return m_wTNsField
        End Get
    End Property
End Class