'Imports CharterDotCom.CommonEntities.Library.Enumerations
Imports CharterDotCom.CommonEntities.Library
Imports CharterDotCom.CommonEntities.Library.Enumerations


<Serializable()> _
Public Class BLAffiliateOrder
  Implements IAffiliateOrder

  Private _confirmations As List(Of IAffiliateOrder.IAffiliateOrderConfirmation)

  Public Sub New(ByVal confirmations As List(Of IAffiliateOrder.IAffiliateOrderConfirmation))
    _confirmations = confirmations
  End Sub

  Public ReadOnly Property Confirmations() As List(Of IAffiliateOrder.IAffiliateOrderConfirmation) Implements IAffiliateOrder.Confirmations
    Get
      Return _confirmations
    End Get
  End Property

End Class

<Serializable()> _
Public Class BLAffiliateOrderConfirmation
  Implements IAffiliateOrder.IAffiliateOrderConfirmation

  Private _category As Category
  Private _schedules As IAffiliateOrder.IAffiliateSchedule
  Private _appointment As BLAffiliateInstallation
  Private _offerID As String
  Private _orderConfirmation As IConfirmation

  Public Sub New(ByVal offerID As String, ByVal orderConfirmationID As String, ByVal followUpMessage As String, ByVal schedules As IAffiliateOrder.IAffiliateSchedule, ByVal category As Category)
    _schedules = schedules
    _category = category
    _appointment = Appointment
    _offerID = offerID
    _orderConfirmation = New BLConfirmation(orderConfirmationID, followUpMessage)
  End Sub

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

  Public ReadOnly Property Confirmation() As IConfirmation Implements IAffiliateOrder.IAffiliateOrderConfirmation.Confirmation
    Get
      Return _orderConfirmation
    End Get
  End Property

  Public Property Schedules() As IAffiliateOrder.IAffiliateSchedule
    Get
      Return _schedules
    End Get
    Set(ByVal value As IAffiliateOrder.IAffiliateSchedule)
      _schedules = value
    End Set
  End Property

  Public Property Appointment() As BLAffiliateInstallation
    Get
      Return _appointment
    End Get
    Set(ByVal value As BLAffiliateInstallation)
      _appointment = value
    End Set
  End Property

  Public ReadOnly Property ConfirmationCategory() As Category Implements IAffiliateOrder.IAffiliateOrderConfirmation.ConfirmationCategory
    Get
      Return _category
    End Get
  End Property

  Private ReadOnly Property OrderSchedules() As IAffiliateOrder.IAffiliateSchedule Implements IAffiliateOrder.IAffiliateOrderConfirmation.Schedules
    Get
      Return _schedules
    End Get
  End Property

  Private ReadOnly Property Install() As IAffiliateOrder.IAffiliateAppointment Implements IAffiliateOrder.IAffiliateOrderConfirmation.Appointment
    Get
      Return _appointment
    End Get
  End Property

End Class

<Serializable()> _
Public Class BLAffiliateSchedule
  Implements IAffiliateOrder.IAffiliateSchedule

  Private _type As ScheduleType
  Private _windows As Dictionary(Of String, IAffiliateOrder.IAffiliateScheduleWindow)

  Public Sub New(ByVal type As ScheduleType, ByVal scheduleWindows As Dictionary(Of String, IAffiliateOrder.IAffiliateScheduleWindow))
    _type = type
    _windows = scheduleWindows
  End Sub

  Public ReadOnly Property ScheduleWindow() As Dictionary(Of String, IAffiliateOrder.IAffiliateScheduleWindow) Implements IAffiliateOrder.IAffiliateSchedule.ScheduleWindow
    Get
      Return _windows
    End Get
  End Property

  Public ReadOnly Property Type() As ScheduleType Implements IAffiliateOrder.IAffiliateSchedule.Type
    Get
      Return _type
    End Get
  End Property
End Class

<Serializable()> _
Public Class BLAffiliateScheduleWindow
  Implements IAffiliateOrder.IAffiliateScheduleWindow

  Private _selected As Boolean
  Private _startTime As String
  Private _endTime As String
  Private _id As String
  Private _installDate As String

  Public Sub New(ByVal id As String, ByVal startTime As String, ByVal endTime As String, ByVal installDate As String)
    _id = id
    _startTime = startTime
    _endTime = endTime
    _installDate = installDate
  End Sub

  Public ReadOnly Property EndTime() As String Implements IAffiliateOrder.IAffiliateScheduleWindow.EndTime
    Get
      Return _endTime
    End Get
  End Property

  Public ReadOnly Property InstallDate() As String Implements IAffiliateOrder.IAffiliateScheduleWindow.ScheduleDate
    Get
      Return _installDate
    End Get
  End Property

  Public ReadOnly Property ID() As String Implements IAffiliateOrder.IAffiliateScheduleWindow.ID
    Get
      Return _id
    End Get
  End Property

  Public ReadOnly Property IsSelected() As Boolean Implements IAffiliateOrder.IAffiliateScheduleWindow.IsSelected
    Get
      Return _selected
    End Get
  End Property

  Public ReadOnly Property StartTime() As String Implements IAffiliateOrder.IAffiliateScheduleWindow.StartTime
    Get
      Return _startTime
    End Get
  End Property

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

End Class

<Serializable()> _
Public Class BLAffiliateInstallation
  Implements IAffiliateOrder.IAffiliateAppointment

  Private _id As String
  Private _confirmation As IConfirmation
  Private _starttime As String
  Private _endtime As String
  Private _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)
    _id = id
    _confirmation = New BLConfirmation(confirmationNumber, message)
    _date = installDate
    _starttime = startTime
    _endtime = endTime
  End Sub

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

  Public ReadOnly Property Confirmation() As IConfirmation Implements IAffiliateOrder.IAffiliateAppointment.Confirmation
    Get
      Return _confirmation
    End Get
  End Property

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

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

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

  Private ReadOnly Property InstallEndTime() As String Implements IAffiliateOrder.IAffiliateAppointment.EndTime
    Get
      Return _endtime
    End Get
  End Property

  Private ReadOnly Property InstallationDate() As String Implements IAffiliateOrder.IAffiliateAppointment.InstallDate
    Get
      Return _date
    End Get
  End Property

  Private ReadOnly Property InstallStartTime() As String Implements IAffiliateOrder.IAffiliateAppointment.StartTime
    Get
      Return _starttime
    End Get
  End Property

End Class

'<Serializable()> _
'Public Class BLConfirmation
'  Implements IConfirmation

'  Private _message As String
'  Private _number As String

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

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